Skip to content

Commit 47ead75

Browse files
committed
remove astropy-helpers
1 parent 02397ac commit 47ead75

21 files changed

+473
-269
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ sdist
6262
develop-eggs
6363
.installed.cfg
6464
distribute-*.tar.gz
65+
pip-wheel-metadata/
6566

6667
# Other
6768
.*.swp

.readthedocs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.7
8+
install:
9+
- method: pip
10+
path: .
11+
extra_requirements:
12+
- docs
13+
- all
14+
15+
formats: []

.travis.yml

+93-58
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
language: c
1+
language: python
22

3-
# Setting sudo to false opts in to Travis-CI container-based builds.
4-
sudo: false
3+
# We need a full clone to make sure setuptools_scm works properly
4+
git:
5+
depth: false
56

67
os:
78
- linux
@@ -16,8 +17,6 @@ addons:
1617
- libgsl0-dev
1718

1819

19-
stage: Comprehensive tests
20-
2120
stages:
2221
# Do the style check and a single test job, don't proceed if it fails
2322
- name: Initial tests
@@ -30,99 +29,135 @@ stages:
3029

3130
env:
3231
global:
32+
3333
# The following versions are the 'default' for tests, unless
34-
# overidden underneath. They are defined here in order to save having
34+
# overridden underneath. They are defined here in order to save having
3535
# to repeat them for all configurations.
36-
- PYTHON_VERSION=3.7
37-
- MAIN_CMD='python setup.py'
38-
- NUMPY_VERSION=stable
39-
- ASTROPY_VERSION=stable
40-
- SETUP_CMD='test'
41-
- CONDA_DEPENDENCIES='cython scipy matplotlib pyyaml h5py sympy numexpr'
42-
- CONDA_DEPENDENCIES_DOC="${CONDA_DEPENDENCIES} jinja2 ipython jupyter notebook ipykernel"
43-
- PIP_DEPENDENCIES=''
44-
- PIP_DEPENDENCIES_DOC="${PIP_DEPENDENCIES} nbsphinx tqdm sphinx-astropy"
45-
- CONDA_CHANNELS='astropy-ci-extras astropy'
46-
47-
# If there are matplotlib or other GUI tests, uncomment the following
48-
# line to use the X virtual framebuffer.
49-
- SETUP_XVFB=True
5036

51-
# If you want to ignore certain flake8 errors, you can list them
52-
# in FLAKE8_OPT, for example:
53-
# - FLAKE8_OPT='--ignore=E501'
54-
- FLAKE8_OPT=''
37+
# The following three variables are for tox. TOXENV is a standard
38+
# variable that tox uses to determine the environment to run,
39+
# TOXARGS are arguments passed to tox, and TOXPOSARGS are arguments
40+
# that tox passes through to the {posargs} indicator in tox.ini.
41+
# The latter can be used for example to pass arguments to pytest.
42+
- TOXENV='test'
43+
- TOXARGS='-v'
44+
- TOXPOSARGS=''
45+
46+
# The following is needed to avoid issues if e.g. Matplotlib tries
47+
# to open a GUI window.
48+
- SETUP_XVFB=True
5549

5650
matrix:
5751

5852
# Don't wait for allowed failures
5953
fast_finish: true
6054

6155
include:
62-
# Make sure that egg_info works without dependencies
63-
- stage: Initial tests
64-
env: PYTHON_VERSION=3.7 SETUP_CMD='egg_info'
6556

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

72-
# Do a coverage test.
66+
# Do a regular build on Linux with Python 3.8, with cov
67+
# For Linux we use language: python to avoid using conda.
7368
- os: linux
69+
python: 3.8
70+
name: Python 3.8 with required dependencies and measure coverage
7471
stage: Initial tests
75-
env: SETUP_CMD='test --coverage'
72+
env: TOXENV=py38-test-cov
73+
74+
# Check for sphinx doc build warnings
75+
- os: linux
76+
python: 3.8
77+
name: Documentation build
78+
stage: Comprehensive tests
79+
env: TOXENV=build_docs
7680

