From 4c3ed9bf111592f235d57610794deb1dc7a0d4ec Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 1 Jun 2023 18:25:33 -0400 Subject: [PATCH 01/15] TST: Update URL for Scientific Python nightlies --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5a218f55..d22e2d2b 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ requires = pip >= 19.3.1 isolated_build = true indexserver = - NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple + NIGHTLY = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple [testenv] # Suppress display of matplotlib plots generated during docs build From b064a76d8ee922896cabe9bf57f684d9ce2ba5d0 Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Thu, 28 Sep 2023 01:18:52 +0200 Subject: [PATCH 02/15] remove Python2 crumbs, dependency on six --- astroplan/constraints.py | 3 --- astroplan/exceptions.py | 2 -- astroplan/moon.py | 3 --- astroplan/observer.py | 5 +---- astroplan/periodic.py | 2 -- astroplan/plots/finder.py | 2 -- astroplan/plots/mplstyles.py | 3 --- astroplan/plots/tests/test_sky.py | 2 -- astroplan/plots/time_dependent.py | 2 -- astroplan/scheduling.py | 17 +++++++---------- astroplan/target.py | 2 -- astroplan/tests/test_constraints.py | 2 -- astroplan/tests/test_moon.py | 3 --- astroplan/tests/test_observer.py | 2 -- astroplan/tests/test_periodic.py | 3 --- astroplan/tests/test_scheduling.py | 2 -- astroplan/tests/test_target.py | 2 -- astroplan/tests/test_utils.py | 3 --- astroplan/utils.py | 2 -- docs/conf.py | 2 +- docs/faq/iers.rst | 2 +- docs/installation.rst | 2 +- docs/tutorials/constraints.rst | 3 --- setup.cfg | 1 - 24 files changed, 11 insertions(+), 61 deletions(-) diff --git a/astroplan/constraints.py b/astroplan/constraints.py index f9857fe9..5e95f431 100644 --- a/astroplan/constraints.py +++ b/astroplan/constraints.py @@ -4,9 +4,6 @@ an observer. """ -from __future__ import (absolute_import, division, print_function, - unicode_literals) - # Standard library from abc import ABCMeta, abstractmethod import datetime diff --git a/astroplan/exceptions.py b/astroplan/exceptions.py index 46710f5c..5221b367 100644 --- a/astroplan/exceptions.py +++ b/astroplan/exceptions.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) from astropy.utils.exceptions import AstropyWarning diff --git a/astroplan/moon.py b/astroplan/moon.py index 10aef507..3b2bd467 100644 --- a/astroplan/moon.py +++ b/astroplan/moon.py @@ -3,9 +3,6 @@ This version of the `moon` module calculates lunar phase angle for a geocentric """ -from __future__ import (absolute_import, division, print_function, - unicode_literals) - # Third-party import numpy as np from astropy.coordinates import get_sun, get_body diff --git a/astroplan/observer.py b/astroplan/observer.py index 03f148dc..0217ea6c 100644 --- a/astroplan/observer.py +++ b/astroplan/observer.py @@ -1,7 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) -from six import string_types # Standard library import sys @@ -216,7 +213,7 @@ def __init__(self, location=None, timezone='UTC', name=None, latitude=None, # Accept various timezone inputs, default to UTC if isinstance(timezone, datetime.tzinfo): self.timezone = timezone - elif isinstance(timezone, string_types): + elif isinstance(timezone, str): self.timezone = pytz.timezone(timezone) else: raise TypeError('timezone keyword should be a string, or an ' diff --git a/astroplan/periodic.py b/astroplan/periodic.py index 44038b97..74fb5105 100644 --- a/astroplan/periodic.py +++ b/astroplan/periodic.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import numpy as np import astropy.units as u from astropy.time import Time diff --git a/astroplan/plots/finder.py b/astroplan/plots/finder.py index 14a86cb8..58ca4034 100644 --- a/astroplan/plots/finder.py +++ b/astroplan/plots/finder.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import numpy as np diff --git a/astroplan/plots/mplstyles.py b/astroplan/plots/mplstyles.py index 5d93f42e..cc8f7e50 100644 --- a/astroplan/plots/mplstyles.py +++ b/astroplan/plots/mplstyles.py @@ -1,7 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) - import copy from astropy.visualization import astropy_mpl_style diff --git a/astroplan/plots/tests/test_sky.py b/astroplan/plots/tests/test_sky.py index 7ad41bab..d7123e1e 100644 --- a/astroplan/plots/tests/test_sky.py +++ b/astroplan/plots/tests/test_sky.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import pytest try: diff --git a/astroplan/plots/time_dependent.py b/astroplan/plots/time_dependent.py index aca3296e..e30e9874 100644 --- a/astroplan/plots/time_dependent.py +++ b/astroplan/plots/time_dependent.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import copy import numpy as np import operator diff --git a/astroplan/scheduling.py b/astroplan/scheduling.py index 32f49273..8fda4a2b 100644 --- a/astroplan/scheduling.py +++ b/astroplan/scheduling.py @@ -3,9 +3,6 @@ Tools for scheduling observations. """ -from __future__ import (absolute_import, division, print_function, - unicode_literals) - import copy from abc import ABCMeta, abstractmethod @@ -24,7 +21,7 @@ 'Transitioner', 'Scorer'] -class ObservingBlock(object): +class ObservingBlock: """ An observation to be scheduled, consisting of a target and associated constraints on observations. @@ -98,7 +95,7 @@ def from_exposures(cls, target, priority, time_per_exposure, return ob -class Scorer(object): +class Scorer: """ Returns scores and score arrays from the evaluation of constraints on observing blocks @@ -166,7 +163,7 @@ def from_start_end(cls, blocks, observer, start_time, end_time, return sc -class TransitionBlock(object): +class TransitionBlock: """ Parameterizes the "dead time", e.g. between observations, while the telescope is slewing, instrument is reconfiguring, etc. @@ -224,7 +221,7 @@ def from_duration(cls, duration): return tb -class Schedule(object): +class Schedule: """ An object that represents a schedule, consisting of a list of `~astroplan.scheduling.Slot` objects. @@ -423,7 +420,7 @@ def change_slot_block(self, slot_index, new_block=None): return slot_index - 1 -class Slot(object): +class Slot: """ A time slot consisting of a start and end time """ @@ -481,7 +478,7 @@ def split_slot(self, early_time, later_time): return [new_slot] -class Scheduler(object): +class Scheduler: """ Schedule a set of `~astroplan.scheduling.ObservingBlock` objects """ @@ -948,7 +945,7 @@ def attempt_insert_block(self, b, new_start_time, start_time_idx): return True -class Transitioner(object): +class Transitioner: """ A class that defines how to compute transition times from one block to another. diff --git a/astroplan/target.py b/astroplan/target.py index 8a05dfca..e42fedb9 100644 --- a/astroplan/target.py +++ b/astroplan/target.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) # Standard library from abc import ABCMeta diff --git a/astroplan/tests/test_constraints.py b/astroplan/tests/test_constraints.py index c0f66f39..0084c159 100644 --- a/astroplan/tests/test_constraints.py +++ b/astroplan/tests/test_constraints.py @@ -1,5 +1,3 @@ -from __future__ import (absolute_import, division, print_function, - unicode_literals) import datetime as dt import numpy as np diff --git a/astroplan/tests/test_moon.py b/astroplan/tests/test_moon.py index 9e105740..a71457cb 100644 --- a/astroplan/tests/test_moon.py +++ b/astroplan/tests/test_moon.py @@ -1,7 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) - from ..observer import Observer from astropy.time import Time from astropy.coordinates import EarthLocation diff --git a/astroplan/tests/test_observer.py b/astroplan/tests/test_observer.py index c52f2f2f..3c2e87a7 100644 --- a/astroplan/tests/test_observer.py +++ b/astroplan/tests/test_observer.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) # Standard library import datetime diff --git a/astroplan/tests/test_periodic.py b/astroplan/tests/test_periodic.py index 5cd2f867..2c3ded0b 100644 --- a/astroplan/tests/test_periodic.py +++ b/astroplan/tests/test_periodic.py @@ -1,6 +1,3 @@ -from __future__ import (absolute_import, division, print_function, - unicode_literals) - import numpy as np from astropy.time import Time import astropy.units as u diff --git a/astroplan/tests/test_scheduling.py b/astroplan/tests/test_scheduling.py index 49d88627..ff09cb7a 100644 --- a/astroplan/tests/test_scheduling.py +++ b/astroplan/tests/test_scheduling.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import numpy as np from astropy.time import Time diff --git a/astroplan/tests/test_target.py b/astroplan/tests/test_target.py index 208a0a12..582edebd 100644 --- a/astroplan/tests/test_target.py +++ b/astroplan/tests/test_target.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) import pytest diff --git a/astroplan/tests/test_utils.py b/astroplan/tests/test_utils.py index 97f1fc18..9eff73a5 100644 --- a/astroplan/tests/test_utils.py +++ b/astroplan/tests/test_utils.py @@ -1,7 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) - import numpy as np import pytest diff --git a/astroplan/utils.py b/astroplan/utils.py index 0db34468..4d4524cf 100644 --- a/astroplan/utils.py +++ b/astroplan/utils.py @@ -1,6 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) # Standard library import warnings diff --git a/docs/conf.py b/docs/conf.py index 7a9c7d7c..a2817fbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -227,4 +227,4 @@ # continue # dtype, target = line.split(None, 1) # target = target.strip() -# nitpick_ignore.append((dtype, six.u(target))) +# nitpick_ignore.append((dtype, str(target))) diff --git a/docs/faq/iers.rst b/docs/faq/iers.rst index 3a1c0654..ecce8613 100644 --- a/docs/faq/iers.rst +++ b/docs/faq/iers.rst @@ -78,7 +78,7 @@ astropy's IERS machinery: import numpy as np import astropy.units as u from astropy.time import Time - from six.moves.urllib.error import HTTPError + from urllib.error import HTTPError # Download and cache the IERS Bulletins A and B using astropy's machinery # (reminder: astroplan has its own function for this: `download_IERS_A`) diff --git a/docs/installation.rst b/docs/installation.rst index 12826f85..43fffb67 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,7 +10,7 @@ Requirements ============ **astroplan** works on Linux, Mac OS X and Windows. -It requires Python 3.7+ as well as numpy, astropy, pytz, and six. +It requires Python 3.7+ as well as numpy, astropy, and pytz. Additional features are available when you install `Matplotlib`_ and `astroquery`_. diff --git a/docs/tutorials/constraints.rst b/docs/tutorials/constraints.rst index ceb0ef3f..3e2c259b 100644 --- a/docs/tutorials/constraints.rst +++ b/docs/tutorials/constraints.rst @@ -259,9 +259,6 @@ satisfied. .. plot:: - from __future__ import (absolute_import, division, print_function, - unicode_literals) - from astroplan import (FixedTarget, Observer, AltitudeConstraint, AtNightConstraint, MoonSeparationConstraint) from astropy.time import Time diff --git a/setup.cfg b/setup.cfg index 3c8d3693..d494d6c1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,6 @@ install_requires = numpy>=1.17 astropy>=4 pytz - six [options.extras_require] all = From 300af36614d43c19bf277f9f0aca8242aee8f3bc Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Thu, 4 Apr 2024 20:22:31 -0400 Subject: [PATCH 03/15] compatibility with astropy v6.0 --- CHANGES.rst | 1 + astroplan/__init__.py | 29 +++++++++++++---------------- astroplan/_astropy_init.py | 25 ------------------------- 3 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 astroplan/_astropy_init.py diff --git a/CHANGES.rst b/CHANGES.rst index 449e7f44..71a51ec5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,7 @@ 0.10 (unreleased) ----------------- +- Fix compatibility with astropy v6.0. 0.9.1 (2023-09-20) ------------------ diff --git a/astroplan/__init__.py b/astroplan/__init__.py index ceb480f5..c5ce9258 100644 --- a/astroplan/__init__.py +++ b/astroplan/__init__.py @@ -12,21 +12,18 @@ * Docs: https://astroplan.readthedocs.io/ """ -# Affiliated packages may add whatever they like to this file, but -# should keep this content at the top. -# ---------------------------------------------------------------------------- -from ._astropy_init import * -# ---------------------------------------------------------------------------- +try: + from .version import version as __version__ +except ImportError: + __version__ = '' -# For egg_info test builds to pass, put package imports here. -if not _ASTROPY_SETUP_: - from .utils import * - from .observer import * - from .target import * - from .exceptions import * - from .moon import * - from .constraints import * - from .scheduling import * - from .periodic import * +from .utils import * +from .observer import * +from .target import * +from .exceptions import * +from .moon import * +from .constraints import * +from .scheduling import * +from .periodic import * - download_IERS_A() +download_IERS_A() diff --git a/astroplan/_astropy_init.py b/astroplan/_astropy_init.py deleted file mode 100644 index fa37a637..00000000 --- a/astroplan/_astropy_init.py +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -__all__ = ['__version__'] - -# this indicates whether or not we are in the package's setup.py -try: - _ASTROPY_SETUP_ -except NameError: - import builtins - builtins._ASTROPY_SETUP_ = False - -try: - from .version import version as __version__ -except ImportError: - __version__ = '' - - -if not _ASTROPY_SETUP_: # noqa - import os - - # Create the test function for self test - from astropy.tests.runner import TestRunner - test = TestRunner.make_test_runner_in(os.path.dirname(__file__)) - test.__test__ = False - __all__ += ['test'] From df7f1d39679581fe58c8eaf9201adc0df2bade57 Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Thu, 4 Apr 2024 20:29:36 -0400 Subject: [PATCH 04/15] maxpin numpy --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 3c8d3693..d6bd37d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,7 @@ packages = find: python_requires = >=3.7 setup_requires = setuptools_scm install_requires = - numpy>=1.17 + numpy<2 astropy>=4 pytz six From 16132688aa3a77a070e34e173919448f470b126d Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Thu, 4 Apr 2024 21:00:07 -0400 Subject: [PATCH 05/15] Release v0.10 --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 71a51ec5..d2836336 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -0.10 (unreleased) +0.10 (2024-04-04) ----------------- - Fix compatibility with astropy v6.0. From 3d966a397745ed94f06e6eef3ed82b47a3f49b1c Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Fri, 5 Apr 2024 13:22:33 -0400 Subject: [PATCH 06/15] Back to development --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d2836336..471e74cb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,7 @@ +0.11 (unreleased) +----------------- + + 0.10 (2024-04-04) ----------------- From ffc998a6af3b6de2405104357b1440c8a313de79 Mon Sep 17 00:00:00 2001 From: Russell Kackley Date: Sat, 13 Jul 2024 12:04:26 -0700 Subject: [PATCH 07/15] Fix to issue #555 Update python, numpy, astropy versions in tox.ini --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 5a218f55..d57ebc3b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = - py{37,38,39}-test{,-alldeps,-devdeps}{,-cov} - py{37,38,39}-test-numpy{117,118,119} - py{37,38,39}-test-astropy{lts,41,42} + py{310,311,312}-test{,-alldeps,-devdeps}{,-cov} + py{310,311,312}-test-numpy{123,124,125} + py{310,311,312}-test-astropy{lts,53,60} build_docs linkcheck codestyle From 73acc2e73fe6db963e7f7dafbfbfa0fdd34a5987 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Fri, 26 Jul 2024 10:43:09 -0400 Subject: [PATCH 08/15] Drop wheel from build system requirements The latest documentation from setuptools does not say that this is a recommended or required dependency. --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0889579c..254fa99b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,4 @@ [build-system] requires = ["setuptools", - "setuptools_scm", - "wheel"] + "setuptools_scm"] build-backend = 'setuptools.build_meta' From fd57d63b5ee43af15a5128cdbf3e5736d8ebec35 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Fri, 26 Jul 2024 10:53:28 -0400 Subject: [PATCH 09/15] Support Numpy 1.x and 2.x This reverts commit df7f1d39679581fe58c8eaf9201adc0df2bade57. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d6bd37d7..3c8d3693 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,7 @@ packages = find: python_requires = >=3.7 setup_requires = setuptools_scm install_requires = - numpy<2 + numpy>=1.17 astropy>=4 pytz six From 17d4909e8e37377b2f1e46153a204230b96367b7 Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Tue, 13 Aug 2024 16:08:52 -0400 Subject: [PATCH 10/15] Changelog update for release --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 471e74cb..64f25761 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,10 @@ 0.11 (unreleased) ----------------- +0.10.1 (2024-08-13) +------------------- + +- Compatibility with numpy 2.0. [#587] 0.10 (2024-04-04) ----------------- From d88487a61e5cd17098d86bd54c7b220bbd9ba6d7 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 27 Sep 2024 12:00:18 -0400 Subject: [PATCH 11/15] MNT: Use hash for Action workflow versions and update if needed --- .github/workflows/ci_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index ce3fd144..c735968f 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -63,11 +63,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: fetch-depth: 0 - name: Set up python ${{ matrix.python }} on ${{ matrix.os }} - uses: actions/setup-python@v4 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: ${{ matrix.python }} - name: Install base dependencies From 58a23665387dc8e444bba2bda6e327bbdc84a2ed Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 27 Sep 2024 21:02:30 -0400 Subject: [PATCH 12/15] MNT: Create dependabot.yml for workflow auto updates --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..9c39a860 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: ".github/workflows" # Location of package manifests + schedule: + interval: "monthly" + groups: + actions: + patterns: + - "*" + From 0f80298a968b700b5886a2bc52b8e40038a705dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:37:44 +0000 Subject: [PATCH 13/15] Bump the actions group across 1 directory with 2 updates Bumps the actions group with 2 updates in the /.github/workflows directory: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `actions/setup-python` from 5.2.0 to 5.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/f677139bbe7f9c59b41e40162b753c062f5d49a3...0b93645e9fea7318ecaed2b359559ac225c90a2b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/ci_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index c735968f..fcf497ae 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -63,11 +63,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - name: Set up python ${{ matrix.python }} on ${{ matrix.os }} - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ matrix.python }} - name: Install base dependencies From b04135b1ce3972175f163cc6a96abc9ce2fc2b2e Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:59:28 -1000 Subject: [PATCH 14/15] Fix CI (#602) * Fix ref * Fix another ref --- astroplan/constraints.py | 2 +- astroplan/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/astroplan/constraints.py b/astroplan/constraints.py index 5e95f431..b9f4b12a 100644 --- a/astroplan/constraints.py +++ b/astroplan/constraints.py @@ -237,7 +237,7 @@ def __call__(self, observer, targets, times=None, WHAT HAPPENS WHEN BOTH TIMES AND TIME_RANGE ARE SET? time_range : `~astropy.time.Time` (length = 2) Lower and upper bounds on time sequence. - time_grid_resolution : `~astropy.units.quantity` + time_grid_resolution : `~astropy.units.Quantity` Time-grid spacing grid_times_targets : bool if True, grids the constraint result with targets along the first diff --git a/astroplan/utils.py b/astroplan/utils.py index 4d4524cf..368dd823 100644 --- a/astroplan/utils.py +++ b/astroplan/utils.py @@ -83,7 +83,7 @@ def time_grid_from_range(time_range, time_resolution=0.5*u.hour): time_range : `~astropy.time.Time` (length = 2) Lower and upper bounds on time sequence. - time_resolution : `~astropy.units.quantity` (optional) + time_resolution : `~astropy.units.Quantity` (optional) Time-grid spacing Returns From bf5e26d0697aaaf710d5879322c5793866249d24 Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Tue, 3 Dec 2024 15:27:53 -1000 Subject: [PATCH 15/15] Remove deprecated call to astropy helpers. (#554) * Remove deprecated call to astropy helpers. Closes #553 * Add the warnings-as-errors functionality via pytest options. --------- Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> --- astroplan/tests/test_constraints.py | 6 ++++++ setup.cfg | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/astroplan/tests/test_constraints.py b/astroplan/tests/test_constraints.py index 0084c159..5343c6fa 100644 --- a/astroplan/tests/test_constraints.py +++ b/astroplan/tests/test_constraints.py @@ -174,6 +174,8 @@ def test_galactic_plane_separation(): # in astropy before v1.0.4, a recursion error is triggered by this test @pytest.mark.skipif('APY_LT104') +# astropy.coordinates.errors.NonRotationTransformationWarning +@pytest.mark.filterwarnings("ignore") def test_sun_separation(): time = Time('2003-04-05 06:07:08') apo = Observer.at_site("APO") @@ -198,6 +200,8 @@ def test_sun_separation(): assert np.all(is_constraint_met == [False, True, True]) +# astropy.coordinates.errors.NonRotationTransformationWarning +@pytest.mark.filterwarnings("ignore") def test_moon_separation(): time = Time('2003-04-05 06:07:08') apo = Observer.at_site("APO") @@ -423,6 +427,8 @@ def test_rescale_minmax(): @pytest.mark.parametrize('constraint', constraint_tests) +# astropy.coordinates.errors.NonRotationTransformationWarning +@pytest.mark.filterwarnings("ignore") def test_regression_shapes(constraint): times = Time(["2015-08-28 03:30", "2015-09-05 10:30", "2015-09-15 18:35"]) targets = get_skycoord([FixedTarget(SkyCoord(350.7*u.deg, 18.4*u.deg)), diff --git a/setup.cfg b/setup.cfg index d494d6c1..3cfdd4b2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,6 +47,14 @@ doctest_plus = enabled text_file_format = rst addopts = --doctest-rst --doctest-ignore-import-errors norecursedirs = build docs/_build +filterwarnings = + error + ignore:numpy\.ndarray size changed:RuntimeWarning + ignore:numpy\.ufunc size changed:RuntimeWarning + # Can remove ignore when you bump astropy minversion high enough + ignore:distutils Version classes are deprecated:DeprecationWarning + # deprecated in Matplotlib 3.9 and will be removed in 3.11. Use plot instead. + ignore:The plot_date function was deprecated [coverage:run] omit = @@ -88,4 +96,3 @@ max-line-length = 100 [pycodestyle] exclude = _astropy_init.py,extern,__init__.py max-line-length = 100 -