-
-
Notifications
You must be signed in to change notification settings - Fork 63
Change the package-template to use Cookiecutter #202
Conversation
A couple questions/comments from a partial review look:
|
The initial idea was they are long versions of the prompts given in the "wizard" when you render the template.
As I mentioned in that thread that is possible, and I am in favour of that option. |
5fd80bb
to
6bfd3b0
Compare
.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' |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!!
There was a problem hiding this comment.
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 :)
NOTE this PR should be merged manually into the cookiecutter branch, not master! |
@Cadair - can you rebase? (astropy-helpers change) |
Now uses GitPython to init the repo after templateing and then add astropy_helpers as a submodule.
Although spaces in cli args does not work!
22adf17
to
73f696d
Compare
There was a problem hiding this 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.
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