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

Change the package-template to use Cookiecutter #202

Merged
merged 25 commits into from
Mar 28, 2017

Conversation

Cadair
Copy link
Member

@Cadair Cadair commented Nov 17, 2016

This is rather a major change to the layout of the package. For motivation and more information see APE 12

EDIT: APE PR at astropy/astropy-APEs#17

@eteq
Copy link
Member

eteq commented Feb 26, 2017

A couple questions/comments from a partial review look:

  1. Why are the instructions called "QUESTIONS.rst"? Should it instead by INSTRUCTIONS.rst?
  2. Related to the above and to Use Cookiecutter for the package-template (APE 12) astropy-APEs#17 (comment) : are these supposed to be the one-and-only instructions? Whether they are or not, the instructions in the astropy repo (https://github.com/astropy/astropy/blob/master/docs/development/affiliated-packages.rst) will need to be updated to reflect the new procedure. Perhaps that can also have more info about the new git procedure.
  3. The README needs to be updated to note that this is now using cookiecutter, and that the root of this repo is not the actual template. (that wasn't obvious at first glance, and it confused me until I actually read the instructions/questions)

@Cadair
Copy link
Member Author

Cadair commented Feb 28, 2017

  1. Why are the instructions called "QUESTIONS.rst"? Should it instead by INSTRUCTIONS.rst?

The initial idea was they are long versions of the prompts given in the "wizard" when you render the template.

  1. Related to the above and to Use Cookiecutter for the package-template (APE 12) astropy-APEs#17 (comment) : are these supposed to be the one-and-only instructions?

As I mentioned in that thread that is possible, and I am in favour of that option.

@Cadair Cadair force-pushed the cookiecutter branch 2 times, most recently from 5fd80bb to 6bfd3b0 Compare February 28, 2017 12:55
.travis.yml Outdated
@@ -17,7 +17,7 @@ env:
# to repeat them for all configurations.
- PYTHON_VERSION=3.6
- CONDA_DEPENDENCIES='cython astropy sphinx'
- PIP_DEPENDENCIES='cookiecutter gitpython'
- PIP_DEPENDENCIES='cookiecutter gitpython astropy_helpers'
Copy link
Member

Choose a reason for hiding this comment

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

Not important, but you can conda install the helpers, too (from the astropy channel).

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed it because it is only needed for the template docs, which travis isn't building at the moment.

.travis.yml Outdated
@@ -17,7 +17,7 @@ env:
# to repeat them for all configurations.
- PYTHON_VERSION=3.6
- CONDA_DEPENDENCIES='cython astropy sphinx'
Copy link
Member

Choose a reason for hiding this comment

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

is astropy and cython needed now?

Copy link
Member Author

Choose a reason for hiding this comment

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

the default render of the template has astropy as a install_requires and C code. So it needs it for the test build.

@@ -36,7 +36,7 @@ select = E101,W191,W291,W292,W293,W391,E111,E112,E113,E901,E902
exclude = extern,sphinx,*parsetab.py

[metadata]
package_name = {{ cookiecutter.package_name }}
package_name = {{ cookiecutter.module_name }}
Copy link
Member

Choose a reason for hiding this comment

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

it's still called {{ cookiecutter.package_name }} above in the filename, what is the reason of changing it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Module name is the name of the python module where as package name is the human readable name. I.e. 'astropy' is the module name and 'Astropy' is the package name. At least that's the idea.

Copy link
Member

Choose a reason for hiding this comment

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

well, that's a bit confusing, so there will be a directory with the fancy name as well? But tbh I should probably go at this point and have a look at cookicutter manual

Copy link
Member Author

Choose a reason for hiding this comment

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

I suggest you run cookiecutter to see the result, it's not that confusing once you see the output I hope!

Copy link
Member

Choose a reason for hiding this comment

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

Yeap, that's on the list. Probably I'll get there tomorrow on the 🚋 to SciTog.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am in London for SciTog, so I can talk to you about it!!

Copy link
Member

Choose a reason for hiding this comment

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

I know, and actually I want to pick your brain on a few other questions, unrelated to this :)

@astrofrog
Copy link
Member

NOTE this PR should be merged manually into the cookiecutter branch, not master!

@astrofrog
Copy link
Member

@Cadair - can you rebase? (astropy-helpers change)

@astrofrog astrofrog changed the base branch from master to cookiecutter March 28, 2017 09:35
@Cadair Cadair force-pushed the cookiecutter branch 2 times, most recently from 22adf17 to 73f696d Compare March 28, 2017 12:16
Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

APE12 is now accepted and this is mergeable, so will go ahead and merge now. @Cadair has indicated he'll work on the Travis auto-render stuff and the documentation once this is merged. Once the docs and auto-render are in place we can switch this to be the default branch.

@astrofrog astrofrog merged commit 687974b into astropy:cookiecutter Mar 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants