diff --git a/cookiecutter.json b/cookiecutter.json index d2dbbc24..f2f60238 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -8,9 +8,9 @@ "license": ["BSD 3-Clause", "GNU GPL v3+", "Apache Software Licence 2.0", "BSD 2-Clause", "Other"], "project_url": "http://docs.astropy.org/projects/package-template/", "project_version": "0.0.dev", - "include_example_code": "y", - "include_example_cython_code": "n", "include_cextern_folder": "n", + "use_compiled_extensions": "y", + "include_example_code": "n", "edit_on_github_extension": "False", "github_project": "astropy/astropy", "use_travis_ci": "y", @@ -19,9 +19,5 @@ "initialize_git_repo": "y", "_parent_project": "astropy", "_install_requires": "astropy", - "_copy_without_render": [ - "docs/_templates" - ], "minimum_python_version": ["3.7", "3.6", "3.5"], - "astropy_helpers_version": "v3.2.1" } diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index f25caf1d..6bd9322f 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -47,15 +47,12 @@ def process_licence(licence_name): remove_file('.rtd-environment.yml') remove_file('readthedocs.yml') - if '{{ cookiecutter.include_cextern_folder }}' != 'y': - remove_dir("cextern") - if '{{ cookiecutter.include_example_code }}' != 'y': remove_dir('{{ cookiecutter.module_name }}/example_subpkg/') remove_file('{{ cookiecutter.module_name }}/example_mod.py') remove_file('{{ cookiecutter.module_name }}/tests/test_example.py') - if '{{ cookiecutter.include_example_cython_code }}' != 'y': + if '{{ cookiecutter.use_compiled_extensions }}' != 'y' or '{{ cookiecutter.include_example_code }}' != 'y': remove_file('{{ cookiecutter.module_name }}/example_c.pyx') if '{{ cookiecutter.initialize_git_repo }}' == 'y': diff --git a/{{ cookiecutter.package_name }}/README.rst b/{{ cookiecutter.package_name }}/README.rst index 36c09c86..ade8df96 100644 --- a/{{ cookiecutter.package_name }}/README.rst +++ b/{{ cookiecutter.package_name }}/README.rst @@ -5,8 +5,6 @@ :target: http://www.astropy.org :alt: Powered by Astropy Badge -{{ cookiecutter.long_description|wordwrap(break_long_words=False) }} - License ------- diff --git a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/base.rst b/{{ cookiecutter.package_name }}/docs/_templates/autosummary/base.rst deleted file mode 100644 index 9cabaf52..00000000 --- a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/base.rst +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "autosummary_core/base.rst" %} -{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #} \ No newline at end of file diff --git a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/class.rst b/{{ cookiecutter.package_name }}/docs/_templates/autosummary/class.rst deleted file mode 100644 index 6b214a5c..00000000 --- a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/class.rst +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "autosummary_core/class.rst" %} -{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #} \ No newline at end of file diff --git a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/module.rst b/{{ cookiecutter.package_name }}/docs/_templates/autosummary/module.rst deleted file mode 100644 index f38315b2..00000000 --- a/{{ cookiecutter.package_name }}/docs/_templates/autosummary/module.rst +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "autosummary_core/module.rst" %} -{# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #} \ No newline at end of file diff --git a/{{ cookiecutter.package_name }}/docs/index.rst b/{{ cookiecutter.package_name }}/docs/index.rst index ccaed6a4..9cbaa3a6 100644 --- a/{{ cookiecutter.package_name }}/docs/index.rst +++ b/{{ cookiecutter.package_name }}/docs/index.rst @@ -2,7 +2,6 @@ Documentation ============= This is the documentation for {{ cookiecutter.package_name }}. -{{ cookiecutter.long_description|wordwrap(break_long_words=False) }} .. toctree:: :maxdepth: 2 diff --git a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/example_mod.py b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/example_mod.py index 730ca83c..d5f3f1cd 100644 --- a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/example_mod.py +++ b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/example_mod.py @@ -41,7 +41,7 @@ def primes(imax): def do_primes(n, usecython=False): if usecython: -{% if cookiecutter.include_example_cython_code != 'y' %} +{% if cookiecutter.use_compiled_extensions != 'y' %} raise Exception("This template does not have the example C code included.") {% else %} from .example_c import primes as cprimes diff --git a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/tests/test_example.py b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/tests/test_example.py index cce7bd7c..446761f3 100644 --- a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/tests/test_example.py +++ b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/tests/test_example.py @@ -1,4 +1,4 @@ -{% if cookiecutter.include_example_cython_code == 'y' %} +{% if cookiecutter.use_compiled_extensions == 'y' %} def test_primes_c(): from ..example_c import primes as primes_c assert primes_c(10) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]