Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APE 17 migration #1674

Merged
merged 44 commits into from
Jul 1, 2021
Merged

APE 17 migration #1674

merged 44 commits into from
Jul 1, 2021

Conversation

epassaro
Copy link
Member

@epassaro epassaro commented Jun 28, 2021

Description

Adoption of the new Astropy package template: https://docs.astropy.org/projects/package-template/en/latest/ape17.html

What's working?

Suggestions?

Full list of changes

  1. .github/workflows/documentation-build.yml - use "new" doc build command (deprecated python setup.py build_docs)
  2. .github/workflows/documentation-preview.yml - same as above
  3. .gitignore - re-rendered with cookiecutter and replaced
  4. .gitmodules - removed, astropy_helpers deprecated :)
  5. MANIFEST.in - re-rendered
  6. README.md - merged with file rendered with cookiecutter
  7. ah_bootstrap.py - removed
  8. astropy_helpers - removed
  9. docs/Makefile - re-rendered
  10. docs/conf.py - merged
  11. docs/make.bat - re-rendered
  12. ez_setup.py - removed
  13. licenses/LICENSE.rst - moved to new licenses folder
  14. licenses/README.rst - new
  15. licenses/TEMPLATE_LICENCE.rst - new
  16. pyproject.toml - merged
  17. setup.cfg - re-rendered, added entry_points, package_data and disabled doctest
  18. setup.py - re-rendered, tweaked to make CalVer work
  19. tardis/__init__.py - merged
  20. tardis/__astropy_init.py - re-rendered
  21. tardis/conftest.py - merged
  22. tardis/io/setup_package.py - APE 17 step 4
  23. tardis/montecarlo/setup_package.py - APE 17 step 4
  24. tardis/plasma/setup_package.py - APE 17 step 4
  25. tardis/simulation/setup_package.py - APE 17 step 4
  26. scripts/tardis → tardis/scripts/tardis.py - moved to make it work as an entry point
  27. tardis/tests/integration_tests/conftest.py - githash not available in new version system (setuptools_scm)
  28. tardis/tests/integration_tests/plot_helpers.py - same as above
  29. tardis/tests/integration_tests/report.py - same as above
  30. tardis/tests/setup_package.py - APE17 step 4
  31. tardis_env3.yml - add required setuptools_scm and sphinx-astropy
  32. tox.ini - new from cookiecutter

Coverage report
Moving tardis script to tardis/scripts makes coverage fail (we have more code lines in PR than in the base branch)

Motivation and context

How has this been tested?

  • Testing pipeline.
  • Other.

Examples

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

@epassaro epassaro marked this pull request as draft June 28, 2021 21:27
@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #1674 (0534580) into master (d5ac38a) will decrease coverage by 0.57%.
The diff coverage is n/a.

❗ Current head 0534580 differs from pull request most recent head 88a5869. Consider uploading reports for the commit 88a5869 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1674      +/-   ##
==========================================
- Coverage   61.86%   61.29%   -0.58%     
==========================================
  Files          62       63       +1     
  Lines        5738     5792      +54     
==========================================
  Hits         3550     3550              
- Misses       2188     2242      +54     
Impacted Files Coverage Δ
tardis/tardis/scripts/tardis.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5ac38a...88a5869. Read the comment docs.

@epassaro epassaro force-pushed the ape-17-migration branch 2 times, most recently from 8789dae to 6af97b8 Compare June 28, 2021 23:53
@epassaro
Copy link
Member Author

/azp run compare-refdata

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Build failed 792eaa2

Click here to see results.

@epassaro epassaro force-pushed the ape-17-migration branch 2 times, most recently from 78bb0f5 to 08ecf86 Compare June 29, 2021 19:00
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

Copy link
Contributor

@andrewfullard andrewfullard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, otherwise looks good

@@ -0,0 +1,26 @@
Copyright 2021 TARDIS Collaboration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static dates seem like a bad idea?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't see that. TARDIS is 2014-present or 2013-present? @wkerzendorf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I thought we were talking about conf.py. We should put Copyright 2014 TARDIS Collaboration I guess.

@@ -2,7 +2,8 @@
import tempfile

from pytest_html import extras
from tardis import __githash__ as tardis_githash

# from tardis import __githash__ as tardis_githash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment and not just delete?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone will need to fix integration tests in the future and maybe that line would be useful. I was thinking of adding a comment like not available in version.py anymore, find another way! or something like that.

@@ -33,7 +33,7 @@
# For specifying error while exception handling
from socket import gaierror

from tardis import __githash__ as tardis_githash
# from tardis import __githash__ as tardis_githash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment?

@epassaro epassaro force-pushed the ape-17-migration branch from 05bf56d to 34381dd Compare July 1, 2021 18:36
@jaladh-singhal jaladh-singhal force-pushed the master branch 2 times, most recently from 2907807 to d5ac38a Compare July 1, 2021 18:47
@epassaro epassaro force-pushed the ape-17-migration branch from 06eb500 to 4af2443 Compare July 1, 2021 20:59
"compiling.",
)

parser.add_argument(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KevinCawley what is that?

Copy link
Contributor

@KevinCawley KevinCawley Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I don't follow.

@wkerzendorf wkerzendorf merged commit 01a3495 into tardis-sn:master Jul 1, 2021
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* remove ah submodule

* re-render setup.cfg

* remove get_package_data functions

* remove ah submodule (2)

* remove ez_setup.py

* re-render setup.py

* update pyproject.toml

* re-render .gitignore

* re-render MANIFEST.in

* add tox.ini

* re-render _astropy_init.py

* update __init__.py

* update conftest.py

* add licenses folder

* add license section to readme

* re-render docs cfg

* comment out __githash__ imports

* remove plasma setup_package.py

* disable doctests

* re apply black format

* fix author name

* add required dependency

* first round of changes to conf.py

* add jaladh changes to conf.py

* changes to doc workflows [build_docs]

* add atharva patch

* fix layout

* include package data [build_docs]

* add missing nbsphinx config

* more changes to conf.py [build_docs]

* minor changes

* add entry points

* black format script

* minor changes

* add support for CalVer :)

* comment out calver cfg

* fix typo

* minor changes

* consistent use of quotes in conf.py

* fix copyright [build_docs]

* remove obsolete .nojekyll from docs folder

* fix year in license

* add comment about missing __githash__

* [build_docs]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants