Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a simple unit test framework with tox and pytest #140

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dbutenhof
Copy link
Collaborator

@dbutenhof dbutenhof commented Dec 6, 2024

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

This uses black, isort and flake8 to check code quality, although failure is ignored until we've cleaned it up (a process which begins in PR #139 against the revamp branch).

Minimal unit testing is introduced, generating a code coverage report. The text summary is added to the Action summary page, and the more detailed HTML report is stored as an artifact for download.

NOTE: The GitHub Action environment is unhappy with uvicorn 0.15 for reasons that aren't entirely obvious (pip can't resolve conflicting indirect dependencies); upgrading to the latest 0.32.x seems to work and hasn't obviously broken anything else.

Related Tickets & Documents

PANDA-673

Resolves #121

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Tested manually with tox CLI in a private branch. If GitHub cooperates, I'll use this draft PR to debug the GitHub Action...

This encapsulates substantial logic to encapsulate interpretation of the
Crucible Common Data Model OpenSearch schema for the use of CPT dashboard API
components. By itself, it does nothing.
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

This uses `black`, `isort` and `flake8` to check code quality, although
failure is ignored until we've cleaned it up (which has begin in
PR cloud-bulldozer#139 against the `revamp` branch).

Minimal unit testing is introduced, generating a code coverage report.
The text summary is added to the Action summary page, and the more
detailed HTML report is stored as an artifact for download.

NOTE: The GitHub Action environment is unhappy with `uvicorn` 0.15;
upgrading to the latest 0.32.x seems to work and hasn't obviously
broken anything else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Testing framework for the dashboard
1 participant