Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ distribute-*.tar.gz

# Mac OSX
.DS_Store

saba/version.py
pip-wheel-metadata/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

15 changes: 11 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
conda:
file: .rtd-environment.yml
version: 2

build:
image: latest

python:
setup_py_install: true
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
- all

# Don't build any extra formats
formats: []
211 changes: 108 additions & 103 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
language: c
language: python

# We need a full clone to make sure setuptools_scm works properly
git:
depth: false

os:
- linux

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false

# The apt packages below are needed for sphinx builds. A full list of packages
# that can be included can be found here:
#
Expand All @@ -18,140 +16,147 @@ addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
- gfortran


stages:
# Do the style check and a single test job, don't proceed if it fails
- name: Initial tests
# Test docs, astropy dev, and without optional dependencies
- name: Comprehensive tests
# These will only run when cron is opted in
- name: Cron tests
if: type = cron


env:
global:

# The following versions are the 'default' for tests, unless
# overridden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- PYTHON_VERSION=3.7
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- MAIN_CMD='python setup.py'
- SETUP_CMD='test'
- EVENT_TYPE='pull_request push'


# For this package-template, we include examples of Cython modules,
# so Cython is required for testing. If your package does not include
# Cython code, you can set CONDA_DEPENDENCIES=''
- CONDA_DEPENDENCIES='Cython sherpa'
- CONDA_DEPENDENCIES_DOC='Cython sphinx-astropy sherpa'

# List other runtime dependencies for the package that are available as
# pip packages here.
- PIP_DEPENDENCIES=''

# Conda packages for affiliated packages are hosted in channel
# "astropy" while builds for astropy LTS with recent numpy versions
# are in astropy-ci-extras. If your package uses either of these,
# add the channels to CONDA_CHANNELS along with any other channels
# you want to use.
- CONDA_CHANNELS='astropy-ci-extras astropy sherpa'

# If there are matplotlib or other GUI tests, uncomment the following
# line to use the X virtual framebuffer.
# - SETUP_XVFB=True

# If you want to ignore certain flake8 errors, you can list them
# in FLAKE8_OPT, for example:
# - FLAKE8_OPT='--ignore=E501'
- FLAKE8_OPT=''

matrix:
# Make sure that egg_info works without dependencies
- PYTHON_VERSION=3.7 SETUP_CMD='egg_info'
- gfortran

# The following three variables are for tox. TOXENV is a standard
# variable that tox uses to determine the environment to run,
# TOXARGS are arguments passed to tox, and TOXPOSARGS are arguments
# that tox passes through to the {posargs} indicator in tox.ini.
# The latter can be used for example to pass arguments to pytest.
- TOXENV='test'
- TOXARGS='-v'
- TOXPOSARGS=''

# The following is needed to avoid issues if e.g. Matplotlib tries
# to open a GUI window.
- SETUP_XVFB=True

matrix:

# Don't wait for allowed failures
fast_finish: true

include:
# Try MacOS X

# Try MacOS X, usually enough only to run from cron as hardly there are
# issues that are not picked up by a linux worker. We set language to
# 'c' since 'python' doesn't work on non-Linux platforms.
- os: osx
env: SETUP_CMD='test'
language: c
name: Python 3.7 with required dependencies
stage: Cron tests
env: PYTHON_VERSION=3.7 TOXENV=py37-test

# Do a coverage test.
# Do a regular build on Linux with Python 3.8, with cov
# For Linux we use language: python to avoid using conda.
- os: linux
env: SETUP_CMD='test --coverage'
python: 3.8
name: Python 3.8 with required dependencies and measure coverage
stage: Initial tests
env: TOXENV=py38-test-cov

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
# Check for sphinx doc build warnings
- os: linux
env: SETUP_CMD='build_docs -w'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_DOC
python: 3.8
name: Documentation build
stage: Comprehensive tests
env: TOXENV=build_docs

# Now try Astropy dev with the latest Python and LTS with Python 2.7 and 3.x.
# Now try Astropy dev with the latest Python
- os: linux
env: ASTROPY_VERSION=development
EVENT_TYPE='pull_request push cron'
- os: linux
env: ASTROPY_VERSION=lts
python: 3.8
name: Python 3.8 with developer version of astropy
stage: Comprehensive tests
env: TOXENV=py38-test-devdeps

# Try all python versions and Numpy versions. Since we can assume that
# And with an older Python, Astropy LTS, and the oldest supported Numpy
- os: linux
python: 3.6
name: Python 3.6 astropy LTS and Numpy 1.16
stage: Comprehensive tests
env: TOXENV=py36-test-astropylts-numpy116

# Add a job that runs from cron only and tests against astropy dev and
# numpy dev to give a change for early discovery of issues and feedback
# for both developer teams.
- os: linux
python: 3.8
name: Python 3.8 latest developer version of key dependencies
stage: Cron tests
env: TOXENV=py38-test-devdeps

