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
65 changes: 42 additions & 23 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
name: rye CI
name: uv CI
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,23 +29,24 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: |
rye sync --no-lock
uv sync --python ${{ matrix.python-version }}

- name: check
run: |
rye run check
uv run ruff format --check src/ test/
uv run ruff check
uv run ty check src/ridgeplot
uv run pytest -l -rPap -vvv -p no:warnings --cov

- uses: py-cov-action/python-coverage-comment-action@v3
id: coverage_comment
Expand All @@ -63,24 +64,25 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Build dist
run: |
rye build --verbose
uv build --verbose

- name: publish to pypi
run: |
rye publish --token ${{ secrets.PYPI_TOKEN }} --yes --verbose
uv publish --token ${{ secrets.PYPI_TOKEN }} --verbose

- name: push tag
run: |
gh release create $(rye version)
VERSION=$(uv run python -c "from importlib.metadata import version; print(version('ridgeplot-py'))")
gh release create "$VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -90,16 +92,33 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [publish, build]
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v2
- uses: actions/configure-pages@v5

- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: setup
uses: actions/setup-python@v2
with:
python-version: 3.x
run: uv python install 3.x

- name: build and deploy doc
- name: build doc
run: |
pip install mkdocs-material mkdocstrings-python mkdocs
mkdocs gh-deploy --force
uv sync --python 3.x
uv run zensical build --clean

- uses: actions/upload-pages-artifact@v4
with:
path: site

- uses: actions/deploy-pages@v4
id: deployment
20 changes: 12 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
build-backend = "hatchling.build"
requires = ["hatchling", "versioningit"]

[dependency-groups]
dev = [
"pytest>=6.2.5",
"pytest-cov>=2.12.1",
"ruff>=0.0.290",
"prek>=0.2.27",
"versioningit>=3.1.1",
"ty>=0.0.6",
"zensical>=0.0.2",
"mkdocstrings-python>=1.0.0"
]

[project]
authors = [{name = "Douglas Wu", email = "wckdouglas@gmail.com"}]
dependencies = [
Expand Down Expand Up @@ -35,14 +47,6 @@ line-length = 120
select = ['E', 'F', 'W', 'I']

[tool.rye]
dev-dependencies = [
"pytest>=6.2.5",
"pytest-cov>=2.12.1",
"ruff>=0.0.290",
"prek>=0.2.27",
"versioningit>=3.1.1",
"ty>=0.0.6"
]

[tool.rye.scripts]
check = {chain = ["format", "lint", "type", "test"]}
Expand Down
77 changes: 0 additions & 77 deletions requirements-dev.lock

This file was deleted.

53 changes: 0 additions & 53 deletions requirements.lock

This file was deleted.

Loading
Loading