Repository navigation
Initial package content and GitHub Actions workflows - #1
Conversation
There was a problem hiding this comment.
Can we use PEP 621 here? setup.cfg -> pyproject.toml
There was a problem hiding this comment.
Yes - are there any easy migration tools? Or feel free to push a commit here if you are familiar with the new pyproject.toml format for this metadata.
There was a problem hiding this comment.
Done, though the email I used is not valid. Does Astropy have an email?
There was a problem hiding this comment.
This is fine, but it would be more secure if we checked cryptographic hashes, e.g. with pooch
There was a problem hiding this comment.
Sounds good - I'm not sure how to do that though, so any contributions there welcome!
0ede7b7 to
2905460
Compare
|
@astrofrog - no comment on all the infrastructure stuff, its way beyond me. About the two questions:
Given this very substantial refactoring, it seems like the safest/easiest thing to do is stick with the original for now. After the dust has settled we can talk about clean-up. There is this (where it is not quite 2025...): |
|
Since the That would be needed to keep the existing astropy tests passing, but maybe that's just too much? |
|
Can we use a src layout? |
I would say no for now for consistency with other packages in the astropy org. |
|
Unfortunately Astropy doesn't seem happy with Path-like objects, so the paths need to be strings for now. It would be good to fix that Astropy-side. |
|
|
||
| build-backend = 'setuptools.build_meta' | ||
| [project] | ||
| name = "astropy_iers_data" |
There was a problem hiding this comment.
Package name should probably use dashes instead of underscores ?
| license = {file = "LICENSE.rst"} | ||
| keywords = ["astropy", "data", "IERS"] | ||
| authors = [ | ||
| {name = "Astropy Developers", email = "[email protected]"} |
| [project.urls] | ||
| homepage = "https://github.com/astropy/astropy-iers-data" | ||
| repository = "https://github.com/astropy/astropy-iers-data" | ||
| documentation = "https://github.com/astropy/astropy-iers-data" |
There was a problem hiding this comment.
Debateably. There's no standard, but some common ones (which I've put here). We can refine the links somewhat.
e.g.
repsository = "https://github.com/astropy/astropy-iers-data/src/astropy_iers_data"
documentation = "https://github.com/astropy/astropy-iers-data/README.rst"There was a problem hiding this comment.
I'll update documentation to point to the README and remove homepage as there isn't really one as such (that is not the repository)
| commands = | ||
| pip freeze | ||
| pytest --pyargs astropy_iers_data {toxinidir}/docs --cov astropy_iers_data --cov-config={toxinidir}/setup.cfg {posargs} | ||
| pytest --pyargs astropy {posargs} |
There was a problem hiding this comment.
Can we run tests only for some subpackages ( I guess utils.iers and coordinates) ?
There was a problem hiding this comment.
I thought of this but we also have to include astropy.time and then I was thinking well why not just run it all as in case by chance we ever add usage of IERS elsewhere in the core package? It will only be running weekly so maybe not a major CI usage?
|
@taldcroft - I have been thinking about your comment here:
Because of the nature of the package, it won't be a trivial matter to update/cleanup API once this package starts getting used. If a user installs astropy 6.0 in 2026 (not completely impossible), unless we do anything as mentioned below the latest astropy-iers-data will be pulled in and so we will need to make sure that that version is still compatible with astropy 6.0. This had led me to think that perhaps in fact semantic version would in fact be better than calendar versioning, in case we do ever need to update the API. Then, astropy core could include e.g. We could use a hybrid semantic/calendar version where we use major.year.month.day, e.g. 1.2023.05.25 so that we still have date info but keep the first digit for actual API breakage? In any case, this is all possible but my point is that API cleanup/breakage is not something to be taken lightly, but at the same time I understand maybe it will complicate this PR to discuss it here and would be easier to discuss each change in a dedicated PR. So my suggestion would be to try and proceed with this PR but to try and refine/clean up the API before we start using the package in astropy core for good. |
|
I think there is a lot to be said for making the first commit as easy to understand as possible - i.e., close to just a copy of what what in astropy - and then have further PRs to (slightly) adjust the API before a first official release. |
|
@astrofrog - I agree with @mhvk on getting this first PR merged with minimal API changes and then go from there. On the point of IETF_LEAP_SECOND_URL, doing this GitHub search And most likely removing that old IERS-A file is fine. |
c6ec4fc to
41d8e72
Compare
|
Thanks everyone for the discussion! Once the CI passes, I will just merge and we can discuss further improvements in follow-up issues/PRs. |
The main branch contains a basic package layout with no data etc. This PR adds the IERS A, B, and Leap Second files to the package and sets up the basic 'API', which consists (currently) of variables at the top level of the package which are as follows:
This is the only public API of the package. I decided to include the URLs in this package since it then makes it easier to update things if URLs break.
I have set up tox so that it will run the latest stable astropy test suite against the latest developer version of this package - I originally was only testing
astropy.utils.iersbut realized we should check also that coordinates, time, etc don't break. This currently tests a branch of astropy in my fork, but we can update that to astropy main once changes are merged in astropy core, and then to a stable version of astropy once it is in a released version.I have also added four workflows:
With this, the actual maintainer workflow is to review and merge regular (currently weekly but we could change) pull requests to update the data files. The rest is fully automated.
In future, we could also potentially consider having some basic parsing functions in this package so that astropy core doesn't need to care about the details if the format of the tables changes - it could instead always access e.g. a Numpy structured array. But for now maybe best to keep things simple.
Open questions:
IETF_LEAP_SECOND_URLcan't be calledIERS_LEAP_SECOND_URL_MIRROR?ReadMe.eopc04_IAU2000?Once this is merged and there is a release of the package, I can move on to do the PR for astropy core.