Skip to content

Commit a364f7d

Browse files
astrofrogadamginsburg
authored andcommitted
Initial commit of affiliated package template
updated docs Makefile to reflect astropy Move the py.test conftest.py file to the astropy directory so it is installed. Changed the import of plugins accordingly. Also updated the .gitignore file so it ignores the Mac OS X .DS_Store file. fixed conf.py to not insert source dir into sys.path typo fixes in conf.py comment Added CSS file from Astropy core package Updated setup.cfg to match Astropy core package Copy bootstrap-astropy theme from astropy remove default.css import from astropy.css - now not needed update conf.py to use bootstrap-astropy theme, mirror astropy's version use installed astropy theme Added templates that inherit from core package Added `_templates` to list of patterns to exclude added comment directing to base of jinja template Update testing to only import pytest when tests are run Added `coverage` option that was added in the Astropy core Removed comments added kwarg options to test runner removed line setting unused _test_runner variable Updated setup.py to bring it in line with the Astropy core Update distribute_setup.py to 0.6.28 Remove unnecessary instructions from README.rst tweak to instructions from @astrofrog's suggestion Changed check in setup.py to syntax in core package to avoid issues when Sphinx is not installed. Update setup.py to reflect re-factored setup code for 0.2 release If necessary, move configuration file to the right place on first import Added open_files option for test() and implemented fix for caught exception in __init__.py Fix scripts/README.rst bug added commented-out edit_on_github section to conf.py and related instructions in README line wrap fixes Add .travis.yml file Add instructions for travis-ci to README _PACKAGE_SETUP_ should be _ASTROPY_SETUP_ (see astropy/astropy#950) Test with different Numpy versions, only test Sphinx with Python 2.7. Ensure that optional dependencies for Sphinx are installed Updated distribute_setup.py to fix compatibility with setuptools 0.7 README typo fixes Switch to using ez_setup.py, and simplify setup.py, following recent changes in Astropy core. Updates to __init__.py to match Astropy core Minor fix Added backward compatibility with Astropy 0.2 parallel option can only be used with Astropy 0.3 or later Re-organize the setup.py so that Astropy is not required for egg_info Revert "Re-organize the setup.py so that Astropy is not required for egg_info" This reverts commit 9aa5339. Replace distribute_setup.py with ez_setup.py and ``setuptools_bootstrap.py`` Support `setup.py test --coverage` in affiliated packages. Simplify package-template usage and updating by requiring fewer files to be edited. Add information about pulling changes to package template Store stuff in "metadata" section, not "affiliated" section. Insert space before comment. Fix documentation build Elaborate on the need to search for .c files in a comment. Change ``clean`` rule to remove generated docs Made necessary by astropy/astropy@b94fd38 Update to newer ez_setup.py Add the current version of ah_bootstrap--for the tests themselves we will always copy over the latest version of ah_bootstrap (so that we can test ah_bootstrap itself), but there should still be a default copy of it in the package-template repo as well Configure the package-template to use astropy_helpers. By default includes astropy_helpers as a submodule. Yes, astropy_helpers is now a submodule of package_template which is a submodule of astropy_helpers update the astropy_helpers version to include fix from c3f841b9e099f506a751b8a6971b15e7e3d6590a Update the astropy_helpers version used in the package_template Update the astropy_helpers version again; use the auto_use feature of ah_bootstrap. Switch to using astropy_helpers for docs build. Updated astropy_helpers version (included fix for Python 3) Update the git submodule path to use http instead--hopefully this will work then on Travis Updating to the actual astropy-helpers Updated astropy-helpers to latest version Fixing docs links in package test function Added example API docs Updated astropy-helpers to latest version. This version includes fixes for the coverage testing in affiliated packages. Use wheels for travis testing Care is taken to use a numpy wheel whose version matches the scipy/astropy wheels. Previous commit messages: Use development astropy for test --coverage Install coverage when needed Add cython to the travis build environment, controlled by an environmental variable Also added a few more words of advice to the travis part of the README Restore -w option to build_sphinx Change URL for numpy-specific wheels and make scipy an optional install Fix latest stable numpy version Several tweaks to improve performance and reduce unnecessary tests Remove debugging statements and cython install in egg_only Don't override package data after it's been determined from setup_package.py files Include astropy_helpers in the affilated package's tarball. Fix astropy#69: Affiliated packages can opt-in to deprecations-as-exceptions removed setuptools_bootstrap.py as it doesn't exist any more in the new package-template added ah_bootstrap and setup.cfg Update astropy_helpers Use MiniConda for affiliated packages Make sure conda’s astropy is removed before pip installing the latest developer version Added more comments to .travis.yml Pin Numpy version Don’t use --parallel with Python 3 More tidying up of .travis.yml file Move astropy dev builds earlier in .travis.yml Since they take longer, it is better to start them sooner for improved load balancing. Import astropy_helpers from inside the docs/ directory Fix a warning that "Could not determine version of package ccdproc" from configuration system (since the __version__ member doesn't yet exist for the package when the configuration file is copied). More detail in example __init__.py Add numpy import to exmaple_mod This ensures that egg_info builds will break if __init__.py is not set up properly Add coveralls --rcfile option Update README for coveralls rcfile Use the version module correctly in edit_on_github Closes astropy#55. Added files to ignore in affiliated package coverage tests Clarify purpose of cextern directory. Updated astropy-helpers to v0.4 Update ah_bootstrap.py from astropy-helpers Replace development build with stable now that astropy 0.4 is out Closes astropy#65 Add info about a specific Sphinx version check. explain readthedocs add released versions of astropy-helper and astropy to rtd-requirements Add a few entries to .gitignore Remove affiliated package instructions from README page update readme with a bit more info Typo fix pointed out by @cdeil Updated astropy-helpers and ah_bootstrap.py to v0.4.1 Added TEMPLATE_CHANGES.md. Fixes astropy#102. MANIFEST.in should exclude pyc *after* including astropy-helpers prune docs/api gitignore manifest template changes udpate Updated astropy-helpers to v0.4.3 Update TEMPLATE_CHANGES.md Fix typo Tagging v0.4.1 Updated astropy-helpers to patched v0.4.3 Update dependency information for open-files option Add note about adding/removing packages to/from pytest header Ensure that conftest.py change works with all versions of Astropy Make sure to update apt-get listings Add jinja2 in .travis.yml Drop python 3.2 testing Drop numpy 1.5 testing and use numpy 1.9 as baseline Use setuptools entry_points for command line scripts Update MANIFEST.in [skip ci] Update TEMPLATE_CHANGES [skip ci] add powered by astropy badge
0 parents  commit a364f7d

36 files changed

Lines changed: 2426 additions & 0 deletions

‎.gitignore‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Compiled files
2+
*.py[co]
3+
*.a
4+
*.o
5+
*.so
6+
__pycache__
7+
8+
# Ignore .c files by default to avoid including generated code. If you want to
9+
# add a non-generated .c extension, use `git add -f filename.c`.
10+
*.c
11+
12+
# Other generated files
13+
*/version.py
14+
*/cython_version.py
15+
htmlcov
16+
.coverage
17+
MANIFEST
18+
19+
# Sphinx
20+
docs/api
21+
docs/_build
22+
23+
# Eclipse editor project files
24+
.project
25+
.pydevproject
26+
.settings
27+
28+
# Pycharm editor project files
29+
.idea
30+
31+
# Packages/installer info
32+
*.egg
33+
*.egg-info
34+
dist
35+
build
36+
eggs
37+
parts
38+
bin
39+
var
40+
sdist
41+
develop-eggs
42+
.installed.cfg
43+
distribute-*.tar.gz
44+
45+
# Other
46+
.*.swp
47+
*~
48+
49+
# Mac OSX
50+
.DS_Store

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "astropy_helpers"]
2+
path = astropy_helpers
3+
url = https://github.com/astropy/astropy-helpers.git

