From 5d8af19034007dc10024a8f39820e2b99b5b485b Mon Sep 17 00:00:00 2001 From: Paul Ray Date: Mon, 4 May 2020 07:10:38 -0400 Subject: [PATCH 1/5] Remove deprecated pytest-runner from setup.cfg --- setup.cfg | 6 ------ 1 file changed, 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index ad975ad08..1cc74b078 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,12 +35,6 @@ install_requires = uncertainties corner>=2.0.1 enum34; python_version < "3.0" -setup_requires= - pytest-runner>=2.0,<3dev -tests_require= - pytest - Sphinx>=1.8.; python_version < "3.0" - Sphinx>=2.2; python_version >= "3.0" [options.packages.find] where = src From 63b70887a196e03e254aef9d67f5903497db1c55 Mon Sep 17 00:00:00 2001 From: Paul Ray Date: Mon, 4 May 2020 08:34:57 -0400 Subject: [PATCH 2/5] Fix README --- README.rst | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 48b4cb764..0cf403681 100644 --- a/README.rst +++ b/README.rst @@ -45,18 +45,25 @@ The primary reasons we are developing PINT are: Installing ---------- -Currently PINT is not available via PyPI or Conda. To install it you must -obtain the source from GitHub (for example by cloning it), then install +PINT is now available via PyPI as the package `pint-pulsar `_, so it is now simple to install via pip. +For most users, who don't want to develop the PINT code, installation should just be a matter of:: + + $ pip install pint-pulsar + +By default this will install in your system site-packages. Depending on your system and preferences, you may want to append ``--user`` +to install it for just yourself (e.g. if you don't have permission to write in the system site-packages), or you may want to create a +virtualenv to work on PINT (using a virtualenv is highly recommended by the PINT developers). + +If you want access to the source code, example notebooks, and tests, you can install from source, by +cloning the source repository from GitHub, then install it, ensuring that all dependencies needed to run PINT are available:: $ pip install . -Be aware that both PINT and AstroPy require data files from the Internet, -for example the International Earth Rotation Service bulletins, which are -regularly updated. These files are cached, where possible, so once they -have been downloaded you should be able to use PINT and AstroPy offline -unless you require new data (for example you request a time more recent -than your IERS bulletin contains). +Complete installation instructions are availble here_. + +.. _here: https://nanograv-pint.readthedocs.io/en/latest/installation.html + Using ----- From 9e535a8de322abb2a1348b28af91b6e6dbce8124 Mon Sep 17 00:00:00 2001 From: Paul Ray Date: Mon, 4 May 2020 09:28:12 -0400 Subject: [PATCH 3/5] Make import pint not update IERS immediately --- src/pint/__init__.py | 8 ++------ src/pint/erfautils.py | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pint/__init__.py b/src/pint/__init__.py index 29c93f97f..6748ce513 100644 --- a/src/pint/__init__.py +++ b/src/pint/__init__.py @@ -1,17 +1,16 @@ """PINT Is Not TEMPO3!""" +import numpy as np import astropy import astropy.constants as c import astropy.time as time import astropy.units as u -import numpy as np +from astropy import log from astropy.units import si from pint.extern._version import get_versions from pint.pulsar_ecliptic import PulsarEcliptic from pint.pulsar_mjd import PulsarMJD -from pint.erfautils import get_iers_up_to_date import pint.pulsar_mjd -from astropy import log __all__ = [ "__version__", @@ -89,7 +88,6 @@ "hourangle_second": hourangle_second, } -# Prepare IERS and update tables if needed import astropy.version if astropy.version.major < 4: @@ -98,5 +96,3 @@ astropy.__version__ ) ) -else: - get_iers_up_to_date() diff --git a/src/pint/erfautils.py b/src/pint/erfautils.py index 488c71b77..8d61b62e6 100644 --- a/src/pint/erfautils.py +++ b/src/pint/erfautils.py @@ -73,6 +73,10 @@ def get_iers_b_up_to_date(mjd): return iers_b +# On import, make sure the IERS table is updated. +log.info("Running get_iers_up_to_date() to update IERS B table") +get_iers_up_to_date() + SECS_PER_DAY = erfa.DAYSEC # Earth rotation rate in radians per UT1 second # From 3c73f830e87f996e2bf278f7a0349569bfa20beb Mon Sep 17 00:00:00 2001 From: Paul Ray Date: Mon, 4 May 2020 09:30:22 -0400 Subject: [PATCH 4/5] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33baf6106..93a349564 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project, at least loosely, adheres to [Semantic Versioning](https://sem - Added chisq gridding utilities ### Fixed - Cleaned up some unnecessary warnings in tests +### Changed +- Defer updating IERS B from when pint is imported to when erfautils is imported (for conda testing) +- Fixed installation instructions in README ## [0.6.1] - 2020-04-30 ### Added From bf996a87c343c425e0f775bf552cec6968d619c4 Mon Sep 17 00:00:00 2001 From: Paul Ray Date: Mon, 4 May 2020 10:08:41 -0400 Subject: [PATCH 5/5] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93a349564..d78616a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project, at least loosely, adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.6.3] - 2020-05-04 ### Added - Added pmtot() convenience function - Added dmxstats() utility function @@ -15,6 +17,10 @@ and this project, at least loosely, adheres to [Semantic Versioning](https://sem - Defer updating IERS B from when pint is imported to when erfautils is imported (for conda testing) - Fixed installation instructions in README +## [0.6.2] - 2020-05-04 +### Changed +- Removed deprecated pytest-runner from setup.cfg + ## [0.6.1] - 2020-04-30 ### Added - Added dmx_ranges to compute DMX bins and build a Component