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

Copy dependencies to requirements.txt in pre commit #890

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

sfc-gh-astus
Copy link
Contributor

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

...

@sfc-gh-astus sfc-gh-astus requested a review from a team as a code owner March 11, 2024 14:32
@sfc-gh-astus sfc-gh-astus force-pushed the copy-dependencies-to-requirements-in-pre-commit branch 4 times, most recently from 6d26c18 to 7e23a71 Compare March 11, 2024 14:52

def sync():
pyproject = tomllib.loads(Path("pyproject.toml").read_text())
dependencies = pyproject["project"]["dependencies"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these all dependencies including dev deps or we have some development packages listed as dependencies?
coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I forgot about them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

sfc-gh-mraba
sfc-gh-mraba previously approved these changes Mar 11, 2024
@sfc-gh-astus sfc-gh-astus force-pushed the copy-dependencies-to-requirements-in-pre-commit branch 4 times, most recently from 8699c54 to 22b4ff5 Compare March 12, 2024 12:48
Comment on lines +58 to +61
- id: dependencies-sync
name: "Copy dependencies from pyproject.toml to requirements.txt"
language: system
entry: python .snyk/dependency-sync.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Add files to run this only on pyproject.toml change, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, added

@sfc-gh-astus sfc-gh-astus force-pushed the copy-dependencies-to-requirements-in-pre-commit branch 3 times, most recently from d09ccf2 to 692252b Compare March 12, 2024 15:26
@sfc-gh-astus sfc-gh-astus force-pushed the copy-dependencies-to-requirements-in-pre-commit branch from 692252b to cebc419 Compare March 13, 2024 08:31
@sfc-gh-astus sfc-gh-astus merged commit 87205ef into main Mar 13, 2024
10 checks passed
@sfc-gh-astus sfc-gh-astus deleted the copy-dependencies-to-requirements-in-pre-commit branch March 13, 2024 08:50
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.

3 participants