Skip to content

Commit

Permalink
chore(deps): track generated requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed May 1, 2022
1 parent ca00fd2 commit ba2564f
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -3,4 +3,5 @@ nix/sources.json linguist-generated=true
nix/sources.nix linguist-generated=true
poetry.lock linguist-generated=true
setup.py linguist-generated=true
requirements.txt linguist-generated=true
docs/**/*.ipynb linguist-generated=true
5 changes: 4 additions & 1 deletion .github/workflows/check-generated-files.yml
Expand Up @@ -72,7 +72,10 @@ jobs:
run: pip install poetry

- name: generate requirements.txt
run: poetry export --dev --extras all --without-hashes > requirements.txt
run: poetry export --dev --extras all --without-hashes --no-ansi > requirements.txt

- name: check requirements.txt
run: git diff --exit-code requirements.txt

- uses: syphar/restore-virtualenv@v1
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/update-setup-py.yml
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: generate setup.py
run: ./dev/poetry2setup -o setup.py

- name: generate requirements.txt
run: nix run -f nix poetry -- export --dev --extras all --without-hashes --no-ansi > requirements.txt

- name: setup git credentials
uses: OleksiyRudenko/gha-git-credentials@v2.1
with:
Expand All @@ -58,9 +61,9 @@ jobs:
run: |
set -euo pipefail
git add setup.py
git add setup.py requirements.txt
if git commit -m 'chore(setup.py): regenerate'; then
if git commit -m 'chore(setuptools-files): regenerate'; then
# pull in case another commit happened in the meantime
#
# `ours` is actually the *other* changeset, not the current branch, per
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Expand Up @@ -78,13 +78,6 @@ docbuild
result
result-*

# generate this with:
#
# poetry export --dev --without-hashes --no-ansi > requirements.txt
#
# if you need it
requirements.txt

# generated mkdocs website
.benchmarks
site
Expand Down
187 changes: 187 additions & 0 deletions requirements.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba2564f

Please sign in to comment.