Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Refactor static checks to run outside of Docker #1053

Merged
merged 8 commits into from
Aug 9, 2022

Conversation

ThomasLaPiana
Copy link
Contributor

@ThomasLaPiana ThomasLaPiana commented Aug 9, 2022

Purpose

Run the static code checks outside of Docker

Changes

  • update the static checks to install dev requirements and run outside of Docker
  • set the cpython version to 3.9 when running the commands in CI (mypy breaks using older versions)

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #990

@ThomasLaPiana ThomasLaPiana self-assigned this Aug 9, 2022
@@ -14,3 +14,4 @@

# Sets the default session to `--list`
nox.options.sessions = []
nox.options.reuse_existing_virtualenvs = True
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without reusing the virtual envs the runs take much longer, and the first run will also take much longer as it installs and caches it.

This still catches whenever a package version changes, so no downsides here

@ThomasLaPiana
Copy link
Contributor Author

ThomasLaPiana commented Aug 9, 2022

execution time on the static checks with the new method is 1-2 minutes, much faster than the previous iteration

@ThomasLaPiana ThomasLaPiana marked this pull request as ready for review August 9, 2022 08:36
Copy link
Contributor

@sanders41 sanders41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sanders41 sanders41 merged commit ca24914 into main Aug 9, 2022
@sanders41 sanders41 deleted the ThomasLaPiana-refactor-static-checks branch August 9, 2022 10:37
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Refactor static checks to run outside of Docker

* run static checks outside of docker, reusing cached virtual envs

* update the changelog

* Create CHANGELOG.md

* Update CHANGELOG.md

* update the static checks in the workflows

* remove the static check dependency on "build"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor nox static analysis commands to avoid using Docker
2 participants