Skip to content

Commit

Permalink
Squash commits for rebase on master
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Jan 15, 2020
1 parent 5de5295 commit 02bce76
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 141 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ distribute-*.tar.gz

# Other
.cache
.tmp
.tox
.*.sw[op]
*~
Expand Down
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ language: c
os:
- linux

# Disable cloning with --depth=50 (the default). This should grab the tags
# needed for setuptools_scm to work.
git:
depth: false

# The apt packages below are needed for sphinx builds. A full list of packages
# that can be included can be found here:
#
Expand Down Expand Up @@ -45,8 +50,8 @@ env:
# 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='scipy matplotlib pytest-mock'
- CONDA_DEPENDENCIES_DOC='scipy matplotlib sphinx-astropy'
- CONDA_DEPENDENCIES='tox setuptools_scm scipy matplotlib pytest-mock'
- CONDA_DEPENDENCIES_DOC='tox setuptools_scm scipy matplotlib sphinx-astropy'

# List other runtime dependencies for the package that are available as
# pip packages here.
Expand Down Expand Up @@ -92,15 +97,19 @@ matrix:
# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- os: linux
env: SETUP_CMD='build_docs -w'
env: MAIN_CMD='tox -e'
SETUP_CMD='build_docs'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_DOC
# env: MAIN_CMD='sphinx-build'
# SETUP_CMD='docs docs/_build/html -W --keep-going -b html'
# CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_DOC

# Now try Astropy dev with the latest Python and LTS with and 3.x.
- os: linux
env: ASTROPY_VERSION=development
EVENT_TYPE='pull_request push cron'
- os: linux
env: PYTHON_VERSION=3.6 ASTROPY_VERSION=lts NUMPY_VERSION=1.14 PYTEST_VERSION='<3.7'
env: PYTHON_VERSION=3.6 ASTROPY_VERSION=2.0.16 NUMPY_VERSION=1.14 PYTEST_VERSION='<3.7'

# 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
Expand Down
File renamed without changes.
12 changes: 8 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
include README.rst
include LICENSE.rst
# include CHANGES.rst

include ah_bootstrap.py
include pyproject.toml
include setup.cfg
include pydl/tests/coveragerc

recursive-include pydl *.pyx *.c *.pxd
# recursive-include pydl *.pyx *.c *.pxd
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *
recursive-include pydl/*/data/* *
recursive-include pydl/tests/t *
recursive-include pydl/*/tests/t *
# recursive-include cextern *
# recursive-include scripts *

prune build
prune docs/_build
Expand Down
44 changes: 17 additions & 27 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ PyDL
:target: http://www.astropy.org
:alt: Powered by Astropy Badge

.. image:: https://img.shields.io/pypi/l/pydl.svg
:target: https://pypi.python.org/pypi/pydl
:alt: License

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2575874.svg
:target: https://doi.org/10.5281/zenodo.2575874
:alt: DOI: 10.5281/zenodo.2575874
Expand All @@ -14,6 +18,18 @@ PyDL
:target: https://pypi.python.org/pypi/pydl
:alt: PyPI Badge

.. image:: https://img.shields.io/travis/weaverba137/pydl.svg
:target: https://travis-ci.org/weaverba137/pydl
:alt: Travis Build Status

.. image:: https://coveralls.io/repos/weaverba137/pydl/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/weaverba137/pydl?branch=master
:alt: Test Coverage Status

.. image:: https://readthedocs.org/projects/pydl/badge/?version=latest
:target: http://pydl.readthedocs.org/en/latest/
:alt: Documentation Status

Description
-----------

Expand All @@ -36,44 +52,18 @@ Full Documentation

Please visit `PyDL on Read the Docs`_

.. image:: https://readthedocs.org/projects/pydl/badge/?version=latest
:target: http://pydl.readthedocs.org/en/latest/
:alt: Documentation Status


History
-------

This package was initially developed on the SDSS-III_ `svn repository`_. It was
moved to the new GitHub_ repository on 2013-03-06. The present location of
the repository is http://github.com/weaverba137/pydl .


Travis Build Status
-------------------

.. image:: https://img.shields.io/travis/weaverba137/pydl.svg
:target: https://travis-ci.org/weaverba137/pydl
:alt: Travis Build Status


Test Coverage Status
--------------------

.. image:: https://coveralls.io/repos/weaverba137/pydl/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/weaverba137/pydl?branch=master
:alt: Test Coverage Status


License
-------
.. image:: https://img.shields.io/pypi/l/pydl.svg
:target: https://pypi.python.org/pypi/pydl
:alt: License

PyDL is free software licensed under a 3-clause BSD-style license. For details see
the ``licenses/LICENSE.rst`` file.

the ``LICENSE.rst`` file.

Legal
-----
Expand Down
12 changes: 4 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import os
import sys
import datetime
from importlib import import_module
from pkg_resources import get_distribution

try:
from sphinx_astropy.conf.v1 import * # noqa
Expand Down Expand Up @@ -76,13 +76,9 @@
# |version| and |release|, also used in various other places throughout the
# built documents.

import_module(setup_cfg['name'])
package = sys.modules[setup_cfg['name']]

# The short X.Y version.
version = package.__version__.split('-', 1)[0]
# The full version, including alpha/beta/rc tags.
release = package.__version__
release = get_distribution(setup_cfg['name']).version
# for example take major/minor
version = '.'.join(release.split('.')[:2])


# -- Options for HTML output --------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PyDL License

PyDL is licensed under a 3-clause BSD style license:

.. include:: ../licenses/LICENSE.rst
.. include:: ../LICENSE.rst

.. Other Licenses
.. ==============
Expand Down
5 changes: 0 additions & 5 deletions licenses/README.rst

This file was deleted.

63 changes: 28 additions & 35 deletions pydl/conftest.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
#
# This file is used to configure the behavior of pytest when using the Astropy
# test infrastructure.
#
import os

from astropy.version import version as astropy_version
if astropy_version < '3.0':
#
# With older versions of Astropy, we actually need to import the pytest
# plugins themselves in order to make them discoverable by pytest.
#
from astropy.tests.pytest_plugins import *
del pytest_report_header
else:
# As of Astropy 3.0, the pytest plugins provided by Astropy are
# automatically made available when Astropy is installed. This means it's
# not necessary to import them here, but we still need to import global
# variables that are used for configuration.
from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
# As of Astropy 4.0, the pytest plugins provided by Astropy are
# now in the pytest-astropy-header package. This is backward-compatible
# with Astropy 3.
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS

from astropy.tests.helper import enable_deprecations_as_exceptions

Expand All @@ -27,38 +34,24 @@
## warnings_to_ignore_by_pyver={(MAJOR, MINOR): ['Message to ignore']}
# enable_deprecations_as_exceptions()

## Uncomment and customize the following lines to add/remove entries from
## the list of packages for which version numbers are displayed when running
## the tests. Making it pass for KeyError is essential in some cases when
## the package uses other astropy affiliated packages.
try:
def pytest_configure(config):

config.option.astropy_header = True
#
# Customize the following lines to add/remove entries from
# the list of packages for which version numbers are displayed when running
# the tests.
#
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
PYTEST_HEADER_MODULES['PyDL'] = 'pydl'
try:
del PYTEST_HEADER_MODULES['h5py']
except KeyError:
pass
try:
del PYTEST_HEADER_MODULES['Pandas']
except KeyError:
pass
except (NameError, KeyError): # NameError is needed to support Astropy < 1.0
pass

## Uncomment the following lines to display the version number of the
## package rather than the version number of Astropy in the top line when
## running the tests.
import os

## This is to figure out the package version, rather than
## using Astropy's
try:
from .version import version
except ImportError:
version = 'dev'
PYTEST_HEADER_MODULES.pop('Pandas', None)
PYTEST_HEADER_MODULES.pop('h5py', None)

try:
from .version import version #, astropy_helpers_version
packagename = os.path.basename(os.path.dirname(__file__))
#
# Display the version number of the package rather than the version number
# of Astropy in the top line when running the tests.
#
TESTED_VERSIONS[packagename] = version
except NameError: # Needed to support Astropy <= 1.0.0
pass
# TESTED_VERSIONS['astropy_helpers'] = astropy_helpers_version
18 changes: 0 additions & 18 deletions pydl/setup_package.py

This file was deleted.

5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = ["setuptools",
"setuptools_scm",
"wheel"]
build-backend = 'setuptools.build_meta'
46 changes: 27 additions & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
[metadata]
name = pydl
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
version = 1.0.0.dev
# version = 1.0.0.dev
author = Benjamin Alan Weaver
author_email = baweaver@lbl.gov
description = Astropy affiliated package
long_description = ====
pydl
====

Python replacements for functions that are part of the IDL_ built-in library, or
part of astronomical IDL libraries. The emphasis is on reproducing results of
the astronomical library functions. Only the bare minimum of IDL_ built-in
functions are implemented to support this.

.. _IDL: http://www.harrisgeospatial.com/SoftwareTechnology/IDL.aspx

license = BSD
long_description = file: README.rst
license = BSD 3-Clause License
url = http://github.com/weaverba137/pydl
edit_on_github = False
github_project = weaverba137/pydl
# Note: you will also need to change this in your package's __init__.py
python_requires = ">=3.5"
classifiers = Development Status :: 5 - Production/Stable
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Expand All @@ -34,22 +25,39 @@ classifiers = Development Status :: 5 - Production/Stable
[options]
# install_requires should be formatted as a semicolon-separated list, e.g.:
# install_requires = astropy; scipy; matplotlib
install_requires = astropy; scipy; matplotlib
setup_requires =
setuptools_scm
install_requires =
astropy
scipy
matplotlib
zip_safe = False
use_2to3 = False
packages = find:
include_package_data = True

[options.entry_points]
console_scripts =

get_juldate = pydl.goddard.astro:get_juldate_main
hogg_iau_name = pydl.pydlutils.misc:hogg_iau_name_main
compute_templates = pydl.pydlspec2d.spec1d:template_input_main

[options.extras_require]
test =
pytest-astropy
pytest-mock
pytest-cov
docs =
sphinx-astropy

# [options.package_data]
# * = *.c
# packagename = data/*
# packagename.tests = coveragerc
# pydl.tests = coveragerc, t/*
# pydl.goddard.tests = t/*
# pydl.photoop.tests = t/*
# pydl.pydlspec2d.tests = t/*
# pydl.pydlutils = data/cooling/*, data/filters/*
# pydl.pydlutils.tests = t/*

[build_sphinx]
source-dir = docs
Expand All @@ -69,7 +77,7 @@ show-response = 1
minversion = 3.0
norecursedirs = build docs/_build
doctest_plus = enabled
addopts = -p no:warnings
addopts = -p no:warnings --doctest-rst

[ah_bootstrap]
auto_use = True
Expand Down
Loading

0 comments on commit 02bce76

Please sign in to comment.