‎.travis.yml‎

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
language: python
2+
3+
python:
4+
- 2.6
5+
- 2.7
6+
- 3.3
7+
- 3.4
8+
# This is just for "egg_info". All other builds are explicitly given in the matrix
9+
env:
10+
global:
11+
# The following versions are the 'default' for tests, unless
12+
# overidden underneath. They are defined here in order to save having
13+
# to repeat them for all configurations.
14+
- NUMPY_VERSION=1.9
15+
- ASTROPY_VERSION=stable
16+
- CONDA_INSTALL='conda install -c astropy-ci-extras --yes'
17+
- PIP_INSTALL='pip install'
18+
matrix:
19+
- SETUP_CMD='egg_info'
20+
21+
matrix:
22+
include:
23+
24+
# Do a coverage test in Python 2.
25+
- python: 2.7
26+
env: SETUP_CMD='test --coverage'
27+
28+
# Check for sphinx doc build warnings - we do this first because it
29+
# may run for a long time
30+
- python: 2.7
31+
env: SETUP_CMD='build_sphinx -w'
32+
33+
# Try Astropy development version
34+
- python: 2.7
35+
env: ASTROPY_VERSION=development SETUP_CMD='test'
36+
- python: 3.3
37+
env: ASTROPY_VERSION=development SETUP_CMD='test'
38+
39+
# Try all python versions with the latest numpy
40+
- python: 2.6
41+
env: SETUP_CMD='test'
42+
- python: 2.7
43+
env: SETUP_CMD='test'
44+
- python: 3.3
45+
env: SETUP_CMD='test'
46+
- python: 3.4
47+
env: SETUP_CMD='test'
48+
49+
# Try older numpy versions
50+
- python: 2.7
51+
env: NUMPY_VERSION=1.8 SETUP_CMD='test'
52+
- python: 2.7
53+
env: NUMPY_VERSION=1.7 SETUP_CMD='test'
54+
- python: 2.7
55+
env: NUMPY_VERSION=1.6 SETUP_CMD='test'
56+
57+
before_install:
58+
59+
# Use utf8 encoding. Should be default, but this is insurance against
60+
# future changes
61+
- export PYTHONIOENCODING=UTF8
62+
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
63+
- chmod +x miniconda.sh
64+
- ./miniconda.sh -b
65+
- export PATH=/home/travis/miniconda/bin:$PATH
66+
- conda update --yes conda
67+
68+
# UPDATE APT-GET LISTINGS
69+
- sudo apt-get update
70+
71+
# DOCUMENTATION DEPENDENCIES
72+
- if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi
73+
74+
install:
75+
76+
# CONDA
77+
- conda create --yes -n test -c astropy-ci-extras python=$TRAVIS_PYTHON_VERSION
78+
- source activate test
79+
80+
# CORE DEPENDENCIES
81+
- if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION pytest pip Cython jinja2; fi
82+
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL pytest-xdist; fi
83+
84+
# ASTROPY
85+
- if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == development ]]; then $PIP_INSTALL git+http://github.com/astropy/astropy.git#egg=astropy; fi
86+
- if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == stable ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION astropy; fi
87+
88+
# OPTIONAL DEPENDENCIES
89+
# Here you can add any dependencies your package may have. You can use
90+
# conda for packages available through conda, or pip for any other
91+
# packages. You should leave the `numpy=$NUMPY_VERSION` in the `conda`
92+
# install since this ensures Numpy does not get automatically upgraded.
93+
# - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION ... ; fi
94+
# - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL ...; fi
95+
96+
# DOCUMENTATION DEPENDENCIES
97+
# build_sphinx needs sphinx and matplotlib (for plot_directive). Note that
98+
# this matplotlib will *not* work with py 3.x, but our sphinx build is
99+
# currently 2.7, so that's fine
100+
- if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION Sphinx matplotlib; fi
101+
102+
# COVERAGE DEPENDENCIES
103+
- if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_INSTALL coverage coveralls; fi
104+
105+
script:
106+
- python setup.py $SETUP_CMD
107+
108+
after_success:
109+
# If coveralls.io is set up for this package, uncomment the line
110+
# below and replace "packagename" with the name of your package.
111+
# The coveragerc file may be customized as needed for your package.
112+
# - if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls --rcfile='packagename/tests/coveragerc'; fi

‎MANIFEST.in‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
include README.rst
2+
include CHANGES.rst
3+
4+
include ez_setup.py
5+
include ah_bootstrap.py
6+
include setup.cfg
7+
8+
recursive-include *.pyx *.c *.pxd
9+
recursive-include docs *
10+
recursive-include licenses *
11+
recursive-include cextern *
12+
recursive-include scripts *
13+
14+
prune build
15+
prune docs/_build
16+
prune docs/api
17+
18+
recursive-include astropy_helpers *
19+
exclude astropy_helpers/.git
20+
exclude astropy_helpers/.gitignore
21+
22+
global-exclude *.pyc *.o

‎README.rst‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Astropy affiliated package template
2+
===================================
3+
4+
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
5+
:target: http://www.astropy.org
6+
:alt: Powered by Astropy Badge
7+
8+
This is the template for affiliated packages of the Astropy project.
9+
10+
Astropy affiliated packages are astronomy-related Python packages that
11+
have requested to be part of the Astropy project’s community.
12+
Such packages can make use of the setup, installation, and documentation
13+
infrastructure developed for the ``astropy`` core package simply by
14+
using this template to lay out the package.
15+
16+
For more information, see:
17+
18+
* `Detailed instructions for using this template <http://astropy.readthedocs.org/en/latest/development/affiliated-packages.html>`_
19+
* `The Affiliated Packages section of the Astropy web site <http://affiliated.astropy.org>`_
20+
* `This template's Github code repository <https://github.com/astropy/package-template>`_
21+
22+
Status reports for developers
23+
-----------------------------
24+
25+
.. image:: https://travis-ci.org/astropy/package-template.png?branch=master
26+
:target: https://travis-ci.org/astropy/package-template
27+
:alt: Test Status

‎TEMPLATE_CHANGES.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
This file keeps track of changes between tagged versions of the Astropy
2+
package template, for the benefit of affiliated package maintainers. It can
3+
be removed in affiliated packages.
4+
5+
0.4.2 (untagged)
6+
----------------
7+
8+
- Use setuptools entry_points for command line scripts
9+
10+
- Included CHANGES.rst in MANIFEST.in.
11+
12+
- Recursive include *.pyx, *.c, and *.pxd files in MANIFEST.in.
13+
14+
- Global exclude *.pyc and *.o files in MANIFEST.in.
15+
16+
0.4.1 (2014-10-22)
17+
------------------
18+
19+
- Changed order of exclusion in MANIFEST.in, excluding *.pyc *after* including
20+
astropy-template
21+
22+
- Updated astropy-helpers to v0.4.3
23+
24+
0.4 (2014-08-14)
25+
----------------
26+
27+
- Initial tagged version, contains astropy-helpers v0.4.1

0 commit comments

Comments
 (0)