77-
# Check for sphinx doc build warnings - we do this first because it
78-
# may run for a long time
81+
# Now try Astropy dev with the latest Python
7982
- os: linux
80-
env: SETUP_CMD='install build_docs -w'
81-
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_DOC
82-
PIP_DEPENDENCIES=$PIP_DEPENDENCIES_DOC
83+
python: 3.8
84+
name: Python 3.8 with developer version of astropy
85+
stage: Comprehensive tests
86+
env: TOXENV=py38-test-devdeps
8387

84-
# Now try Astropy dev with the latest Python and LTS with and 3.x.
88+
# And with an older Python, Astropy LTS, and the oldest supported Numpy
8589
- os: linux
86-
env: ASTROPY_VERSION=development
87-
EVENT_TYPE='pull_request push cron'
90+
python: 3.6
91+
name: Python 3.6 astropy LTS and Numpy 1.16
92+
stage: Comprehensive tests
93+
env: TOXENV=py36-test-astropylts-numpy116
8894

8995
# Add a job that runs from cron only and tests against astropy dev and
9096
# numpy dev to give a change for early discovery of issues and feedback
9197
# for both developer teams.
9298
- os: linux
99+
python: 3.8
100+
name: Python 3.8 latest developer version of key dependencies
93101
stage: Cron tests
94-
env: ASTROPY_VERSION=development NUMPY_VERSION=development
95-
EVENT_TYPE='cron'
102+
env: TOXENV=py38-test-devdeps
96103

97-
- os: linux
98-
env: PYTHON_VERSION=3.6
104+
# Try on Windows.
105+
- os: windows
106+
language: c
107+
name: Python 3.8 with required dependencies
108+
stage: Comprehensive tests
109+
env: PYTHON_VERSION=3.8 TOXENV=py38-test
110+
111+
# Try other python versions and Numpy versions. Since we can assume that
112+
# the Numpy developers have taken care of testing Numpy with different
113+
# versions of Python, we can vary Python and Numpy versions at the same
114+
# time.
99115

100116
- os: linux
101-
env: SETUP_CMD='build --nogsl test'
117+
python: 3.7
118+
name: Python 3.7 with astropy 3.0 and Numpy 1.17
119+
stage: Comprehensive tests
120+
env: TOXENV=py37-test-astropy30-numpy117
102121

122+
# Do a code style check
103123
- os: linux
104-
env: CONDA_DEPENDENCIES+=" galpy"
124+
python: 3.8
125+
name: Code style checks
126+
stage: Initial tests
127+
env: TOXENV=codestyle
105128

106-
# Do a PEP8 test with flake8
107-
# - os: linux
108-
# stage: Initial tests
109-
# env: MAIN_CMD='flake8 gala --count --show-source --statistics $FLAKE8_OPT' SETUP_CMD=''
129+
# Try installing without gsl:
130+
- os: osx
131+
language: c
132+
name: Python 3.7 with required dependencies, without GSL
133+
stage: Comprehensive tests
134+
env: PYTHON_VERSION=3.7 TOXENV=py37-test GALA_NOGSL=1
110135

111136
allow_failures:
112137
# Do a PEP8 test with flake8
113138
# (do allow to fail unless your code completely compliant)
114-
- os: linux
115-
stage: Initial tests
116-
env: MAIN_CMD='flake8 gala --count --show-source --statistics $FLAKE8_OPT' SETUP_CMD=''
139+
# - os: linux
140+
# python: 3.8
141+
# name: Code style checks
142+
# stage: Initial tests
143+
# env: TOXENV=codestyle
117144

118145
install:
119-
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
120-
- source ci-helpers/travis/setup_conda.sh
146+
147+
# We now use the ci-helpers package to set up our Python environment
148+
# on Windows and MacOS X but we don't set up any other dependencies,
149+
# instead using tox to do this. See https://github.com/astropy/ci-helpers
150+
# for more information about ci-helpers.
151+
152+
- if [[ $TRAVIS_OS_NAME != linux ]]; then
153+
git clone --depth 1 git://github.com/astropy/ci-helpers.git;
154+
source ci-helpers/travis/setup_conda.sh;
155+
fi
121156

122157
script:
123-
- $MAIN_CMD $SETUP_CMD
158+
- pip install tox
159+
- tox $TOXARGS -- $TOXPOSARGS
124160

125161
after_success:
126-
- if [[ $SETUP_CMD == 'test --coverage' ]]; then
127-
coveralls --rcfile='gala/tests/coveragerc';
128-
fi
162+
pip install coveralls
163+
coveralls

MANIFEST.in

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
include README.rst
22
include CHANGES.rst
33
include LICENSE
4+
include pyproject.toml
45

5-
include ez_setup.py
6-
include ah_bootstrap.py
76
include setup.cfg
87

98
recursive-include *.pyx *.c *.pxd
@@ -16,8 +15,4 @@ prune build
1615
prune docs/_build
1716
prune docs/api
1817

19-
recursive-include astropy_helpers *
20-
exclude astropy_helpers/.git
21-
exclude astropy_helpers/.gitignore
22-
2318
global-exclude *.pyc *.o

docs/conf.py

-13
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,6 @@
169169

170170
## -- Options for the edit_on_github extension ----------------------------------------
171171

172-
if eval(setup_cfg.get('edit_on_github')):
173-
extensions += ['astropy_helpers.sphinx.ext.edit_on_github']
174-
175-
versionmod = __import__(setup_cfg['package_name'] + '.version')
176-
edit_on_github_project = setup_cfg['github_project']
177-
if versionmod.version.release:
178-
edit_on_github_branch = "v" + versionmod.version.version
179-
else:
180-
edit_on_github_branch = "master"
181-
182-
edit_on_github_source_root = ""
183-
edit_on_github_doc_root = "docs"
184-
185172
# show inherited members for classes
186173
automodsumm_inherited_members = True
187174

docs/examples/Milky-Way-model.ipynb

+18-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"outputs": [],
7272
"source": [
7373
"icrs = coord.SkyCoord(ra=coord.Angle('17h 20m 12.4s'), \n",
74-
" dec=coord.Angle('+57\u00b0 54\u2032 55\u2033'),\n",
74+
" dec=coord.Angle('+57° 54 55'),\n",
7575
" distance=76*u.kpc,\n",
7676
" pm_ra_cosdec=0.0569*u.mas/u.yr,\n",
7777
" pm_dec=-0.1673*u.mas/u.yr,\n",
@@ -316,15 +316,15 @@
316316
"axes[1].hist(apos.to_value(u.kpc), bins='auto')\n",
317317
"axes[1].set_xlabel('apocenter [kpc]')\n",
318318
"\n",
319-
"axes[2].hist(eccs, bins='auto')\n",
319+
"axes[2].hist(eccs.value, bins='auto')\n",
320320
"axes[2].set_xlabel('eccentricity');"
321321
]
322322
}
323323
],
324324
"metadata": {
325325
"anaconda-cloud": {},
326326
"kernelspec": {
327-
"display_name": "Python [default]",
327+
"display_name": "Python 3",
328328
"language": "python",
329329
"name": "python3"
330330
},
@@ -338,9 +338,22 @@
338338
"name": "python",
339339
"nbconvert_exporter": "python",
340340
"pygments_lexer": "ipython3",
341-
"version": "3.6.8"
341+
"version": "3.7.6"
342+
},
343+
"toc": {
344+
"base_numbering": 1,
345+
"nav_menu": {},
346+
"number_sections": true,
347+
"sideBar": true,
348+
"skip_h1_title": false,
349+
"title_cell": "Table of Contents",
350+
"title_sidebar": "Contents",
351+
"toc_cell": false,
352+
"toc_position": {},
353+
"toc_section_display": true,
354+
"toc_window_display": false
342355
}
343356
},
344357
"nbformat": 4,
345358
"nbformat_minor": 2
346-
}
359+
}

gala/_astropy_init.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
__all__ = ['__version__', '__githash__']
3+
__all__ = ['__version__']
44

55
# this indicates whether or not we are in the package's setup.py
66
try:
77
_ASTROPY_SETUP_
88
except NameError:
9-
from sys import version_info
10-
if version_info[0] >= 3:
11-
import builtins
12-
else:
13-
import __builtin__ as builtins
9+
import builtins
1410
builtins._ASTROPY_SETUP_ = False
1511

1612
try:
1713
from .version import version as __version__
1814
except ImportError:
1915
__version__ = ''
20-
try:
21-
from .version import githash as __githash__
22-
except ImportError:
23-
__githash__ = ''
2416

2517

2618
if not _ASTROPY_SETUP_: # noqa

0 commit comments

Comments
 (0)