(2.1.1) migrate to uv
Some checks failed
Actions / Build (push) Failing after 3s
Actions / Build Documentation (push) Failing after 3s
Actions / Lint with Ruff & Pylint (push) Failing after 12s

This commit is contained in:
Seaswimmer 2024-10-10 15:30:15 -04:00
parent 93d55cda47
commit 8cf60f653a
Signed by: cswimr
GPG key ID: A9C162E867C851FA
5 changed files with 1340 additions and 1837 deletions

View file

@ -5,17 +5,20 @@ on:
jobs:
build:
name: Build
runs-on: docker
container: www.coastalcommits.com/cswimr/actions:pyflowery
container: www.coastalcommits.com/cswimr/actions:uv
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: poetry install
run: uv install
- name: Build the package
run: poetry build
run: uv build
- name: Upload the package
uses: actions/upload-artifact@v3
@ -38,25 +41,9 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}
lint:
name: Lint with Ruff & Pylint
runs-on: docker
container: www.coastalcommits.com/cswimr/actions:pyflowery
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: poetry install --with dev
- name: Analysing code with Ruff
run: poetry run ruff check $(git ls-files '*.py')
continue-on-error: true
- name: Analysing code with Pylint
run: poetry run pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
docs:
runs-on: docker
container: coastalcommits.com/cswimr/actions:pyflowery
container: www.coastalcommits.com/cswimr/actions:uv
steps:
- name: Checkout
uses: actions/checkout@v4
@ -64,7 +51,27 @@ jobs:
fetch-depth: 0
- name: Install dependencies
run: poetry install --with docs
run: uv sync
- name: Analysing code with Ruff
run: uv run ruff check $(git ls-files '*.py')
continue-on-error: true
- name: Analysing code with Pylint
run: uv run pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
docs:
name: Build Documentation
runs-on: docker
container: coastalcommits.com/cswimr/actions:docs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: uv sync --no-dev --optional=documentation
- name: Set environment variables
uses: actions/env@v2
@ -73,7 +80,7 @@ jobs:
run: |
export SITE_URL="https://$CI_ACTION_REF_NAME_SLUG.pyflowery.coastalcommits.com"
export EDIT_URI="src/branch/$CI_ACTION_REF_NAME/docs"
poetry run mkdocs build -v
uv run mkdocs build -v
- name: Deploy documentation
run: |

3
.gitignore vendored
View file

@ -167,3 +167,6 @@ test.mp3
# actions artifacts
1/
# virtual environnment
.venv/

1787
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,12 @@
[tool.poetry]
[project]
name = "pyflowery"
version = "2.1.0"
version = "2.1.1"
description = "A Python API wrapper for the Flowery API"
authors = ["cswimr <seaswimmerthefsh@gmail.com>"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"aiohttp>=3.10.9",
]
classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
@ -11,28 +14,19 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
[tool.poetry.dependencies]
python = "^3.11"
aiohttp = "^3.9.5"
[project.optional-dependencies]
documentation = [
"mkdocs>=1.6.1",
"mkdocs-git-authors-plugin>=0.9.0",
"mkdocs-git-revision-date-localized-plugin>=1.2.9",
"mkdocs-material[imaging]>=9.5.40",
"mkdocs-redirects>=1.2.1",
"mkdocstrings[python]>=0.26.1",
]
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
pylint = "^3.2.7"
ruff = "^0.6.5"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
mkdocs = "1.6.1"
mkdocstrings = {extras = ["python"], version = "0.26.1"}
mkdocs-git-authors-plugin = "0.9.0"
mkdocs-git-revision-date-localized-plugin = "1.2.9"
mkdocs-material = {extras = ["imaging"], version = "9.5.35"}
mkdocs-redirects = "1.2.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
dev-dependencies = [
"mypy>=1.11.2",
"pylint>=3.3.1",
"ruff>=0.6.9",
]

1286
uv.lock Normal file

File diff suppressed because it is too large Load diff