Skip to content

Conversation

@h-chmeruk
Copy link
Contributor

Which issue(s) are closed by this pull request?

Closes #13

Changes proposed in this pull request:

  • Added pyproject.toml to the template directory.
  • Provided 2 new test functions for the pyproject.toml file, updated the test_generated_file_exists() function.
  • Added 5 new parameters to copier.yml: project_short_description, version, keywords, pypi_license_classifiers_list, pypi_license_classifier

@h-chmeruk h-chmeruk added the enhancement New feature or request label Dec 17, 2025
Copy link
Member

@ahms5 ahms5 left a comment

Choose a reason for hiding this comment

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

nice, thank you, only minor comments

keywords:
type: str
help: "Keywords to help categorize the project (e.g., on PyPI)."
default: "'acoustics','pyfar'"
Copy link
Member

Choose a reason for hiding this comment

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

Can we also do it here without ' to uniform it with dependencies.

spaces between them. These dependencies will be included in the pyproject.toml file.
default: "numpy,scipy"

valid_python_versions:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
valid_python_versions:
_valid_python_versions:

maybe we can add _ to make clear that they are private

Copy link
Contributor Author

@h-chmeruk h-chmeruk Dec 19, 2025

Choose a reason for hiding this comment

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

Thank you for the review!!

I found out that adding _ to the parameters marks them as secret. This is stated on the copier website. If I understand correctly, the answers to such questions are not stored in the .copier-answers.yml file and cannot be used without being explicitly stored in another parameter.

I don't think we want that kind of behavior, so I wouldn't add a _ to the names.

Copy link
Member

Choose a reason for hiding this comment

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

Alright. Sounds good

{% set min_index = versions.index(minimum_python_version) %}
{{ versions[min_index:] }}
pypi_license_classifiers_list:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pypi_license_classifiers_list:
_pypi_license_classifiers_list:

EUPL-1.2: "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)"
MPL-2.0: "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)"

pypi_license_classifier:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pypi_license_classifier:
_pypi_license_classifier:

Check out the [contributing guidelines](https://{{ project_slug }}.readthedocs.io/en/stable/contributing.html) if you want to become part of pyfar.


VALID PYTHON VERSION {{ valid_python_versions }}
Copy link
Member

Choose a reason for hiding this comment

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

what is this? I would not add it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, that wasn't supposed to be here. Thanks for noticing!


project_short_description:
type: str
help: "A short description of the project. Used in the documentation"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
help: "A short description of the project. Used in the documentation"
help: "A short description of the project. Used in the documentation and in the package metadata."

"{{ pypi_license_classifier }}",
"Natural Language :: English",
"Programming Language :: Python :: 3",
{%- for version in valid_python_versions %}
Copy link
Member

Choose a reason for hiding this comment

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

elegant

'description = "my_project_short_description"',
'requires-python = ">=3.11"',
"'acoustics',",
"'pyfar'",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"'pyfar'",
"\n 'pyfar',\n",

maybe also check if the indent is corret. This could also be applied to other paramters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add pyproject.toml

3 participants