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

Update deps lockfiles and use uv sync in CI #899

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ updates:
day: monday
time: "05:43"
target-branch: main
versioning-strategy: lockfile-only
labels:
- dependency_updates
groups:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ jobs:
with:
python-version: "3.10"

- name: Set up uv (latest)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true

- name: Install dependencies
working-directory: ./pydatalab
run: |
uv venv
uv pip install -r requirements/requirements-all-dev.txt
uv pip install -e '.[all, dev]'
uv sync --all-extras

- name: Run pre-commit
working-directory: ./pydatalab
run: |
source .venv/bin/activate
pre-commit run --all-files --show-diff-on-failure
uv run pre-commit run --all-files --show-diff-on-failure

pytest:
name: Run Python unit tests
Expand Down Expand Up @@ -74,21 +74,21 @@ jobs:
run: |
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.0.deb && sudo apt install ./mongodb-database-tools-*-100.9.0.deb

- name: Set up uv (latest)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true

- name: Install locked versions of dependencies
working-directory: ./pydatalab
run: |
uv venv
uv pip install -r requirements/requirements-all-dev.txt
uv pip install -e '.[all, dev]'
uv sync --all-extras

- name: Run all tests
working-directory: ./pydatalab
run: |
source .venv/bin/activate
pytest -rs -vvv --cov-report=term --cov-report=xml --cov ./pydatalab ./tests
uv run pytest -rs -vvv --cov-report=term --cov-report=xml --cov ./pydatalab ./tests

- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && github.repository == 'datalab-org/datalab'
Expand Down
5 changes: 5 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,16 @@ Finally, recreate the lock files with:
```shell
uv pip compile pyproject.toml -o requirements/requirements-all-dev.txt --extra all --extra dev
uv pip compile pyproject.toml -o requirements/requirements-all.txt --extra all
uv lock
```

You should then inspect the changes to the requirements files (only your new
package and its subdependencies should have been added) and commit the changes.

> Regenerating the `Pipfile.lock` will not be necessary for long, but in this
> case it can be synced with the requirements.txt files via `pipenv install -r requirements/requirements-all-dev.txt`,
> and the resulting `Pipfile.lock` can be committed to the repository.

### Test server authentication/authorisation

There are two approaches to authentication when developing *datalab* features locally.
Expand Down
5,709 changes: 1,383 additions & 4,326 deletions pydatalab/Pipfile.lock

Large diffs are not rendered by default.

Loading