From 44aa90985d46d8eb8e64134c5ca37e5746eca892 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 20 Jul 2023 21:33:03 -0400 Subject: [PATCH 1/6] pwkit/lmmin.py: avoid yet another deprecated Numpy API --- pwkit/lmmin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 4d051d9af238b360f00570e9134ff9b49d308b5c Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 17 Aug 2023 12:33:35 -0400 Subject: [PATCH 2/6] Update ReadTheDocs config to get them building again --- .readthedocs.yml | 11 +++++++++-- .readthedocs_env.yml | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .readthedocs_env.yml 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..b27e536 --- /dev/null +++ b/.readthedocs_env.yml @@ -0,0 +1,16 @@ +name: pwkit_rtd +channels: + - conda-forge + +dependencies: + - astropy + - mock + - numpydoc + - pandas + - pip + - python =3.10 + - scipy + - setuptools + - sphinx + - sphinx_rtd_theme + - sphinx-automodapi From 98512a37b001c72601211c691ba3662a073eccc1 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 13 Sep 2024 09:14:45 -0400 Subject: [PATCH 3/6] pwkit/parallel.py: a fix for Python 3 --- pwkit/parallel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From eff963975580292528ae47adad5831166745ec6e Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 13 Sep 2024 09:19:06 -0400 Subject: [PATCH 4/6] README.md: fix some ReadTheDocs links --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 90c307b68e25ab8eb4933c0785ccd044da6ad730 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 13 Sep 2024 09:20:04 -0400 Subject: [PATCH 5/6] ci/azure-build-and-test.yml: just use "latest" VM images --- ci/azure-build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" From d455cfb66bc7bd49d7fd0b8222acbeda8e684629 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 13 Sep 2024 09:28:37 -0400 Subject: [PATCH 6/6] .readthedocs_env.yml: work around sphinx-automodapi package issue --- .readthedocs_env.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.readthedocs_env.yml b/.readthedocs_env.yml index b27e536..07e7f26 100644 --- a/.readthedocs_env.yml +++ b/.readthedocs_env.yml @@ -8,9 +8,13 @@ dependencies: - numpydoc - pandas - pip - - python =3.10 + - python =3.12 - scipy - setuptools - sphinx - sphinx_rtd_theme - - sphinx-automodapi + # 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