diff --git a/.readthedocs.yml b/.readthedocs.yml index af7d2d9..2ec5e0b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,10 +1,14 @@ version: 2 build: - image: latest + os: ubuntu-22.04 + tools: + python: mambaforge-4.10 + +conda: + environment: .readthedocs_env.yml python: - version: 3.8 install: - method: pip path: . @@ -13,3 +17,6 @@ python: # Don't build any extra formats formats: [] + +sphinx: + configuration: docs/source/conf.py diff --git a/.readthedocs_env.yml b/.readthedocs_env.yml new file mode 100644 index 0000000..07e7f26 --- /dev/null +++ b/.readthedocs_env.yml @@ -0,0 +1,20 @@ +name: pwkit_rtd +channels: + - conda-forge + +dependencies: + - astropy + - mock + - numpydoc + - pandas + - pip + - python =3.12 + - scipy + - setuptools + - sphinx + - sphinx_rtd_theme + # Work around an issue with v0.17 as seen in: + # https://github.com/WorldWideTelescope/pywwt/pull/375 + # https://github.com/WorldWideTelescope/pywwt/commit/66480282c578353ea04d6716ca6015fec9370c44 + # 0.18 is now available and may fix this. + - sphinx-automodapi=0.16 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b282ee..1f3c358 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# pwkit 1.2.1 (2024-09-13) + +- Fix `pwkit.parallel.SerialHelper.get_map()` for Python 3 (#22) +- Fix `pwkit.lmmin.Problem.set_npar()` for recent Numpys (#20). I'm not sure if + we'll be compatible with Numpy 2.0, though. +- Get the ReadTheDocs docs building again, and make it so that we check RTD + builds as part of pull request processing +- README.md: fix some links to the documentation (@AstroGenevieve) + + # pwkit 1.2.0 (2023-06-18) - Remove the dependency on `six` diff --git a/README.md b/README.md index e739acf..3278de2 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ This is a collection of Peter Williams’ miscellaneous Python tools. The online documentation contains [installation instructions]. The documentation is very much a work in progress but [may be found here]. -[installation instructions]: http://pwkit.readthedocs.org/en/latest/about/#installation -[may be found here]: http://pwkit.readthedocs.org/en/latest/ +[installation instructions]: https://pwkit.readthedocs.io/en/latest/about.html#installation +[may be found here]: https://pwkit.readthedocs.io/en/latest/ ## Citation @@ -47,7 +47,7 @@ include after your Acknowledgments section would be: See the [online documentation]. -[online documentation]: http://pwkit.readthedocs.org/en/latest/about/#authors +[online documentation]: https://pwkit.readthedocs.io/en/latest/about.html#authors ## License diff --git a/ci/azure-build-and-test.yml b/ci/azure-build-and-test.yml index 54509a2..ae6baf5 100644 --- a/ci/azure-build-and-test.yml +++ b/ci/azure-build-and-test.yml @@ -6,12 +6,12 @@ parameters: default: - name: linux_310 - vmImage: ubuntu-20.04 + vmImage: ubuntu-latest vars: PYTHON_SERIES: "3.10" - name: macos_310 - vmImage: macos-11 + vmImage: macos-latest vars: PYTHON_SERIES: "3.10" diff --git a/ci/zenodo.json5 b/ci/zenodo.json5 index 91a84ee..6e57180 100644 --- a/ci/zenodo.json5 +++ b/ci/zenodo.json5 @@ -30,13 +30,13 @@ ], "language": "eng", "license": "MIT", - "publication_date": "2023-06-18", - "title": "pwkit 1.2.0", + "publication_date": "2024-09-13", + "title": "pwkit 1.2.1", "upload_type": "software", - "version": "1.2.0" + "version": "1.2.1" }, "conceptdoi": "10.5281/zenodo.8052838", - "record_id": "8052937", - "doi": "10.5281/zenodo.8052937", - "bucket_link": "https://zenodo.org/api/files/355c89ba-b49c-4ead-a3bb-2f3055c53d01" + "record_id": "13759572", + "doi": "10.5281/zenodo.13759572", + "bucket_link": "https://zenodo.org/api/files/40de735d-83fa-49e5-916f-48ed93a74ad9" } diff --git a/docs/source/conf.py b/docs/source/conf.py index cb06baa..1bb944c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,7 +11,7 @@ ] project = "pwkit" -release = "1.2.0" # cranko project-version +release = "1.2.1" # cranko project-version version = ".".join(release.split(".")[:2]) copyright = "2015-2023, Peter K. G. Williams and collaborators" diff --git a/pwkit/__init__.py b/pwkit/__init__.py index fff7474..650e65f 100644 --- a/pwkit/__init__.py +++ b/pwkit/__init__.py @@ -9,7 +9,7 @@ __all__ = "Holder PKError binary_type reraise_context text_type unicode_to_str".split() -__version__ = "1.2.0" # cranko project-version +__version__ = "1.2.1" # cranko project-version # Archaic Python 2/3 compatibility support diff --git a/pwkit/lmmin.py b/pwkit/lmmin.py index ab8afaa..f2d3496 100644 --- a/pwkit/lmmin.py +++ b/pwkit/lmmin.py @@ -1328,7 +1328,7 @@ def set_npar(self, npar): p[PI_F_STEP] = 0.0 p[PI_F_MAXSTEP] = np.inf - newinfoo = p = np.ndarray((PI_NUM_O, npar), dtype=np.object) + newinfoo = p = np.ndarray((PI_NUM_O, npar), dtype=object) p[PI_O_TIEFUNC] = None newinfob = p = np.ndarray(npar, dtype=int) diff --git a/pwkit/parallel.py b/pwkit/parallel.py index acb589e..8b5aa37 100644 --- a/pwkit/parallel.py +++ b/pwkit/parallel.py @@ -272,7 +272,7 @@ def __init__(self, chunksize=None): pass def get_map(self): - return VacuousContextManager(map) + return VacuousContextManager(lambda f, v: [f(x) for x in v]) def get_ppmap(self): return VacuousContextManager(serial_ppmap) diff --git a/setup.py b/setup.py index 6300b43..187c333 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def get_long_desc(): setup( name="pwkit", # cranko project-name - version="1.2.0", # cranko project-version + version="1.2.1", # cranko project-version # This package actually *is* zip-safe, but I've run into issues with # installing it as a Zip: in particular, the install sometimes fails with # "bad local file header", and reloading a module after a reinstall in