# Try on Windows.
# Sherpa does not support windows, so we don't test on windows
# - os: windows
# language: c
# name: Python 3.8 with required dependencies
# stage: Comprehensive tests
# env: PYTHON_VERSION=3.8 TOXENV=py38-test

# Try other python versions and Numpy versions. Since we can assume that
# the Numpy developers have taken care of testing Numpy with different
# versions of Python, we can vary Python and Numpy versions at the same
# time.

- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.12
- os: linux
env: PYTHON_VERSION=3.6 NUMPY_VERSION=1.13
- os: linux
env: NUMPY_VERSION=1.14

# Try numpy dev
- os: linux
env: NUMPY_VERSION=dev
EVENT_TYPE='pull_request push cron'
python: 3.7
name: Python 3.7 with astropy 3.0 and Numpy 1.17
stage: Comprehensive tests
env: TOXENV=py37-test-astropy30-numpy117

# Do a PEP8 test with flake8
# Do a code style check
- os: linux
env: MAIN_CMD='flake8 packagename --count --show-source --statistics $FLAKE8_OPT' SETUP_CMD=''
python: 3.8
name: Code style checks
stage: Initial tests
env: TOXENV=codestyle

allow_failures:
# Do a PEP8 test with flake8
# (allow to fail unless your code completely compliant)
# (do allow to fail unless your code completely compliant)
- os: linux
env: MAIN_CMD='flake8 packagename --count --show-source --statistics $FLAKE8_OPT' SETUP_CMD=''
python: 3.8
name: Code style checks
stage: Initial tests
env: TOXENV=codestyle

install:

# We now use the ci-helpers package to set up our testing environment.
# This is done by using Miniconda and then using conda and pip to install
# dependencies. Which dependencies are installed using conda and pip is
# determined by the CONDA_DEPENDENCIES and PIP_DEPENDENCIES variables,
# which should be space-delimited lists of package names. See the README
# in https://github.com/astropy/ci-helpers for information about the full
# list of environment variables that can be used to customize your
# environment. In some cases, ci-helpers may not offer enough flexibility
# in how to install a package, in which case you can have additional
# commands in the install: section below.

- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh

# As described above, using ci-helpers, you should be able to set up an
# environment with dependencies installed using conda and pip, but in some
# cases this may not provide enough flexibility in how to install a
# specific dependency (and it will not be able to install non-Python
# dependencies). Therefore, you can also include commands below (as
# well as at the start of the install section or in the before_install
# section if they are needed before setting up conda) to install any
# other dependencies.
# We now use the ci-helpers package to set up our Python environment
# on Windows and MacOS X but we don't set up any other dependencies,
# instead using tox to do this. See https://github.com/astropy/ci-helpers
# for more information about ci-helpers.

- if [[ $TRAVIS_OS_NAME != linux ]]; then
git clone --depth 1 git://github.com/astropy/ci-helpers.git;
source ci-helpers/travis/setup_conda.sh;
fi

script:
- $MAIN_CMD $SETUP_CMD
- pip install tox
- tox $TOXARGS -- $TOXPOSARGS

after_success:
- if [[ $SETUP_CMD == *coverage* ]]; then coveralls --rcfile='saba/tests/coveragerc'; fi

notifications:
email: false
# If coveralls.io is set up for this package, uncomment the two lines below.
pip install coveralls
coveralls
# If codecov is set up for this package, uncomment the two lines below
# pip install codecov
# codecov
32 changes: 3 additions & 29 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,42 +1,16 @@
include README.rst
include CHANGES.rst

include ez_setup.py
include ah_bootstrap.py
include setup.cfg
include LICENSE.rst
include pyproject.toml

recursive-include *.pyx *.c *.pxd
recursive-include saba *.pyx *.c *.pxd
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *

prune build
prune docs/_build
prune docs/api


# the next few stanzas are for astropy_helpers. It's derived from the
# astropy_helpers/MANIFEST.in, but requires additional includes for the actual
# package directory and egg-info.

include astropy_helpers/README.rst
include astropy_helpers/CHANGES.rst
include astropy_helpers/LICENSE.rst
recursive-include astropy_helpers/licenses *

include astropy_helpers/ez_setup.py
include astropy_helpers/ah_bootstrap.py

recursive-include astropy_helpers/astropy_helpers *.py *.pyx *.c *.h
recursive-include astropy_helpers/astropy_helpers.egg-info *
# include the sphinx stuff with "*" because there are css/html/rst/etc.
recursive-include astropy_helpers/astropy_helpers/sphinx *

prune astropy_helpers/build
prune astropy_helpers/astropy_helpers/tests


global-exclude *.pyc *.o

include saba/tests/coveragerc
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SABA is a code to brigde astropy and and Sherpa modelling and fitting. Both
packages provide a a modelling and fitting framework that is in principle
compatible, but uses different APIs. SABA translates between the two packages,
so that e.g. sherpa models and fitters cna be used inside the astropy modelling
framework.
Loading