From e5d00a5ceb9191cf02192a3b97e21fd8928e48bc Mon Sep 17 00:00:00 2001 From: Benjamin Alan Weaver Date: Thu, 1 Aug 2024 16:21:15 -0700 Subject: [PATCH] tweaking tests --- .github/workflows/python-package.yml | 10 +++++----- docs/conf.py | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cc48c0d..c29d1ac 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -19,11 +19,11 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] # Add more os? - python-version: [3.8, 3.9] + python-version: ['3.8', '3.9'] astropy-version: ['<5.0', '<5.1'] numpy-version: ['<1.20', '<1.21', '<1.22'] scipy-version: ['<1.6', '<1.7'] - matplotlib-version: ['<3.4', '<3.5'] + matplotlib-version: ['<3.3'] # '<3.4', '<3.5'] steps: - name: Checkout code @@ -70,8 +70,8 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip wheel setuptools - python -m pip install pytest pytest-astropy coveralls - python -m pip install pyyaml numpy\<1.21 scipy\<1.6 matplotlib\<3.3 astropy\<5.0 + python -m pip install pytest pytest-astropy pyyaml coveralls + python -m pip install numpy\<1.21 scipy\<1.6 matplotlib\<3.3 astropy\<5.0 - name: Run the test with coverage run: pytest --cov @@ -105,7 +105,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip wheel setuptools Sphinx\<8 - python -m pip install sphinx-astropy + python -m pip install -e .[docs] - name: Test the documentation run: sphinx-build -W --keep-going -b html docs docs/_build/html diff --git a/docs/conf.py b/docs/conf.py index 445fee2..7e2f9c7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ import datetime import os import sys +from importlib import import_module try: import astropy_helpers @@ -84,7 +85,7 @@ # |version| and |release|, also used in various other places throughout the # built documents. -__import__(setup_cfg['package_name']) +import_module(setup_cfg['package_name']) package = sys.modules[setup_cfg['package_name']] # The short X.Y version.