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

rework dev dependencies (#620) #640

Merged
merged 6 commits into from Feb 10, 2022
Merged

rework dev dependencies (#620) #640

merged 6 commits into from Feb 10, 2022

Conversation

willkg
Copy link
Member

@willkg willkg commented Feb 9, 2022

Previously, we maintained dev dependencies in a .in file and then used pip-compile to generate a requirements file and then used that for building dev environments and CI test environments.

We hit dependencies that have different dependencies depending on Python version and interpreter. That breaks with the compiled requirements method.

This redoes dev requirements so that they're an extra specified in setup.py. We don't need to track dependencies of dependencies or hash dev dependencies. We can update dev dependencies as we need to. Having stable pinned versions reduces unexpected errors because the universe changed.

Developers will need to do:

pip install -e '.[dev]'

now to pick up dev dependencies.

Add some additional files and directories that should be covered by
Python formatting.

Change flake8 line length to 88 to match black.

Change flake8 to ignore line length--it's handled by black.
Previously, we maintained dev dependencies in a .in file and then used
pip-compile to generate a requirements file and then used that for
building dev environments and CI test environments.

We hit dependencies that have different dependencies depending on Python
version and interpreter. That breaks with the compiled requirements
method.

This redoes dev requirements so that they're an extra specified in
setup.py. We don't need to track dependencies of dependencies or hash
dev dependencies. We can update dev dependencies as we need to. Having
stable pinned versions reduces unexpected errors because the universe
changed.

Developers will need to do:

pip install -e '.[dev]'

now to pick up dev dependencies.
@willkg
Copy link
Member Author

willkg commented Feb 9, 2022

I updated the branch requirements and removed the checks that no longer get run and added the new pypy checks.

For Python 3.7, Sphinx, flake8, and pytest all have a importlib-metadata
requirement, but they conflict. This attempts to fix that.
This changes package installation in CI so that the lint and test
workflows match.
@willkg
Copy link
Member Author

willkg commented Feb 9, 2022

\o/ victory!

@willkg willkg requested a review from g-k February 9, 2022 15:56
@willkg
Copy link
Member Author

willkg commented Feb 9, 2022

@g-k How does this look? Are there other bits of documentation that talk about the old way to install dev dependencies that I missed?

Copy link
Collaborator

@g-k g-k left a comment

Choose a reason for hiding this comment

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

Nice! ✅

@@ -2,7 +2,6 @@ include CHANGES
include CONTRIBUTORS
include CONTRIBUTING.rst
include CODE_OF_CONDUCT.rst
include requirements-dev.txt
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 idk why we shipped this to begin with

Copy link
Member Author

Choose a reason for hiding this comment

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

If someone ran check-manifest, it might have complained and suggested we add it or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

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

This sure looks like I ran check-manifest:

8f6c2ea

0d06fa3

@willkg willkg merged commit 06778c0 into mozilla:main Feb 10, 2022
@willkg
Copy link
Member Author

willkg commented Feb 10, 2022

Thank you!

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.

None yet

2 participants