Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Refactor package template to follow APE 17 #438

Merged
merged 44 commits into from
Jan 31, 2020
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ca9f807
Start refactoring package template to follow APE 17
astrofrog Jan 17, 2020
517e032
Updated CI configuration
astrofrog Jan 17, 2020
0b4895c
More improvements to infrastructure
astrofrog Jan 17, 2020
bef5dca
Fix Python version
astrofrog Jan 17, 2020
18b0b77
Fix syntax and spelling
astrofrog Jan 17, 2020
16785ed
Fix dependency
astrofrog Jan 17, 2020
2af909c
Added initial migration guide to Sphinx docs
astrofrog Jan 22, 2020
dce1c2c
More updates to migration guide
astrofrog Jan 24, 2020
3430879
More cleanup
astrofrog Jan 24, 2020
2c3659c
Remove .rtd-environment.yml file
astrofrog Jan 27, 2020
e265856
Fix syntax in cookiecutter.json and change default back for include_e…
astrofrog Jan 27, 2020
4c00c23
Remove questions that are no longer needed
astrofrog Jan 27, 2020
77a2ad6
More updates to migration guide
astrofrog Jan 27, 2020
bac1375
Added changelog entry
astrofrog Jan 27, 2020
38a4a95
Enable cron again
astrofrog Jan 27, 2020
33574f1
Simplified migration guide to avoid duplication with template
astrofrog Jan 27, 2020
4d8b5c7
More cleanup of the APE 17 migration guide
astrofrog Jan 27, 2020
471e6ca
Fix RTD config files
astrofrog Jan 27, 2020
b4a2092
Fix variable
astrofrog Jan 28, 2020
e1658a3
Make Step 0 sound less optional
astrofrog Jan 28, 2020
34ad4ce
Fix typo
astrofrog Jan 28, 2020
93f1066
Apply suggestions from code review
astrofrog Jan 28, 2020
1c46da4
Remove option to initialize git repository since it is no longer very…
astrofrog Jan 28, 2020
ce48548
Bump minimum supported version to 3.6 and add 3.8
astrofrog Jan 28, 2020
190fb6b
Added sentence about core package
astrofrog Jan 28, 2020
66cc65a
Improvements to migration guide following review
astrofrog Jan 28, 2020
7ef315e
Make sure repository is initialized on Travis
astrofrog Jan 28, 2020
b2dd969
Add back minimum_python_version to list of questions/options
astrofrog Jan 29, 2020
cf0b842
Give more example environments in the tox envlist
astrofrog Jan 29, 2020
c6dbd6e
Added support for specifying required and optional dependencies
astrofrog Jan 29, 2020
45122d6
Added description of new options
astrofrog Jan 29, 2020
a494822
Avoid repetition in setup.py
astrofrog Jan 29, 2020
65d57c1
Added new entry to .gitignore
astrofrog Jan 29, 2020
acfd4b3
Added long_description_content_type
astrofrog Jan 29, 2020
ef9573d
Added trailing slash in .gitignore for directory
astrofrog Jan 29, 2020
d62621c
Fixes/improvements to APE 17 migration guide
astrofrog Jan 30, 2020
970fe94
Make coverage testing opt-in
astrofrog Jan 30, 2020
c9ff2c4
Always use master branch for edit_on_github
astrofrog Jan 31, 2020
f14c673
Use root __version__ instead version
astrofrog Jan 31, 2020
3f9a571
Made pytest-astropy-header optional
astrofrog Jan 31, 2020
9da0a1c
Added a note about why the conftest.py file needs to be in the source…
astrofrog Jan 31, 2020
2b0155c
Added a note on release procedures and conda-forge
astrofrog Jan 31, 2020
1b812ef
Add missing ASTROPY_HEADER
astrofrog Jan 31, 2020
46622bb
Fix missing comma
astrofrog Jan 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions docs/ape17.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,48 @@ You should also add ``pip-wheel-metadata`` to your ``.gitignore`` file.
**Once you are done, if you would like us to help by reviewing your changes,
you can open a pull request to your package and mention @astrofrog or
@Cadair to ask for a review.**

Note on releasing your package
------------------------------

As a result of the changes above, there are some tweaks to the procedure to
follow for releasing your package - see the `latest instructions
<https://docs.astropy.org/en/latest/development/astropy-package-template.html>`_
in the astropy documentation. The two main changes are that you no longer need
to manually update the version number in files, instead the version number
is based on the latest git tag, and in addition the source file should be
built using the `pep517 <https://pypi.org/project/pep517/>`_ package.

Note on conda recipes and pyproject.toml
----------------------------------------

While not something you can do until you release your updated package, you will
need to take care to update conda recipes (e.g. in conda-forge) for your
astrofrog marked this conversation as resolved.
Show resolved Hide resolved
package. In particular, since conda ignores ``pyproject.toml`` files,
you will need to make sure that the build dependencies present in ``pyproject.toml``
are explicitly listed as build dependencies in the conda recipe. For
packages with compiled extensions and Cython, this would look like::

build:
- {{ compiler('c') }}
host:
- pip
- python
- setuptools
- setuptools_scm
- numpy
- cython
- extension-helpers
run:
...

while for pure-Python packages you will still need to make sure
``setuptools_scm`` is included in the build dependencies::

host:
- pip
- python
- setuptools
- setuptools_scm
run:
...