From fbd1bd6e370739fdcc364784616cf71d90ad28cf Mon Sep 17 00:00:00 2001 From: Erik Tjong Kim Sang Date: Tue, 20 Apr 2021 14:14:24 +0200 Subject: [PATCH 1/3] removed apidocs choice --- cookiecutter.json | 1 - {{cookiecutter.project_name}}/docs/conf.py | 2 -- {{cookiecutter.project_name}}/docs/index.rst | 2 -- .../{{cookiecutter.package_name}}/__init__.py | 2 +- .../{{cookiecutter.package_name}}/my_module.py | 2 +- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index 7830ed87..0a351692 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -6,7 +6,6 @@ "version": "0.1.0", "github_organization": "", "license": ["Apache Software License 2.0", "MIT license", "BSD license", "ISC license", "GNU General Public License v3 or later", "Not open source"], - "apidoc": ["no", "yes"], "full_name": "John Smith", "email": "yourname@esciencecenter.nl", "copyright_holder": "Netherlands eScience Center", diff --git a/{{cookiecutter.project_name}}/docs/conf.py b/{{cookiecutter.project_name}}/docs/conf.py index 39cbd1f4..d18ab35e 100644 --- a/{{cookiecutter.project_name}}/docs/conf.py +++ b/{{cookiecutter.project_name}}/docs/conf.py @@ -78,7 +78,6 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False -{% if cookiecutter.apidoc == "yes" %} # -- Run apidoc plug-in manually, as readthedocs doesn't support it ------- # See https://github.com/rtfd/readthedocs.org/issues/1139 def run_apidoc(_): @@ -110,7 +109,6 @@ def run_apidoc(_): def setup(app): app.connect("builder-inited", run_apidoc) -{% endif %} # -- Options for HTML output ---------------------------------------------- diff --git a/{{cookiecutter.project_name}}/docs/index.rst b/{{cookiecutter.project_name}}/docs/index.rst index e71f8a14..d8ef571c 100644 --- a/{{cookiecutter.project_name}}/docs/index.rst +++ b/{{cookiecutter.project_name}}/docs/index.rst @@ -10,7 +10,6 @@ Welcome to {{ cookiecutter.package_name }}'s documentation! :maxdepth: 2 :caption: Contents: -{% if cookiecutter.apidoc == 'yes' %} API Reference ============= @@ -18,7 +17,6 @@ API Reference :maxdepth: 2 {{ cookiecutter.package_name }} -{% endif %} Indices and tables ================== diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py b/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py index b874d2c0..418484ea 100644 --- a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py +++ b/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py @@ -1,4 +1,4 @@ -{% if cookiecutter.apidoc == "yes" %}"""Documentation about {{ cookiecutter.package_name }}"""{% endif %} +"""Documentation about {{ cookiecutter.package_name }}""" import logging from .__version__ import __version__ diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py b/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py index fcf8ae8e..3479f21b 100644 --- a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py +++ b/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py @@ -1,4 +1,4 @@ -{%-if cookiecutter.apidoc == "yes" %}"""Documentation about the {{ cookiecutter.package_name }} module."""{% endif %} +"""Documentation about the {{ cookiecutter.package_name }} module.""" import logging From e4019b0ebd3dc40a415e30104c7d390b202cdbcb Mon Sep 17 00:00:00 2001 From: "Jurriaan H. Spaaks" Date: Wed, 21 Apr 2021 07:39:02 +0200 Subject: [PATCH 2/3] moved template files one level deeper to src/; refs #173 --- .../{{cookiecutter.project_name}}}/.bumpversion.cfg | 0 .../{{cookiecutter.project_name}}}/.editorconfig | 0 .../{{cookiecutter.project_name}}}/.githooks/pre-commit | 0 .../{{cookiecutter.project_name}}}/.github/workflows/build.yml | 0 .../.github/workflows/cffconvert.yml | 0 .../{{cookiecutter.project_name}}}/.github/workflows/pypi.yml | 0 .../{{cookiecutter.project_name}}}/.github/workflows/quality.yml | 0 .../{{cookiecutter.project_name}}}/.gitignore | 0 .../{{cookiecutter.project_name}}}/.prospector.yml | 0 .../{{cookiecutter.project_name}}}/CHANGELOG.md | 0 .../{{cookiecutter.project_name}}}/CITATION.cff | 0 .../{{cookiecutter.project_name}}}/CODE_OF_CONDUCT.md | 0 .../{{cookiecutter.project_name}}}/CONTRIBUTING.md | 0 .../{{cookiecutter.project_name}}}/LICENSE | 0 .../{{cookiecutter.project_name}}}/MANIFEST.in | 0 .../{{cookiecutter.project_name}}}/NOTICE | 0 .../{{cookiecutter.project_name}}}/README.dev.rst | 0 .../{{cookiecutter.project_name}}}/README.md | 0 .../{{cookiecutter.project_name}}}/docs/Makefile | 0 .../docs/_static/theme_overrides.css | 0 .../{{cookiecutter.project_name}}}/docs/_templates/.gitignore | 0 .../{{cookiecutter.project_name}}}/docs/conf.py | 0 .../{{cookiecutter.project_name}}}/docs/index.rst | 0 .../{{cookiecutter.project_name}}}/docs/make.bat | 0 .../{{cookiecutter.project_name}}}/project_setup.md | 0 .../{{cookiecutter.project_name}}}/pyproject.toml | 0 .../{{cookiecutter.project_name}}}/setup.cfg | 0 .../{{cookiecutter.project_name}}}/setup.py | 0 .../{{cookiecutter.project_name}}}/sonar-project.properties | 0 .../{{cookiecutter.project_name}}}/tests/__init__.py | 0 .../{{cookiecutter.project_name}}}/tests/test_my_module.py | 0 .../{{cookiecutter.package_name}}/__init__.py | 0 .../{{cookiecutter.package_name}}/__version__.py | 0 .../{{cookiecutter.package_name}}/my_module.py | 0 34 files changed, 0 insertions(+), 0 deletions(-) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.bumpversion.cfg (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.editorconfig (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.githooks/pre-commit (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.github/workflows/build.yml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.github/workflows/cffconvert.yml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.github/workflows/pypi.yml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.github/workflows/quality.yml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.gitignore (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/.prospector.yml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/CHANGELOG.md (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/CITATION.cff (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/CODE_OF_CONDUCT.md (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/CONTRIBUTING.md (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/LICENSE (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/MANIFEST.in (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/NOTICE (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/README.dev.rst (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/README.md (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/Makefile (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/_static/theme_overrides.css (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/_templates/.gitignore (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/conf.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/index.rst (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/docs/make.bat (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/project_setup.md (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/pyproject.toml (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/setup.cfg (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/setup.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/sonar-project.properties (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/tests/__init__.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/tests/test_my_module.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/{{cookiecutter.package_name}}/__init__.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/{{cookiecutter.package_name}}/__version__.py (100%) rename {{{cookiecutter.project_name}} => src/{{cookiecutter.project_name}}}/{{cookiecutter.package_name}}/my_module.py (100%) diff --git a/{{cookiecutter.project_name}}/.bumpversion.cfg b/src/{{cookiecutter.project_name}}/.bumpversion.cfg similarity index 100% rename from {{cookiecutter.project_name}}/.bumpversion.cfg rename to src/{{cookiecutter.project_name}}/.bumpversion.cfg diff --git a/{{cookiecutter.project_name}}/.editorconfig b/src/{{cookiecutter.project_name}}/.editorconfig similarity index 100% rename from {{cookiecutter.project_name}}/.editorconfig rename to src/{{cookiecutter.project_name}}/.editorconfig diff --git a/{{cookiecutter.project_name}}/.githooks/pre-commit b/src/{{cookiecutter.project_name}}/.githooks/pre-commit similarity index 100% rename from {{cookiecutter.project_name}}/.githooks/pre-commit rename to src/{{cookiecutter.project_name}}/.githooks/pre-commit diff --git a/{{cookiecutter.project_name}}/.github/workflows/build.yml b/src/{{cookiecutter.project_name}}/.github/workflows/build.yml similarity index 100% rename from {{cookiecutter.project_name}}/.github/workflows/build.yml rename to src/{{cookiecutter.project_name}}/.github/workflows/build.yml diff --git a/{{cookiecutter.project_name}}/.github/workflows/cffconvert.yml b/src/{{cookiecutter.project_name}}/.github/workflows/cffconvert.yml similarity index 100% rename from {{cookiecutter.project_name}}/.github/workflows/cffconvert.yml rename to src/{{cookiecutter.project_name}}/.github/workflows/cffconvert.yml diff --git a/{{cookiecutter.project_name}}/.github/workflows/pypi.yml b/src/{{cookiecutter.project_name}}/.github/workflows/pypi.yml similarity index 100% rename from {{cookiecutter.project_name}}/.github/workflows/pypi.yml rename to src/{{cookiecutter.project_name}}/.github/workflows/pypi.yml diff --git a/{{cookiecutter.project_name}}/.github/workflows/quality.yml b/src/{{cookiecutter.project_name}}/.github/workflows/quality.yml similarity index 100% rename from {{cookiecutter.project_name}}/.github/workflows/quality.yml rename to src/{{cookiecutter.project_name}}/.github/workflows/quality.yml diff --git a/{{cookiecutter.project_name}}/.gitignore b/src/{{cookiecutter.project_name}}/.gitignore similarity index 100% rename from {{cookiecutter.project_name}}/.gitignore rename to src/{{cookiecutter.project_name}}/.gitignore diff --git a/{{cookiecutter.project_name}}/.prospector.yml b/src/{{cookiecutter.project_name}}/.prospector.yml similarity index 100% rename from {{cookiecutter.project_name}}/.prospector.yml rename to src/{{cookiecutter.project_name}}/.prospector.yml diff --git a/{{cookiecutter.project_name}}/CHANGELOG.md b/src/{{cookiecutter.project_name}}/CHANGELOG.md similarity index 100% rename from {{cookiecutter.project_name}}/CHANGELOG.md rename to src/{{cookiecutter.project_name}}/CHANGELOG.md diff --git a/{{cookiecutter.project_name}}/CITATION.cff b/src/{{cookiecutter.project_name}}/CITATION.cff similarity index 100% rename from {{cookiecutter.project_name}}/CITATION.cff rename to src/{{cookiecutter.project_name}}/CITATION.cff diff --git a/{{cookiecutter.project_name}}/CODE_OF_CONDUCT.md b/src/{{cookiecutter.project_name}}/CODE_OF_CONDUCT.md similarity index 100% rename from {{cookiecutter.project_name}}/CODE_OF_CONDUCT.md rename to src/{{cookiecutter.project_name}}/CODE_OF_CONDUCT.md diff --git a/{{cookiecutter.project_name}}/CONTRIBUTING.md b/src/{{cookiecutter.project_name}}/CONTRIBUTING.md similarity index 100% rename from {{cookiecutter.project_name}}/CONTRIBUTING.md rename to src/{{cookiecutter.project_name}}/CONTRIBUTING.md diff --git a/{{cookiecutter.project_name}}/LICENSE b/src/{{cookiecutter.project_name}}/LICENSE similarity index 100% rename from {{cookiecutter.project_name}}/LICENSE rename to src/{{cookiecutter.project_name}}/LICENSE diff --git a/{{cookiecutter.project_name}}/MANIFEST.in b/src/{{cookiecutter.project_name}}/MANIFEST.in similarity index 100% rename from {{cookiecutter.project_name}}/MANIFEST.in rename to src/{{cookiecutter.project_name}}/MANIFEST.in diff --git a/{{cookiecutter.project_name}}/NOTICE b/src/{{cookiecutter.project_name}}/NOTICE similarity index 100% rename from {{cookiecutter.project_name}}/NOTICE rename to src/{{cookiecutter.project_name}}/NOTICE diff --git a/{{cookiecutter.project_name}}/README.dev.rst b/src/{{cookiecutter.project_name}}/README.dev.rst similarity index 100% rename from {{cookiecutter.project_name}}/README.dev.rst rename to src/{{cookiecutter.project_name}}/README.dev.rst diff --git a/{{cookiecutter.project_name}}/README.md b/src/{{cookiecutter.project_name}}/README.md similarity index 100% rename from {{cookiecutter.project_name}}/README.md rename to src/{{cookiecutter.project_name}}/README.md diff --git a/{{cookiecutter.project_name}}/docs/Makefile b/src/{{cookiecutter.project_name}}/docs/Makefile similarity index 100% rename from {{cookiecutter.project_name}}/docs/Makefile rename to src/{{cookiecutter.project_name}}/docs/Makefile diff --git a/{{cookiecutter.project_name}}/docs/_static/theme_overrides.css b/src/{{cookiecutter.project_name}}/docs/_static/theme_overrides.css similarity index 100% rename from {{cookiecutter.project_name}}/docs/_static/theme_overrides.css rename to src/{{cookiecutter.project_name}}/docs/_static/theme_overrides.css diff --git a/{{cookiecutter.project_name}}/docs/_templates/.gitignore b/src/{{cookiecutter.project_name}}/docs/_templates/.gitignore similarity index 100% rename from {{cookiecutter.project_name}}/docs/_templates/.gitignore rename to src/{{cookiecutter.project_name}}/docs/_templates/.gitignore diff --git a/{{cookiecutter.project_name}}/docs/conf.py b/src/{{cookiecutter.project_name}}/docs/conf.py similarity index 100% rename from {{cookiecutter.project_name}}/docs/conf.py rename to src/{{cookiecutter.project_name}}/docs/conf.py diff --git a/{{cookiecutter.project_name}}/docs/index.rst b/src/{{cookiecutter.project_name}}/docs/index.rst similarity index 100% rename from {{cookiecutter.project_name}}/docs/index.rst rename to src/{{cookiecutter.project_name}}/docs/index.rst diff --git a/{{cookiecutter.project_name}}/docs/make.bat b/src/{{cookiecutter.project_name}}/docs/make.bat similarity index 100% rename from {{cookiecutter.project_name}}/docs/make.bat rename to src/{{cookiecutter.project_name}}/docs/make.bat diff --git a/{{cookiecutter.project_name}}/project_setup.md b/src/{{cookiecutter.project_name}}/project_setup.md similarity index 100% rename from {{cookiecutter.project_name}}/project_setup.md rename to src/{{cookiecutter.project_name}}/project_setup.md diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/src/{{cookiecutter.project_name}}/pyproject.toml similarity index 100% rename from {{cookiecutter.project_name}}/pyproject.toml rename to src/{{cookiecutter.project_name}}/pyproject.toml diff --git a/{{cookiecutter.project_name}}/setup.cfg b/src/{{cookiecutter.project_name}}/setup.cfg similarity index 100% rename from {{cookiecutter.project_name}}/setup.cfg rename to src/{{cookiecutter.project_name}}/setup.cfg diff --git a/{{cookiecutter.project_name}}/setup.py b/src/{{cookiecutter.project_name}}/setup.py similarity index 100% rename from {{cookiecutter.project_name}}/setup.py rename to src/{{cookiecutter.project_name}}/setup.py diff --git a/{{cookiecutter.project_name}}/sonar-project.properties b/src/{{cookiecutter.project_name}}/sonar-project.properties similarity index 100% rename from {{cookiecutter.project_name}}/sonar-project.properties rename to src/{{cookiecutter.project_name}}/sonar-project.properties diff --git a/{{cookiecutter.project_name}}/tests/__init__.py b/src/{{cookiecutter.project_name}}/tests/__init__.py similarity index 100% rename from {{cookiecutter.project_name}}/tests/__init__.py rename to src/{{cookiecutter.project_name}}/tests/__init__.py diff --git a/{{cookiecutter.project_name}}/tests/test_my_module.py b/src/{{cookiecutter.project_name}}/tests/test_my_module.py similarity index 100% rename from {{cookiecutter.project_name}}/tests/test_my_module.py rename to src/{{cookiecutter.project_name}}/tests/test_my_module.py diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py b/src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py similarity index 100% rename from {{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py rename to src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__version__.py b/src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__version__.py similarity index 100% rename from {{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__version__.py rename to src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__version__.py diff --git a/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py b/src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py similarity index 100% rename from {{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py rename to src/{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/my_module.py From edbba2d901704e17538ff80899a76c90ef375869 Mon Sep 17 00:00:00 2001 From: "Jurriaan H. Spaaks" Date: Wed, 21 Apr 2021 08:14:50 +0200 Subject: [PATCH 3/3] moved cookiecutter.json and hooks to src/ as well --- cookiecutter.json => src/cookiecutter.json | 0 {hooks => src/hooks}/post_gen_project.py | 0 {hooks => src/hooks}/pre_gen_project.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename cookiecutter.json => src/cookiecutter.json (100%) rename {hooks => src/hooks}/post_gen_project.py (100%) rename {hooks => src/hooks}/pre_gen_project.py (100%) diff --git a/cookiecutter.json b/src/cookiecutter.json similarity index 100% rename from cookiecutter.json rename to src/cookiecutter.json diff --git a/hooks/post_gen_project.py b/src/hooks/post_gen_project.py similarity index 100% rename from hooks/post_gen_project.py rename to src/hooks/post_gen_project.py diff --git a/hooks/pre_gen_project.py b/src/hooks/pre_gen_project.py similarity index 100% rename from hooks/pre_gen_project.py rename to src/hooks/pre_gen_project.py