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

🔧 Replace poetry with flit/uv #1355

Merged
merged 3 commits into from
Nov 28, 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
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
poetry.lock linguist-generated=true
poetry.lock -diff
# Auto detect text files and perform LF normalization
* text=auto
27 changes: 14 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- uses: pre-commit/[email protected]

tests-core:
Expand All @@ -23,17 +23,18 @@ jobs:
fail-fast: false # Set on "false" to get the results of ALL builds
matrix:
os: ["ubuntu-latest"]
# 3.9.8 seems to be broken with type_ast
# https://www.mail-archive.com/[email protected]/msg1829077.html
python-version: ["3.8", "3.11"]
sphinx-version: ["6.0", "7.0"]
python-version: ["3.10", "3.12"]
sphinx-version: ["7.0", "8.0"]
include:
- os: "ubuntu-latest"
python-version: "3.10"
sphinx-version: "8.0"
python-version: "3.9"
sphinx-version: "7.0"
- os: "windows-latest"
python-version: "3.9"
sphinx-version: "7.0"
- os: "windows-latest"
python-version: "3.8"
sphinx-version: "6.0"
python-version: "3.12"
sphinx-version: "8.0"
steps:
- uses: actions/checkout@v4
- name: Install graphviz (linux)
Expand Down Expand Up @@ -73,10 +74,10 @@ jobs:
matrix:
include:
- os: "ubuntu-latest"
python-version: "3.8"
sphinx-version: "6.0"
python-version: "3.9"
sphinx-version: "7.0"
- os: "ubuntu-latest"
python-version: "3.11"
python-version: "3.12"
sphinx-version: "8.0"
steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: install Poetry
run: python -m pip install poetry
- name: poetry configure PyPI Token
run: poetry config pypi-token.pypi ${{ secrets.PYPI }}
- name: poetry build and publish PyPi
run: poetry --build publish
- name: install flit
run: pip install flit~=3.4
- name: Build and publish
run: flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ mem_out.*

pyinstrument*
*.prof

uv.lock
19 changes: 15 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
repos:

- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.8.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
rev: v1.13.0
hooks:
- id: mypy
files: sphinx_needs/.*
args: []
additional_dependencies:
- sphinx==6.2.1
- docutils==0.19
- sphinx==7.4.7
- docutils==0.20
- types-docutils==0.20.0.20240201
- types-jsonschema
- types-requests

# TODO this does not work on pre-commit.ci
# - repo: https://github.com/astral-sh/uv-pre-commit
# rev: 0.5.5
# hooks:
# - id: uv-lock # Update the uv lockfile

- repo: local
hooks:
- id: check-readme
Expand Down
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Maintainers

Daniel Woste <[email protected]>

Chris Sewell <[email protected]>

Contributors
------------

Expand Down Expand Up @@ -36,6 +38,4 @@ Duodu Randy <[email protected]>

Christian Wappler <[email protected]>

Chris Sewell <[email protected]>

Simon Leiner <[email protected]>
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

59 changes: 0 additions & 59 deletions Makefile

This file was deleted.

9 changes: 0 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ For filtering and analyzing needs, ``Sphinx-Needs`` provides different, powerful
Installation
============

Using poetry
------------

.. code-block:: bash

poetry add sphinx-needs

Using pip
---------

Expand All @@ -79,8 +72,6 @@ Using sources
git clone https://github.com/useblocks/sphinx-needs
cd sphinx-needs
pip install .
# or
poetry install


Activation
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import datetime
import os
from pathlib import Path
from typing import Any, Dict
from typing import Any

from sphinx_needs import __version__

Expand Down Expand Up @@ -222,7 +222,7 @@
"manual",
),
]
latex_elements: Dict[str, Any] = {
latex_elements: dict[str, Any] = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
Expand Down
Loading