Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
fix: split requirements for ci caching
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Jan 9, 2025
1 parent dafd5aa commit 76fcba9
Show file tree
Hide file tree
Showing 8 changed files with 1,031 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: 'uv.lock'
cache-dependency-path: |
requirements/requirements-build-website.txt
- uses: extractions/setup-just@v2

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: |
requirements.txt
uv.lock
requirements/requirements-dev.txt
- name: Install deps including dev
run: uv sync
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/schedule-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
cache-dependency-path: |
requirements/requirements.txt
- uses: extractions/setup-just@v2

Expand Down
23 changes: 22 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,28 @@ repos:
- id: uv-lock # update lock file
- id: uv-export # export lock file to requirements.txt
args:
['--no-dev', '--frozen', '--output-file=requirements.txt', '--quiet']
[
'--no-dev',
'--frozen',
'--output-file=requirements/requirements.txt',
'--quiet',
]
- id: uv-export # export lock file to requirements.txt for dev deps
args:
[
'--frozen',
'--output-file=requirements/requirements-dev.txt',
'--quiet',
]
- id: uv-export # export lock file to requirements.txt for "build-website" group deps
args:
[
'--only-group',
'build-website',
'--frozen',
'--output-file=requirements/requirements-build-website.txt',
'--quiet',
]

- repo: local
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ python -m venv .venv
#### Cài đặt dependencies

```sh
pip install -e . -r requirements.txt
pip install -e . -r requirements/requirements.txt
```

???+note
Expand Down
341 changes: 341 additions & 0 deletions requirements/requirements-build-website.txt

Large diffs are not rendered by default.

661 changes: 661 additions & 0 deletions requirements/requirements-dev.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt → requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv export --no-dev --frozen --output-file=requirements.txt
# uv export --no-dev --frozen --output-file=requirements/requirements.txt
-e .
aiodns==3.2.0 ; sys_platform == 'darwin' or sys_platform == 'linux' \
--hash=sha256:62869b23409349c21b072883ec8998316b234c9a9e36675756e8e317e8768f72 \
Expand Down

0 comments on commit 76fcba9

Please sign in to comment.