Skip to content

Commit

Permalink
Merge pull request #582 from desihub/remove-desitest
Browse files Browse the repository at this point in the history
Remove DesiTest
  • Loading branch information
sbailey authored Feb 3, 2025
2 parents 500d9a7 + ce7d3eb commit 8f98e53
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 67 deletions.
66 changes: 34 additions & 32 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,40 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: [3.8] # fitsio does not like Python < 3.7, astropy does not like Python < 3.8, might be too soon for 3.9.
astropy-version: ['==4.0.1.post1', '==5.0'] # everest & fuji versions
fitsio-version: ['==1.1.2', '==1.1.6'] # everest & fuji versions
numpy-version: ['<1.23'] # to keep asscalar, used by astropy
os: [ubuntu-22.04]
python-version: ['3.10']
astropy-version: ['<6.1'] # Compatilbilty with desiconda 20240425-2.2.0.
fitsio-version: ['==1.2.1', '<2']
numpy-version: ['<1.23'] # Compatilbilty with desiconda 20240425-2.2.0.
env:
DESIUTIL_VERSION: 3.2.3
DESIUTIL_VERSION: 3.4.3
# DESIMODEL: ${GITHUB_WORKSPACE}/desimodel
DESIMODEL_DATA: branches/test-0.18
# DESISIM: ${GITHUB_WORKSPACE}/desisim
DESISIM_TESTDATA_VERSION: main
# DESI_ROOT: ${DESISIM}/desi
# DESI_BASIS_TEMPLATES: ${DESI_ROOT}/spectro/templates/basis_templates/v3.2
SIMQSO_VERSION: v1.2.4
SIMQSO_REPO: desihub
SIMQSO_VERSION: main

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade pip setuptools wheel
python -m pip install pytest
python -m pip install git+https://github.com/desihub/desiutil.git@${DESIUTIL_VERSION}#egg=desiutil
python -m pip install -r requirements.txt
python -m pip install -U 'numpy${{ matrix.numpy-version }}'
python -m pip install -U 'astropy${{ matrix.astropy-version }}'
# python -m pip install git+https://github.com/imcgreer/simqso.git@${SIMQSO_VERSION}#egg=simqso
python -m pip install git+https://github.com/desihub/simqso.git@main#egg=simqso
python -m pip install git+https://github.com/${SIMQSO_REPO}/simqso.git@${SIMQSO_VERSION}#egg=simqso
python -m pip cache remove fitsio
python -m pip install --no-deps --force-reinstall --ignore-installed 'fitsio${{ matrix.fitsio-version }}'
- name: Verify Installation
Expand All @@ -71,38 +71,40 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: [3.8]
fitsio-version: ['==1.1.6'] # fuji version
numpy-version: ['<1.23'] # to keep asscalar, used by astropy
os: [ubuntu-22.04]
python-version: ['3.10']
astropy-version: ['<6.1'] # Compatilbilty with desiconda 20240425-2.2.0.
fitsio-version: ['<2']
numpy-version: ['<1.23'] # Compatilbilty with desiconda 20240425-2.2.0.
env:
DESIUTIL_VERSION: 3.2.3
DESIUTIL_VERSION: 3.4.3
# DESIMODEL: ${GITHUB_WORKSPACE}/desimodel
DESIMODEL_DATA: branches/test-0.17
DESIMODEL_DATA: branches/test-0.18
# DESISIM: ${GITHUB_WORKSPACE}/desisim
DESISIM_TESTDATA_VERSION: main
# DESI_ROOT: ${DESISIM}/desi
# DESI_BASIS_TEMPLATES: ${DESI_ROOT}/spectro/templates/basis_templates/v3.2
SIMQSO_VERSION: v1.2.4
SIMQSO_REPO: desihub
SIMQSO_VERSION: main

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade pip setuptools wheel
python -m pip install pytest pytest-cov coveralls
python -m pip install git+https://github.com/desihub/desiutil.git@${DESIUTIL_VERSION}#egg=desiutil
python -m pip install -r requirements.txt
python -m pip install -U 'numpy${{ matrix.numpy-version }}'
# python -m pip install git+https://github.com/imcgreer/simqso.git@${SIMQSO_VERSION}#egg=simqso
python -m pip install git+https://github.com/desihub/simqso.git@main#egg=simqso
python -m pip install -U 'astropy${{ matrix.astropy-version }}'
python -m pip install git+https://github.com/${SIMQSO_REPO}/simqso.git@${SIMQSO_VERSION}#egg=simqso
python -m pip cache remove fitsio
python -m pip install --no-deps --force-reinstall --ignore-installed 'fitsio${{ matrix.fitsio-version }}'
- name: Verify Installation
Expand Down Expand Up @@ -130,19 +132,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: ['3.10']

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip wheel Sphinx
run: python -m pip install --upgrade pip wheel setuptools Sphinx sphinx-rtd-theme
- name: Test the documentation
run: sphinx-build -W --keep-going -b html doc doc/_build/html

