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

Ensure that dev dependencies are not used in production #13

Open
sobolevn opened this issue Feb 3, 2020 · 3 comments
Open

Ensure that dev dependencies are not used in production #13

sobolevn opened this issue Feb 3, 2020 · 3 comments

Comments

@sobolevn
Copy link
Contributor

sobolevn commented Feb 3, 2020

poetry has dependencies and dev-dependencies. In development we can import packages from both sections. But, in production we cannot use packages in dev-dependencies.

I think that dev-dependencies should be checked to be blacklisted if we are running a production check.

@arkq
Copy link
Owner

arkq commented Feb 3, 2020

Im not as such familiar with flake8 usage, but is there any way to determine "production" check? Maybe some other plug-in already has such flake8 option, so flake8-requirements could check it as well?

@sobolevn
Copy link
Contributor Author

sobolevn commented Feb 3, 2020

I am not aware of any existing solutions in this field.
We can add extra flag --requirements-production-mode which will indicate that we are running in the production environment.

@Dreamsorcerer
Copy link
Contributor

Dreamsorcerer commented Jun 18, 2021

Maybe some way to specify allowed directories or similar. For example, in my projects, dev dependencies typically only get used under the tests/ directory and a _localdev module.

So, maybe if you could do something in the config along the lines of:

requirements-file = requirements.txt:[],requirements-dev.txt:[tests/, _localdev/]

Meaning that tests/ and _localdev/ will be checked against requirements-dev.txt, while the rest of the code would be checked against requirements.txt.

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

No branches or pull requests

3 participants