From a311409e5b94a30ce7160cd102b87d26b07482a6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 29 Aug 2024 23:16:59 +0100 Subject: [PATCH 1/9] Update doc URLs to point to readthedocs --- README.md | 4 ++-- pyproject.toml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f47e99df..0b2b8e40 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ and Arb (arbitrary-precision ball arithmetic). Features: * Polynomials, power series and matrices over all the above types * Lots of mathematical functions -Documentation: http://fredrikj.net/python-flint/ +Documentation: https://python-flint.readthedocs.io/en/latest/ Repository: https://github.com/flintlib/python-flint/ @@ -67,7 +67,7 @@ as follows: See the documentation for further notes on building and installing python-flint: -* https://fredrikj.net/python-flint/setup.html +* https://python-flint.readthedocs.io/en/latest/setup.html Examples ------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index d183220d..e10b47aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ description = "Bindings for FLINT" version = "0.7.0a4" # This needs to be in sync with README, cibuildwheel and CI config. requires-python = ">= 3.10" -urls = {Homepage = "https://github.com/flintlib/python-flint"} authors = [ {name = "Fredrik Johansson", email = "fredrik.johansson@gmail.com"}, ] @@ -13,6 +12,12 @@ classifiers = [ "Topic :: Scientific/Engineering :: Mathematics", ] +[project.urls] +Homepage = "https://github.com/flintlib/python-flint" +Documentation = "https://python-flint.readthedocs.io/en/latest/" +Repository = "https://github.com/flintlib/python-flint" +Changelog = "https://github.com/flintlib/python-flint/blob/master/README.md#changelog" + [project.readme] file = "README.md" content-type = "text/markdown" From aa6c3d3348118b62a78dfbe66977763c9a0d303f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 29 Aug 2024 23:22:20 +0100 Subject: [PATCH 2/9] Fix rst in docstrings for pow_trunc --- src/flint/types/fmpz_mod_poly.pyx | 2 +- src/flint/types/fq_default_poly.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flint/types/fmpz_mod_poly.pyx b/src/flint/types/fmpz_mod_poly.pyx index 7d6f088e..4b39b1b9 100644 --- a/src/flint/types/fmpz_mod_poly.pyx +++ b/src/flint/types/fmpz_mod_poly.pyx @@ -1660,7 +1660,7 @@ cdef class fmpz_mod_poly(flint_poly): :math:`f^e \mod x^n`/ Note: For exponents larger that 2^31 (which do not fit inside a ulong) use the - method :method:`~.pow_mod` with the explicit modulus `x^n`. + method :meth:`~.pow_mod` with the explicit modulus `x^n`. >>> R = fmpz_mod_poly_ctx(163) >>> x = R.gen() diff --git a/src/flint/types/fq_default_poly.pyx b/src/flint/types/fq_default_poly.pyx index 9e86c015..1adcd885 100644 --- a/src/flint/types/fq_default_poly.pyx +++ b/src/flint/types/fq_default_poly.pyx @@ -1139,7 +1139,7 @@ cdef class fq_default_poly(flint_poly): :math:`f^e \mod x^n`/ Note: For exponents larger that 2^31 (which do not fit inside a ulong) use the - method :method:`~.pow_mod` with the explicit modulus `x^n`. + method :meth:`~.pow_mod` with the explicit modulus `x^n`. >>> R = fq_default_poly_ctx(163) >>> x = R.gen() From aa8cd81f93bf21c8d562141b8a418d801e445948 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 29 Aug 2024 23:25:16 +0100 Subject: [PATCH 3/9] Test building the docs in CI --- .github/workflows/buildwheel.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 2feefa5f..ca63d53f 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -80,9 +80,9 @@ jobs: name: sdist path: dist/*.tar.gz - test_rst: + test_docs: needs: build_wheels - name: Test rst docs + name: Test docs (build and doctest) runs-on: ubuntu-20.04 steps: @@ -98,9 +98,10 @@ jobs: path: wheelhouse - run: pip install --upgrade pip - - run: pip install pytest + - run: pip install -r requirements-dev.txt - run: pip install --no-index --find-links wheelhouse python_flint - run: pytest --doctest-glob='*.rst' doc/source + - run: spin docs test_wheels: needs: build_wheels From 7f4b84e4b7f8dbd67ecbc0b36d2726ca97a1c250 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 29 Aug 2024 23:59:45 +0100 Subject: [PATCH 4/9] Fix doc build CI job --- .github/workflows/buildwheel.yml | 40 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index ca63d53f..1cd3353a 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -80,29 +80,6 @@ jobs: name: sdist path: dist/*.tar.gz - test_docs: - needs: build_wheels - name: Test docs (build and doctest) - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - uses: actions/download-artifact@v4 - with: - name: wheels-ubuntu-20.04 - path: wheelhouse - - - run: pip install --upgrade pip - - run: pip install -r requirements-dev.txt - - run: pip install --no-index --find-links wheelhouse python_flint - - run: pytest --doctest-glob='*.rst' doc/source - - run: spin docs - test_wheels: needs: build_wheels name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }} @@ -144,6 +121,23 @@ jobs: - run: pip install . - run: python -m flint.test --verbose + test_docs: + name: Test docs (build and doctest) + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: sudo apt-get update + - run: sudo apt-get install libflint-dev + + - run: pip install --upgrade pip + - run: pip install -r requirements-dev.txt + - run: pip install --no-index --find-links wheelhouse python_flint + - run: pytest --doctest-glob='*.rst' doc/source + - run: spin docs + # Test build with minimum Cython and meson-python versions. test_old_build_requires: name: 'Test old Cython/meson-python' From 74a5b1cc625f2f71d2d8211b10dd52f698e5b2c6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 30 Aug 2024 00:01:29 +0100 Subject: [PATCH 5/9] Fix doc build CI job --- .github/workflows/buildwheel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 1cd3353a..25d89698 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -134,7 +134,6 @@ jobs: - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt - - run: pip install --no-index --find-links wheelhouse python_flint - run: pytest --doctest-glob='*.rst' doc/source - run: spin docs From e612abbd33f0f7f222e3f2f7eda6c9948a277063 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 30 Aug 2024 00:03:36 +0100 Subject: [PATCH 6/9] Fix doctest command for rst docs --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 25d89698..6cf0ebda 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -134,7 +134,7 @@ jobs: - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt - - run: pytest --doctest-glob='*.rst' doc/source + - run: spin run -- pytest --doctest-glob='*.rst' doc/source - run: spin docs # Test build with minimum Cython and meson-python versions. From ae0141046ccf75b897a3a6063c0e2c642879205b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 30 Aug 2024 00:05:49 +0100 Subject: [PATCH 7/9] Run spin build first --- .github/workflows/buildwheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 6cf0ebda..2089fb1a 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -134,6 +134,7 @@ jobs: - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt + - run: spin build - run: spin run -- pytest --doctest-glob='*.rst' doc/source - run: spin docs From 1942f16fdb9958a285ad8dda1936d25e7c337cf3 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 30 Aug 2024 00:12:48 +0100 Subject: [PATCH 8/9] Don't use spin for CI tests --- .github/workflows/buildwheel.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 2089fb1a..913668c2 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -134,9 +134,11 @@ jobs: - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt - - run: spin build - - run: spin run -- pytest --doctest-glob='*.rst' doc/source - - run: spin docs + - run: pip install . + - run: pytest --doctest-glob='*.rst' doc/source + - run: make -C doc html + env: + SPHINX_OPTS: '-W -j auto' # Test build with minimum Cython and meson-python versions. test_old_build_requires: From b3cc783b3c3e0486c50b68686f1011e662e78874 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 30 Aug 2024 00:16:06 +0100 Subject: [PATCH 9/9] Use Ubuntu 24.04 for Flint 3.0 --- .github/workflows/buildwheel.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 913668c2..eb6b66b8 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -123,7 +123,7 @@ jobs: test_docs: name: Test docs (build and doctest) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -134,11 +134,8 @@ jobs: - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt - - run: pip install . - - run: pytest --doctest-glob='*.rst' doc/source - - run: make -C doc html - env: - SPHINX_OPTS: '-W -j auto' + - run: spin run -- pytest --doctest-glob='*.rst' doc/source + - run: spin docs # Test build with minimum Cython and meson-python versions. test_old_build_requires: