Skip to content

Commit

Permalink
Merge pull request #194 from spacetelescope/0.10.0x
Browse files Browse the repository at this point in the history
0.10.0x
  • Loading branch information
nden authored Dec 21, 2018
2 parents 0aee2b2 + a534eec commit 91c0f36
Show file tree
Hide file tree
Showing 56 changed files with 3,647 additions and 872 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ __pycache__
htmlcov
.coverage
MANIFEST
.pytest_cache

# Sphinx
docs/api
Expand Down Expand Up @@ -45,4 +46,4 @@ distribute-*.tar.gz

# Mac OSX
.DS_Store
.idea
.idea
12 changes: 12 additions & 0 deletions .rtd-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

dependencies:
- python>=3
- numpy
- pip:
- astropy
- sphinx_astropy
- sphinx-automodapi
- stsci_rtd_theme
- asdf
- sphinx_rtd_theme

52 changes: 37 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: python
language: c

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
Expand All @@ -12,34 +12,36 @@ addons:
- texlive-latex-extra
- dvipng

python:
- 3.5
- 3.6

env:
global:
# The following versions are the 'default' for tests, unless
# overidden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- PYTHON_VERSION=3.6
- NUMPY_VERSION=stable
- ASTROPY_VERSION=development
#- ASTROPY_VERSION=development
- MAIN_CMD='python setup.py'
- CONDA_DEPENDENCIES='scipy'
- ASDF_GIT='git+https://github.com/spacetelescope/asdf.git#egg=asdf'
- PIP_DEPENDENCIES="pytest-astropy $ASDF_GIT"
- ASTROPY_GIT='git+https://github.com/astropy/astropy.git@v3.1.x'
- PIP_DEPENDENCIES="$ASTROPY_GIT pytest-astropy asdf"
- ASTROPY_USE_SYSTEM_PYTEST=1
- PYTEST_VERSION=3.6

matrix:
- SETUP_CMD='egg_info'
- SETUP_CMD='test'
- PYTHON_VERSION=3.5 SETUP_CMD='test'
- PYTHON_VERSION=3.6 SETUP_CMD='test'
- PYTHON_VERSION=3.7 SETUP_CMD='test'

matrix:

# Don't wait for allowed failures
fast_finish: true

include:

# Do a coverage test.
- python: 3.5
env: SETUP_CMD='test --coverage --open-files --remote-data'
Expand All @@ -49,19 +51,39 @@ matrix:
- python: 3.6
env: SETUP_CMD='build_docs -w'

# Numpy
- python: 3.6
env: NUMPY_VERSION=1.12 SETUP_CMD="test"
- python: 3.6
env: NUMPY_VERSION=1.13 SETUP_CMD="test"
env: NUMPY_VERSION=1.14 SETUP_CMD="test"

# Do a PEP8 test with flake8
- python: 3.6
env: MAIN_CMD='flake8 count --select=F, E101, E111, E112, E113, E401, E402, E711, E722 --max-line-length=110'
SETUP_CMD='gwcs"

- python: 3.5
env: MAIN_CMD='flake8 gwcs --count' SETUP_CMD=''
env: MAIN_CMD='flake8 count --max-line-length=110' SETUP_CMD='gwcs'

- python: 3.6
env: NUMPY_VERSION=dev SETUP_CMD='test'

- python: 3.6
env: ASTROPY_VERSION=development SETUP_CMD='test'

- python: 3.6
env: PIP_DEPENDENCIES="$ASTROPY_GIT $ASDF_GIT" SETUP_CMD='test'

allow_failures:
- python: 3.5
env: MAIN_CMD='flake8 gwcs --count' SETUP_CMD=''
env: MAIN_CMD='flake8 count --max-line-length=110' SETUP_CMD='gwcs'

- python: 3.6
env: NUMPY_VERSION=dev SETUP_CMD='test'

- python: 3.6
env: ASTROPY_VERSION=development SETUP_CMD='test'

- python: 3.6
env: PIP_DEPENDENCIES="$ASTROPY_GIT $ASDF_GIT" SETUP_CMD='test'


install:
- git clone git://github.com/astropy/ci-helpers.git
Expand Down
25 changes: 23 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
0.10.0 (12/20/2018)
-------------------

New Features
^^^^^^^^^^^^

- Initializing a ``WCS`` object with a ``pipeline`` list now keeps
the complete ``CoordinateFrame`` objects in the ``WCS.pipeline``.
The effect is that a ``WCS`` object can now be initialized with
a ``pipeline`` from a different ``WCS`` object. [#174]

- Implement support for astropy APE 14
(https://doi.org/10.5281/zenodo.1188875). [#146]

- Added a ``wcs_from_[points`` function which creates a WCS object
two matching sets of points ``(x,y)`` and ``(ra, dec)``. [#42]

0.9.0 (2018-05-23)
------------------

Expand All @@ -16,8 +33,10 @@ New Features

- Add a ``StokesFrame`` which converts from 'I', 'Q', 'U', 'V' to 0-3. [#133]

- Support serialising the base ``CoordinateFrame`` class to asdf, by making
a specific tag and schema for ``Frame2D`` [#150]
- Support serializing the base ``CoordinateFrame`` class to asdf, by making
a specific tag and schema for ``Frame2D``. [#150]

- Generalized the footrpint calculation to all output axes. [#167]


API Changes
Expand All @@ -26,6 +45,8 @@ API Changes
- The argument ``output="numerical_plus"`` was replaced by a bool
argument ``with_units``. [#156]

- Added a new flag ``axis_type`` to the footprint method. It controls what
type of footprint to calculate. [#167]

Bug Fixes
^^^^^^^^^
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Please open a new issue or new pull request for bugs, feedback, or new features you would like to see. If there is an issue you would like to work on, please leave a comment and we will be happy to assist. New contributions and contributors are very welcome!

New to github or open source projects? If you are unsure about where to start or haven't used github before, please feel free to contact the package maintainers.

Feedback and feature requests? Is there something missing you would like to see? Please open an issue or send an email to the maintainers. This package follows the Spacetelescope [Code of Conduct](CODE_OF_CONDUCT.md) strives to provide a welcoming community to all of our users and contributors.
59 changes: 42 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
GWCS
====
..
GWCS - Generalized World Coordinate System
==========================================
Generalized World Coordinate System (GWCS) is an `Astropy`_ affiliated package providing tools for managing the World Coordinate System of astromnomical data.
.. raw:: html

<h1 align="center">GWCS - Generalized World Coordinate System </h1>
<p align="center">
<a href='https://gwcs.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/gwcs/badge/?version=latest' alt='Documentation Status'></a>
<a href="https://travis-ci.org/spacetelescope/gwcs"><img src="https://travis-ci.org/spacetelescope/gwcs.svg?branch=master" alt="Build Status"></a>
<a href="https://coveralls.io/github/spacetelescope/gwcs?branch=master"><img src="https://coveralls.io/repos/github/spacetelescope/gwcs/badge.svg?branch=master" alt="Coverage Status"></a>
<img src="https://img.shields.io/pypi/l/gwcs.svg" alt="license">
<a href="http://www.stsci.edu"><img src="https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat" alt="stsci"></a>
<a href="http://www.astropy.org/"><img src="http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat" alt="astropy"></a>
</p>


Generalized World Coordinate System (GWCS) is an `Astropy`_ affiliated package providing tools for managing the World Coordinate System of astronomical data.

GWCS takes a general approach to the problem of expressing transformations between pixel and world coordinates. It supports a data model which includes the entire transformation pipeline from input coordinates (detector by default) to world coordinates. It is tightly integrated with `Astropy`_.

- Transforms are instances of ``astropy.Model``. They can be chained, joined or combined with arithmetic operators using the flexible framework of compound models in `astropy.modeling`_.
- Celestial coordinates are instances of ``astropy.SkyCoord`` and are transformed to other standard celestial frames using `astropy.coordinates`_.
- Time coordinates are represented by ``astropy.Time`` and can be further manipulated using the tools in `astropy.time`_
- Spectral coordinates are ``astropy.Quantity`` objects and can be converted to other units using the tools in `astropy.units`_.

For complete features and usage examples see the `documentation`_ site.

Note
----
Beginning with the next version (0.9), GWCS requires Python 3.5 and above.
Beginning with version 0.9 GWCS requires Python 3.5 and above.


Installation
Expand All @@ -22,15 +44,17 @@ To clone from github and install the master branch::
cd gwcs
python setup.py install

Status
------
Contributing Code, Documentation, or Feedback
---------------------------------------------

.. image:: https://travis-ci.org/spacetelescope/gwcs.svg
:target: https://travis-ci.org/spacetelescope/gwcs
:alt: GWCS's Travis CI Status
.. image:: https://coveralls.io/repos/github/spacetelescope/gwcs/badge.svg?branch=master
:target: https://coveralls.io/github/spacetelescope/gwcs?branch=master
:alt: Test Coverage Status
We welcome feedback and contributions to the project. Contributions of
code, documentation, or general feedback are all appreciated. Please
follow the `contributing guidelines <CONTRIBUTING.md>`__ to submit an
issue or a pull request.

We strive to provide a welcoming community to all of our users by
abiding to the `Code of Conduct <CODE_OF_CONDUCT.md>`__.


Citing GWCS
Expand All @@ -41,9 +65,10 @@ Citing GWCS

If you use GWCS, please cite the package via its Zenodo record.

License
-------

GWCS is licensed under a 3-clause BSD style license.

.. _Astropy: http://www.astropy.org/

.. _astropy.time: http://docs.astropy.org/en/stable/time/
.. _astropy.modeling: http://docs.astropy.org/en/stable/modeling/
.. _astropy.units: http://docs.astropy.org/en/stable/units/
.. _astropy.coordinates: http://docs.astropy.org/en/stable/coordinates/
.. _documentation: http://gwcs.readthedocs.org/en/latest/
63 changes: 19 additions & 44 deletions ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,63 +38,42 @@

import contextlib
import errno
import imp
import io
import locale
import os
import re
import subprocess as sp
import sys

__minimum_python_version__ = (3, 5)

if sys.version_info < __minimum_python_version__:
print("ERROR: Python {} or later is required by astropy-helpers".format(
__minimum_python_version__))
sys.exit(1)

try:
from ConfigParser import ConfigParser, RawConfigParser
except ImportError:
from configparser import ConfigParser, RawConfigParser


if sys.version_info[0] < 3:
_str_types = (str, unicode)
_text_type = unicode
PY3 = False
else:
_str_types = (str, bytes)
_text_type = str
PY3 = True
_str_types = (str, bytes)


# What follows are several import statements meant to deal with install-time
# issues with either missing or misbehaving pacakges (including making sure
# setuptools itself is installed):

# Check that setuptools 1.0 or later is present
from distutils.version import LooseVersion

# Some pre-setuptools checks to ensure that either distribute or setuptools >=
# 0.7 is used (over pre-distribute setuptools) if it is available on the path;
# otherwise the latest setuptools will be downloaded and bootstrapped with
# ``ez_setup.py``. This used to be included in a separate file called
# setuptools_bootstrap.py; but it was combined into ah_bootstrap.py
try:
import pkg_resources
_setuptools_req = pkg_resources.Requirement.parse('setuptools>=0.7')
# This may raise a DistributionNotFound in which case no version of
# setuptools or distribute is properly installed
_setuptools = pkg_resources.get_distribution('setuptools')
if _setuptools not in _setuptools_req:
# Older version of setuptools; check if we have distribute; again if
# this results in DistributionNotFound we want to give up
_distribute = pkg_resources.get_distribution('distribute')
if _setuptools != _distribute:
# It's possible on some pathological systems to have an old version
# of setuptools and distribute on sys.path simultaneously; make
# sure distribute is the one that's used
sys.path.insert(1, _distribute.location)
_distribute.activate()
imp.reload(pkg_resources)
except:
# There are several types of exceptions that can occur here; if all else
# fails bootstrap and use the bootstrapped version
from ez_setup import use_setuptools
use_setuptools()

import setuptools
assert LooseVersion(setuptools.__version__) >= LooseVersion('1.0')
except (ImportError, AssertionError):
print("ERROR: setuptools 1.0 or later is required by astropy-helpers")
sys.exit(1)

# typing as a dependency for 1.6.1+ Sphinx causes issues when imported after
# initializing submodule with ah_boostrap.py
Expand Down Expand Up @@ -150,11 +129,7 @@
# TODO: Maybe enable checking for a specific version of astropy_helpers?
DIST_NAME = 'astropy-helpers'
PACKAGE_NAME = 'astropy_helpers'

if PY3:
UPPER_VERSION_EXCLUSIVE = None
else:
UPPER_VERSION_EXCLUSIVE = '3'
UPPER_VERSION_EXCLUSIVE = None

# Defaults for other options
DOWNLOAD_IF_NEEDED = True
Expand Down Expand Up @@ -186,7 +161,7 @@ def __init__(self, path=None, index_url=None, use_git=None, offline=None,
if not (isinstance(path, _str_types) or path is False):
raise TypeError('path must be a string or False')

if PY3 and not isinstance(path, _text_type):
if not isinstance(path, str):
fs_encoding = sys.getfilesystemencoding()
path = path.decode(fs_encoding) # path to unicode

Expand Down Expand Up @@ -829,9 +804,9 @@ def run_cmd(cmd):
stdio_encoding = 'latin1'

# Unlikely to fail at this point but even then let's be flexible
if not isinstance(stdout, _text_type):
if not isinstance(stdout, str):
stdout = stdout.decode(stdio_encoding, 'replace')
if not isinstance(stderr, _text_type):
if not isinstance(stderr, str):
stderr = stderr.decode(stdio_encoding, 'replace')

return (p.returncode, stdout, stderr)
Expand Down
2 changes: 1 addition & 1 deletion astropy_helpers
Submodule astropy_helpers updated 75 files
+8 −5 .coveragerc
+66 −25 .travis.yml
+71 −1 CHANGES.rst
+0 −1 MANIFEST.in
+329 −32 README.rst
+19 −44 ah_bootstrap.py
+8 −5 appveyor.yml
+1 −4 astropy_helpers/__init__.py
+2 −10 astropy_helpers/commands/_dummy.py
+0 −307 astropy_helpers/commands/_test_compat.py
+8 −5 astropy_helpers/commands/build_ext.py
+0 −39 astropy_helpers/commands/build_py.py
+135 −123 astropy_helpers/commands/build_sphinx.py
+0 −14 astropy_helpers/commands/install.py
+0 −14 astropy_helpers/commands/install_lib.py
+0 −53 astropy_helpers/commands/register.py
+1 −4 astropy_helpers/commands/test.py
+0 −12 astropy_helpers/compat/__init__.py
+9 −3 astropy_helpers/conftest.py
+0 −11 astropy_helpers/extern/__init__.py
+0 −1 astropy_helpers/extern/automodapi/__init__.py
+0 −135 astropy_helpers/extern/automodapi/autodoc_enhancements.py
+0 −423 astropy_helpers/extern/automodapi/automodapi.py
+0 −664 astropy_helpers/extern/automodapi/automodsumm.py
+0 −92 astropy_helpers/extern/automodapi/smart_resolver.py
+0 −10 astropy_helpers/extern/automodapi/templates/autosummary_core/base.rst
+0 −65 astropy_helpers/extern/automodapi/templates/autosummary_core/class.rst
+0 −41 astropy_helpers/extern/automodapi/templates/autosummary_core/module.rst
+0 −214 astropy_helpers/extern/automodapi/utils.py
+0 −5 astropy_helpers/extern/numpydoc/__init__.py
+0 −603 astropy_helpers/extern/numpydoc/docscrape.py
+0 −309 astropy_helpers/extern/numpydoc/docscrape_sphinx.py
+0 −271 astropy_helpers/extern/numpydoc/numpydoc.py
+0 −16 astropy_helpers/extern/numpydoc/templates/numpydoc_docstring.rst
+0 −4 astropy_helpers/extern/setup_package.py
+225 −29 astropy_helpers/openmp_helpers.py
+3 −54 astropy_helpers/setup_helpers.py
+0 −8 astropy_helpers/sphinx/__init__.py
+2 −341 astropy_helpers/sphinx/conf.py
+0 −2 astropy_helpers/sphinx/ext/__init__.py
+0 −82 astropy_helpers/sphinx/ext/changelog_links.py
+0 −56 astropy_helpers/sphinx/ext/doctest.py
+0 −168 astropy_helpers/sphinx/ext/edit_on_github.py
+0 −0 astropy_helpers/sphinx/ext/tests/__init__.py
+0 −22 astropy_helpers/sphinx/ext/tocdepthfix.py
+ astropy_helpers/sphinx/local/python2_local_links.inv
+0 −25 astropy_helpers/sphinx/local/python2_local_links.txt
+ astropy_helpers/sphinx/local/python3_local_links.inv
+0 −38 astropy_helpers/sphinx/local/python3_local_links.txt
+0 −10 astropy_helpers/sphinx/setup_package.py
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/globaltoc.html
+0 −96 astropy_helpers/sphinx/themes/bootstrap-astropy/layout.html
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/localtoc.html
+0 −7 astropy_helpers/sphinx/themes/bootstrap-astropy/searchbox.html
+0 −75 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout_20.png
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.ico
+0 −87 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo_32.png
+0 −601 astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css
+0 −63 astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js
+0 −160 astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js
+0 −10 astropy_helpers/sphinx/themes/bootstrap-astropy/theme.conf
+0 −13 astropy_helpers/test_helpers.py
+16 −8 astropy_helpers/tests/__init__.py
+4 −6 astropy_helpers/tests/test_ah_bootstrap.py
+1 −10 astropy_helpers/tests/test_git_helpers.py
+39 −3 astropy_helpers/tests/test_openmp_helpers.py
+19 −26 astropy_helpers/tests/test_setup_helpers.py
+55 −126 astropy_helpers/utils.py
+13 −12 astropy_helpers/version_helpers.py
+0 −414 ez_setup.py
+0 −50 licenses/LICENSE_COPYBUTTON.rst
+0 −94 licenses/LICENSE_NUMPYDOC.rst
+2 −1 setup.py
5 changes: 3 additions & 2 deletions gwcs/conftest.py → conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the source tree.

from astropy.tests.pytest_plugins import *
from astropy.tests.helper import enable_deprecations_as_exceptions
from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS

# Uncomment the following line to treat all DeprecationWarnings as
# exceptions
enable_deprecations_as_exceptions()
#enable_deprecations_as_exceptions()

try:
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
Expand Down
Loading

0 comments on commit 91c0f36

Please sign in to comment.