Skip to content
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
23 changes: 7 additions & 16 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,13 @@ jobs:
name: Check Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 2.1.3
python-version: '3.13'
enable-cache: true
- name: Install dependencies
run: |
poetry env use '3.10'
poetry install --extras=testing
run: uv sync --locked --group docs
- name: Build docs with MkDocs
run: |
make docs
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
run: make docs
8 changes: 4 additions & 4 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Get version from pyproject.toml
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
run: echo "VERSION=$(uv version --short)" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v5
with:
name: ${{ env.VERSION }}
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 2.1.3
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: poetry install
run: uv sync
- name: Build distributions
run: poetry build
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
11 changes: 4 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 2.1.3
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install dependencies
run: |
poetry env use ${{matrix.python-version}}
poetry install --extras=testing
uv sync --extra testing

- name: Test with pytest
run: |
poetry run pytest tests/
uv run pytest tests/

integration-tests:
runs-on: ubuntu-latest
Expand Down
12 changes: 5 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ build:
python: "3.11"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
# Install uv
- pip install uv
# Tell uv to not use a virtual environment
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with docs
- uv sync --group docs
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ clean:
find . -name '.bak' -exec rm -f {} +

docs:
poetry run mkdocs build --site-dir=html
uv run mkdocs build --site-dir=html
8 changes: 4 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ General expectations:

## Development

We use [Poetry](https://python-poetry.org/) for packaging and dependency management.
We use [UV](https://docs.astral.sh/uv/) for packaging and dependency management.

After forking and cloning the repository,
run the following command to setup the project:

`poetry install`
`uv sync`

Then use your favorite IDE for development and testing.

Expand All @@ -48,11 +48,11 @@ make sure to update the [documentation site page](./examples.md) too.
## Working on Documentation

The documentation is powered by [MkDocs](https://www.mkdocs.org/) and [ReadTheDocs](https://readthedocs.org/).
All the necessary dependencies are included into the Poetry definition.
All the necessary dependencies are included into the pyproject definition.
To build the docs locally:

```bash
poetry run mkdocs build --site-dir=html
uv run mkdocs build --site-dir=html
```

MkDocs also comes with a built-in dev-server that lets you preview your documentation as you work on it by running the `mkdocs serve` command.
Expand Down
Loading