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

Remove pytest-mypy #136

Merged
merged 5 commits into from
Oct 17, 2024
Merged

Remove pytest-mypy #136

merged 5 commits into from
Oct 17, 2024

Conversation

AdrianDAlessandro
Copy link
Contributor

@AdrianDAlessandro AdrianDAlessandro commented Oct 16, 2024

Description

This removes pytest-mypy because of the issue with test discovery in the vscode extension. To make up for it, mypy has bee added to CI.

There is a chance the CI tests will fail because of either the run: pip install .[dev] making mypy . fail, or the test_version test causing problems with if we do run: pip install -r dev-requirements.txt. So this will need to be resolved either way.

Fixes #135

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. python -m sphinx -b html docs docs/build)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

Copy link
Contributor

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

The same error you already know.

@@ -36,6 +36,10 @@ jobs:
working-directory: my_project
run: pip install .[dev]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that installing this in editable mode should solve the issues. True, it is not needed, but it causes no harm and might be useful to keep mypy happy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made two separate pushes to confirm everything passes and fails as we expect. I have no idea why installing in editable mode fixes this.

I also have changed the install the use the pinned dev-requirements so it runs the same in this repo as in any repos that use this template

Copy link
Collaborator

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

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

A few comments, but on the whole seems sensible.

.github/workflows/ci-pip-tools.yml Outdated Show resolved Hide resolved
{{ cookiecutter.project_slug }}/.github/workflows/ci.yml Outdated Show resolved Hide resolved
{{ cookiecutter.project_slug }}/README.pip-tools.jinja Outdated Show resolved Hide resolved
{{ cookiecutter.project_slug }}/dev-requirements.txt Outdated Show resolved Hide resolved
@AdrianDAlessandro AdrianDAlessandro merged commit d663e41 into main Oct 17, 2024
9 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the remove-pytest-mypy branch October 17, 2024 13:54
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.

Tests not discoverable due in VS Code due to --mypy flag
3 participants