-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPEC 13: Recommended targets and naming conventions #324
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,53 @@ | ||||||||||
--- | ||||||||||
title: "SPEC 13 — Recommended targets and naming conventions" | ||||||||||
number: 13 | ||||||||||
date: 2024-06-05 | ||||||||||
author: | ||||||||||
- "Pamphile Roy <roy.pamphile@gmail.com>" | ||||||||||
- "Matthias Bussonnier <bussonniermatthias@gmail.com>" | ||||||||||
- "Jarrod Millman <millman@berkeley.edu>" | ||||||||||
discussion: https://discuss.scientific-python.org/t/spec-13-recommended-targets-and-naming-conventions | ||||||||||
endorsed-by: | ||||||||||
--- | ||||||||||
|
||||||||||
## Description | ||||||||||
|
||||||||||
For consistency and decreased cognitive load across the ecosystem, this SPEC | ||||||||||
recommends naming conventions around various project aspects--such as project | ||||||||||
structure, repository layout, folder names, task runner and `pyproject.toml` | ||||||||||
targets name. | ||||||||||
|
||||||||||
From a cursory survey in the Scientific Python ecosystem, we discover some | ||||||||||
frustration from contributors and maintainer when moving from one project to | ||||||||||
another and believe that consistency will make it both easier for existing | ||||||||||
maintainer to contribute to project as well a decrease the confusion of new | ||||||||||
developers when contributing or creating new projects. | ||||||||||
|
||||||||||
There seem to be a strong consensus with preference for `docs` in favor of | ||||||||||
`docs`, and a preference for `tests` in favor of `test`. | ||||||||||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
"preference for tests" means that "tests" is preferred, but "in favor of test" means that "test" is preferred, so it was not clear to me which was preferred. |
||||||||||
|
||||||||||
We will note though that the _extra_ optional dependencies on PyPI seem to favor | ||||||||||
`test` (present on 7573 packages) vs `tests` (2362 times). | ||||||||||
|
||||||||||
## Implementation | ||||||||||
|
||||||||||
For the tie being we will not pronounce ourselves on the optional extra | ||||||||||
`extra` dependency for `pyproject.toml`. | ||||||||||
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
And I'd suggest moving this to the end. It might be OK to precede this section with one about "Scope", but as-is, it looks like this is just one example of something that was not decided. |
||||||||||
|
||||||||||
For other targets and folders we recommend that: | ||||||||||
|
||||||||||
- Targets related to testing be named `tests` (and not `test`). For example | ||||||||||
`spin tests`, `python dev.py tests`, `nox -s tests`. | ||||||||||
- Folders containing tests be names `tests`. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
- Targets related to documentations be named `docs` (and not `doc`). For example | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(It was mentioned during the discussion that we say "docs" even though "documentation" is the full word.) |
||||||||||
`spin docs`, `make docs`, `tox -s docs`. | ||||||||||
- That the documentation `extra` optional dependency be named `docs` (and not | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to think that adding a recommendation for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I strongly recommend no recommendation on And
Footnotes
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, no strong preference for |
||||||||||
doc), so that docs dependencies can be installed with `pip install .[docs]` | ||||||||||
- Use lowercase. | ||||||||||
|
||||||||||
It is appropriate to have the singular aliases to ease transition, but the | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might mention what the aliases are for. Probably not aliases for folders? |
||||||||||
plurals should always be the default. | ||||||||||
|
||||||||||
## Notes | ||||||||||
|
||||||||||
![Vote from ecosystem maintainers at the 2024 Scientific Python Ecosystem Summit in Seattle](./ecosystem_voting.jpg) |
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.
"cursory" means hasty and without attention to detail, but suggests that it wasn't done well. Readers might not think it's appropriate to base a SPEC on a "cursory" survey. "Informal" is also true but may carry less of a negative connotation.
Isn't scientific python used in the lower case sense here?
Or consider "creating new projects or contributing to existing ones". (I found it easy to misread "contributing or creating new".)