From 24070c9f0d9d8f2dc7dca65c677458ea223d282d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Thu, 25 Jun 2026 09:14:57 +0200 Subject: [PATCH 1/3] chore: better CI --- .github/workflows/checks.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/pr.yml | 18 ++++++++++++++++++ .github/workflows/prchecks.yml | 30 ------------------------------ 3 files changed, 50 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/pr.yml delete mode 100644 .github/workflows/prchecks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..d27a2f0 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,32 @@ +name: Checks +on: + push: + branches: [main, features] + pull_request: + branches: [main, features] + +jobs: + lint: + name: Code Style + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 + with: + python-version: 3.x + - uses: psf/black@stable + + poetry-check: + runs-on: ubuntu-latest + + name: Poetry + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + - run: | + pip install -U pip poetry + poetry install + - run: poetry check --strict diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..5d69422 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,18 @@ +name: Pull Request + +on: + pull_request: + types: + - opened + - edited + - synchronize + +jobs: + semantic-pr: + name: Validate PR title + runs-on: ubuntu-latest + + steps: + - uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prchecks.yml b/.github/workflows/prchecks.yml deleted file mode 100644 index 51a0a08..0000000 --- a/.github/workflows/prchecks.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Pull Request Checks - -on: - pull_request: - branches: [main, features] - -jobs: - semantic-pr: - name: Semantic Pull Request - runs-on: ubuntu-latest - strategy: - fail-fast: false - - steps: - - uses: amannn/action-semantic-pull-request@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - lint: - name: Code Style - runs-on: ubuntu-latest - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 - with: - python-version: 3.x - - uses: psf/black@stable From f5dcb020230b74d4cadb55a10ae127a1ed9db83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Thu, 25 Jun 2026 09:38:11 +0200 Subject: [PATCH 2/3] chore: update pyproject.toml --- pyproject.toml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1e7b676..35957a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,9 @@ -[tool.poetry] +[project] name = "kosmorrolib" version = "1.0.13" -authors = ["Jérôme Deuchnord "] +authors = [ + { name = "Jérôme Deuchnord", email = "jerome@deuchnord.fr" } +] homepage = "https://kosmorro.space/lib" repository = "https://github.com/Kosmorro/lib" documentation = "https://kosmorro.space/lib/doc" @@ -10,6 +12,20 @@ license = "AGPL-3.0-or-later" description = "A library to computes the ephemerides." readme = "README.md" +requires-python = "^3.8" +dependencies = [ + "skyfield (>=1.49,<2.0)", + + # handling Python constraints of older versions of NumPy + "numpy (>=1.0,<1.25) ; python_version == '3.8'", + "numpy (>=2.0,<2.1) ; python_version == '3.9'", + "numpy (>=2.1,<2.3) ; python_version == '3.10'", + "numpy (>=2.3,<3.0) ; python_version >= '3.11'", + + "skyfield-data (>=7.0.0)", + "python-dateutil (>=2.8,<3.0)" +] + classifiers = [ "Development Status :: 5 - Production/Stable", "Topic :: Scientific/Engineering :: Astronomy", @@ -19,16 +35,6 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.8" -skyfield = "^1.49" -numpy = [ - { version = "<1.25", python = "3.8.*" }, - { version = "<2.1", python = "3.9.*" }, - { version = "<2.3", python = "3.10.*" }, - { version = "^2.3", python = ">=3.11" }, -] -skyfield-data = "*" -python-dateutil = "^2.8" [tool.poetry.group.dev.dependencies] black = ">23.1,<25.0" From 5059e5fcac7ca9cdc406c8946c0334c9ed8512c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Thu, 25 Jun 2026 09:49:23 +0200 Subject: [PATCH 3/3] build!: drop support for Python < 11 --- .github/workflows/tests.yml | 3 --- Makefile | 2 +- pyproject.toml | 18 +++++------------- tests.py | 3 +-- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6deb5ab..3ecd1a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,9 +18,6 @@ jobs: - macos-latest - windows-latest python_version: - - '3.8' - - '3.9' - - '3.10' - '3.11' - '3.12' - '3.13' diff --git a/Makefile b/Makefile index 275b019..dda0e73 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ black: - poetry run black kosmorrolib + poetry run black kosmorrolib tests.py .PHONY: tests tests: doctests diff --git a/pyproject.toml b/pyproject.toml index 35957a5..ec19069 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,16 +12,10 @@ license = "AGPL-3.0-or-later" description = "A library to computes the ephemerides." readme = "README.md" -requires-python = "^3.8" +requires-python = "^3.11" dependencies = [ "skyfield (>=1.49,<2.0)", - - # handling Python constraints of older versions of NumPy - "numpy (>=1.0,<1.25) ; python_version == '3.8'", - "numpy (>=2.0,<2.1) ; python_version == '3.9'", - "numpy (>=2.1,<2.3) ; python_version == '3.10'", - "numpy (>=2.3,<3.0) ; python_version >= '3.11'", - + "numpy (>=2.3,<3.0)", "skyfield-data (>=7.0.0)", "python-dateutil (>=2.8,<3.0)" ] @@ -34,13 +28,11 @@ classifiers = [ "Intended Audience :: Education", ] -[tool.poetry.dependencies] - [tool.poetry.group.dev.dependencies] -black = ">23.1,<25.0" +black = ">=23.1" parameterized = "^0.9.0" -coverage = "^6.1.2" -coveralls = "^3.3.1" +coverage = ">=6.1" +coveralls = ">=3.3" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/tests.py b/tests.py index 22ee4a3..ad51124 100644 --- a/tests.py +++ b/tests.py @@ -4,13 +4,12 @@ from kosmorrolib import * - if __name__ == "__main__": failures = 0 tests = 0 for module in [events, ephemerides, model]: - (f, t) = testmod(module, optionflags=NORMALIZE_WHITESPACE) + f, t = testmod(module, optionflags=NORMALIZE_WHITESPACE) failures += f tests += t