Expand All @@ -153,19 +155,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: ['3.10']

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip wheel pycodestyle
run: python -m pip install --upgrade pip setuptools wheel pycodestyle
- name: Test the style; failures are allowed
# This is equivalent to an allowed falure.
continue-on-error: true
Expand Down
38 changes: 9 additions & 29 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.

from __future__ import absolute_import, division, print_function, unicode_literals

import sys
import os
import os.path
from importlib import import_module
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -27,17 +23,6 @@

# If your documentation needs a minimal Sphinx version, state it here.

try:
import sphinx.ext.napoleon
napoleon_extension = 'sphinx.ext.napoleon'
except ImportError:
try:
import sphinxcontrib.napoleon
napoleon_extension = 'sphinxcontrib.napoleon'
needs_sphinx = '1.2'
except ImportError:
needs_sphinx = '1.3'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand All @@ -47,18 +32,18 @@
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
'sphinx_rtd_theme'
]

# Configuration for intersphinx, copied from astropy.
intersphinx_mapping = {
'python': ('http://docs.python.org/', None),
# 'python3': ('http://docs.python.org/3/', path.abspath(path.join(path.dirname(__file__), 'local/python3links.inv'))),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.org/', None),
'astropy': ('http://docs.astropy.org/en/stable/', None),
'h5py': ('http://docs.h5py.org/en/latest/', None)
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'astropy': ('https://docs.astropy.org/en/stable/', None),
'h5py': ('https://docs.h5py.org/en/latest/', None)
}

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -147,12 +132,7 @@
# a list of builtin themes.
#html_theme = 'default'
#html_theme = 'haiku'
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
pass
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
17 changes: 13 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# numpy<1.20
pytz
requests
astropy==5.0
numba
# Ensure scipy dependency does not bring in a recent version of numpy.
scipy<1.9
# The version of astropy will be reset by GitHub Actions tests.
astropy
# Ensure compatibility with numpy <1.23.
numba<0.60
# Ensure compatibility with numpy <1.23.
matplotlib<3.9
healpy
# It is becoming difficult to install speclite and specsim directly from
# git+https, so installing from PyPI is definitely preferred here.
speclite
specsim
# The version of fitsio will be reset by GitHub Actions tests.
fitsio
# Install desiutil separately since it is needed for the other installs.
# git+https://github.com/desihub/[email protected]#egg=desiutil
Expand All @@ -14,6 +23,6 @@ git+https://github.com/desihub/[email protected]#egg=desimodel
git+https://github.com/desihub/[email protected]#egg=desispec
# git+https://github.com/desihub/[email protected]#egg=desitarget
git+https://github.com/desihub/desitarget.git@main#egg=desitarget
git+https://github.com/desihub/specsim.git@main#egg=specsim
# git+https://github.com/desihub/specsim.git@main#egg=specsim
# simqso install script requires numpy, so install separately.
# git+https://github.com/imcgreer/[email protected]#egg=simqso
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# DESI support code.
#
from desiutil.setup import DesiTest, DesiVersion, get_version
from desiutil.setup import DesiVersion, get_version
#
# Begin setup
#
Expand Down Expand Up @@ -55,7 +55,7 @@
setup_keywords['zip_safe'] = False
setup_keywords['packages'] = find_packages('py')
setup_keywords['package_dir'] = {'':'py'}
setup_keywords['cmdclass'] = {'version': DesiVersion, 'test': DesiTest, 'sdist': DistutilsSdist}
setup_keywords['cmdclass'] = {'version': DesiVersion, 'sdist': DistutilsSdist}
setup_keywords['test_suite']='{name}.test.test_suite'.format(**setup_keywords)
#
# Autogenerate command-line scripts.
Expand Down

0 comments on commit 8f98e53

Please sign in to comment.