Skip to content
Open
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
26 changes: 8 additions & 18 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,19 @@ jobs:
with:
fetch-depth: 1

- name: Set up Python 3.13
- name: Install uv
if: ${{ steps.release-please.outputs.release_created }}
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v8.3.2
with:
python-version: 3.13
enable-cache: false
python-version: "3.13"

- name: Install poetry
- name: Build datatrail-cli
if: ${{ steps.release-please.outputs.release_created }}
run: |
pip install --upgrade pip
pip install --upgrade poetry
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false

- name: Install datatrail-cli
if: ${{ steps.release-please.outputs.release_created }}
run: |
poetry install
run: uv build

- name: Publish to pypi
if: ${{ steps.release-please.outputs.release_created }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build --verbose
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish --verbose
29 changes: 8 additions & 21 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,16 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.3.2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-python: true
python-version: ${{ matrix.python-version }}

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v5
with:
path: |
~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}

- name: Installation
run: |
pip install --upgrade pip
pip install poetry==2.1.2
pip install vos
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false
poetry config cache-dir ~/.cache/pypoetry
poetry config virtualenvs.path ~/.cache/pypoetry/venv
poetry install --with dev
run: uv sync

- name: Create NETRC file
run: |
Expand All @@ -76,12 +63,12 @@ jobs:
- name: Obtain CADC certificate
run: |
export CADC_CERT=$HOME"/.ssl/cadcproxy.pem"
cadc-get-cert --netrc-file ${{ env.CANFAR_NETRC_FILE }} --days-valid 1 --cert-filename $CADC_CERT
uv run --no-sync cadc-get-cert --netrc-file ${{ env.CANFAR_NETRC_FILE }} --days-valid 1 --cert-filename $CADC_CERT
echo CADC_CERT=$CADC_CERT >> "$GITHUB_ENV"

- name: Run Tests
run: |
poetry run pytest tests/ --cov . --cov-report=lcov --cov-report=xml
uv run --no-sync pytest tests/ --cov . --cov-report=lcov --cov-report=xml

- name: Remove NETRC file and CADC certificate
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/clear.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ will ask for confirmation before removing the dataset.
PosixPath('dtcli'), PosixPath('pyproject.toml'), PosixPath('tests'),
PosixPath('docs'), PosixPath('README.md'), PosixPath('.gitignore'),
PosixPath('.github'), PosixPath('tox.ini'),
PosixPath('poetry.lock'), PosixPath('.git')]
PosixPath('uv.lock'), PosixPath('.git')]
DEBUG .: ✗ # (2)!
```

Expand Down
6 changes: 3 additions & 3 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ There are two ways to install the Datatrail CLI:
pip install .
```

It can also be installed from source using git and poetry:
It can also be installed from source using git and uv:

!!! example "git+poetry"
!!! example "git+uv"

``` shell
git clone ssh+git://git@github.com/chimefrb/datatrail-cli
cd datatrail-cli
poetry install --without docs
uv sync
```
Loading
Loading