diff --git a/cookiecutter.json b/cookiecutter.json index 86e6a43..296ac80 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -5,6 +5,11 @@ "author_name": "", "author_email": "", "project_url": "", + "download_url": "", + "source_code_url": "", + "documentation_url": "", + "changelog_url": "", + "issue_tracker_url": "", "license": [ "BSD 3-Clause", "GNU GPL v3+", @@ -30,5 +35,12 @@ "docs/_templates", "docs/_static", ".github/workflows/sub_package_update.yml" - ] + ], + "__prompts__" : { + "project_url": "Primary website for the project, leave blank for Sunpy Homepage[]", + "sourcecode_url": "Pypi address for the project, optional", + "documentation_url": "Documentation url, optional", + "changelog_url": "Url to the changelog, optional", + "issue_tracker_url": "Url to the issue tracker, optional" + } } diff --git a/tox.ini b/tox.ini index e433bf8..46dead5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ deps = cookiecutter pytest-cookies pytest-venv - tox[testing] + tox[test] commands = !bake_cookies: pytest tests/ {posargs} diff --git a/{{ cookiecutter.package_name }}/pyproject.toml b/{{ cookiecutter.package_name }}/pyproject.toml index c743f14..0d9390a 100644 --- a/{{ cookiecutter.package_name }}/pyproject.toml +++ b/{{ cookiecutter.package_name }}/pyproject.toml @@ -27,6 +27,28 @@ dependencies = [ ] dynamic = ["version"] +[project.urls] +{%- if cookiecutter.project_url %} +Homepage = "{{ cookiecutter.project_url }}" +{% else %} +Homepage = "https://sunpy.org" +{%- endif %} +{% if cookiecutter.download_url %} +Download = "{{ cookiecutter.download_url }}" +{% endif -%} +{% if cookiecutter.sourcecode_url %} +"Source Code" = "{{ cookiecutter.sourcecode_url }}" +{% endif -%} +{%- if cookiecutter.documentation_url %} +Documentation = "{{ documentation_url }}" +{% endif -%} +{%- if cookiecutter.changelog_url %} +Changelog = "{{ changelog_url }}" +{% endif -%} +{%- if cookiecutter.issue_tracker_url %} +"Issue Tracker" = "{{ cookiecutter.issue_tracker_url }}" +{% endif %} + {% if cookiecutter.include_example_code == 'y' -%} [project.scripts] open_astronomy_package_template_example = "{{ cookiecutter.module_name }}.example_mod:main" @@ -46,11 +68,6 @@ docs = [ "packaging", ] -{%- if cookiecutter.project_url %} -[project.urls] -repository = "{{ cookiecutter.project_url }}" -{%- endif %} - [tool.setuptools] zip-safe = false include-package-data = true