GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — SPEC 13: Recommended targets and naming conventions by tupui · Pull Request #324 · scientific-python/specs Conversation
Member
Topic raised during the summit. Discussion: https://discuss.scientific-python.org/t/spec-13-recommended-targets-and-naming-conventions/1226
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Carreau
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Carreau
reviewed
Member
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.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Carreau
added a commit
to Carreau/cookie
that referenced
this pull request
Carreau
added a commit
to Carreau/cookie
that referenced
this pull request
Carreau
added a commit
to Carreau/cookie
that referenced
this pull request
pllim
reviewed
Contributor
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
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Carreau
added a commit
to Carreau/cookie
that referenced
this pull request
pllim
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Carreau
added a commit
to Carreau/cookie
that referenced
this pull request
bsipocz
reviewed
Member
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 also add some defaults for declaring optional dependencies:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
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.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
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. never mind, should have read all the comments below before commenting, as this was already mentioned.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
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.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
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. test --> tests, bike shedding, but I'm 👎 on this. As it's test-dependencies in my view while the other recommendation is about a directory that contains the tests
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
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. Just hard to remember that "s" is for testing dir (
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
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. astropy does it this way since forever 😄
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
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. Not too fond of
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
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. We also limited the discussion to We can extend to other naming conventions later.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
FYI, almost every package I work on (regardless of whether I set it up) uses |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Quick numbers on a somewhat older copy of PyPI indicates
The reverse is true for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: M Bussonnier <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
|
I mean we had a vote here 😅 We will discuss this once more here with everyone. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think we were roughly aware that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think you should have a very good reason to go against a 3x more popular choice. It's much harder to suggest the opposite of what everyone does and hope people change than it is to encourage a self-adopted standard. Maybe matching the folder name is good enough reason, but folder names are not the same things as extras, so not sure. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
💯 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It takes less time for people to change things than writing a comment to argue honestly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We can also punt for now on I personally can live with extra and folders being different as long as there is some consistency across projects. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This is not remotely helpful or realistic. All CI files, most cibuildwheel configs, task runners, etc. all have to change. Then CI has to run. If everything passes, then it has to be merged and released. Then all third party packaging that uses these may also have to change. This is for every package - I maintain over 40. How is minimizing this saying "less time for people to change things" at all remotely considerate of other people's time? Aren't SPECs supposed to be community consensus? Aren't they supposed to be discussed? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry for the joke there. I see it can have been read in a different way and here we had quite some fun making this draft. Anyway, I was only saying that besides very active people like you, this would not be that difficult for most people who barely have a single repo to handle. Also as with all the specs there is endorsement vs adoption. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Okay, it rubbed me the wrong way. You have to remember this is also being proposed as a rule for repo-review, which is not just a suggestion in a document! PS: To be clear, I'm not against the idea, and don't really care other than wanting there to be some sort of standard - If something does become standard, then automatically picking up on it if defined can simply some tooling, for example. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The repo-review one is just me finding this spec as an excuse to try to understand the code of repo-review. I think it makes sens is this gets adopted to be added to repo-review (and reflected in packaging guide), but the submission to repo-review was not a global decision. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I agree on that, but I think that's why it's important make sure the SPEC has the correct recommendation. Once it's in the SPEC, it would eventually come to sp-repo-review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I pushed some modifications to clarify that we punt for now on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FYI, Only a "preference" for a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use
I think it's okay to recommend a specific naming convention but historically my view is this: https://discuss.python.org/t/providing-a-way-to-specify-how-to-run-tests-and-docs/15016/49 Basically, I am very wary of standardization for environment manager configuration. As long as we don't start advocating for extra stuff then it seems relatively innocuous to me 🙂 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Wow, I didn't realize "test" and "doc" were already reserved as the testing and docs extras. Especially since "docs" is 3x more popular. Thanks! I recommend we follow Python's standards then for extras, at least for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've opened pypa/hatch#1553 to suggest hatch pick up on the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - Folders containing tests be names `tests`. | ||
| - Targets related to documentations be named `docs` (and not `doc`). For example | ||
| `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.
The reason will be displayed to describe this comment to others. Learn more.
I would like to think that adding a recommendation for all and dev are non-controversial, too?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I strongly recommend no recommendation on [dev]. Having an "all in one" environment makes the environment hard to solve, sometimes impossible to solve. Solvers are very sensitive to the number of dependencies in an environment. There was a time when you couldn't install black and tensorflow in the same environment due to dependency conflicts. I've seen solvers choke for minutes1 trying to solve updates on massive "all-in-one" environments. And you never need to install your code formatter, or pre-commit, etc. in the same environment as your package, they are stand-alone tools!
And [all] sometimes means all true optional dependencies, not testing and development dependencies. Like validate-pyproject[all].
uv is currently working on a solution for project-level "pipx"-like installs. And there is an effort to make dependency groups a standard in PEP 735. How about avoiding any extra recommendation until PEP 735 is accepted or rejected, and we look into seeing if there's interest in changing the official [doc] extra recommendation to [docs]?
On average. The record I've seen was 25 hours. ↩
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
OK, no strong preference for [dev], but definitely having a true, user facing dependencies into [all], so it should have no testing or documentation ones in there.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I didn't know what the SPEC was about, and found the term "target" quite confusing; would "Recommended naming conventions" capture the whole scope well enough? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
My recommendation: Avoid mentioning extras for now. I don't think a SPEC should make a recommendation in direct opposition to the official guidelines lightly, so we can open a discussion about Long term, having the recommendations on extras is good, but let's not hastily add something that contracts a 7+ year old official guideline. The most important thing it to have a standard, so tools can automatically optimize if you follow it. I'd replace the word "target" everywhere with "task", as it's referring to task runner's unit of work, which I think "task" conveys in a tool-agnostic way. Nox calls them sessions. And I think "Recommended naming conventions" is a better SPEC name, too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| - 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.
The reason will be displayed to describe this comment to others. Learn more.
| - Folders containing tests be names `tests`. | |
| - Folders containing tests be named `tests`. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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 was a problem 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?
| 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. | |
| From an informal of scientific Python developers, we discover some | |
| frustration from contributors and maintainers when moving from one project to | |
| another. We believe that consistency will make it both easier for existing | |
| maintainers to contribute to projects as well as decrease the confusion of new | |
| developers when creating or contributing to projects. |
Or consider "creating new projects or contributing to existing ones". (I found it easy to misread "contributing or creating new".)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| There seem to be a strong consensus with preference for `docs` in favor of | ||
| `docs`, and a preference for `tests` in favor of `test`. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| There seem to be a strong consensus with preference for `docs` in favor of | |
| `docs`, and a preference for `tests` in favor of `test`. | |
| There seem to be a strong consensus with preference for `docs` over | |
| `doc`, and a preference for `tests` over `test`. |
"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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| For the tie being we will not pronounce ourselves on the optional extra | ||
| `extra` dependency for `pyproject.toml`. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| For the tie being we will not pronounce ourselves on the optional extra | |
| `extra` dependency for `pyproject.toml`. | |
| For the time being, we will not specify a name of the optional extra | |
| `extra` dependency for `pyproject.toml`. |
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - 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`. | ||
| - Targets related to documentations be named `docs` (and not `doc`). For example |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| - Targets related to documentations be named `docs` (and not `doc`). For example | |
| - Targets related to documentation be named `docs` (and not `doc`). For example |
(It was mentioned during the discussion that we say "docs" even though "documentation" is the full word.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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.
The reason will be displayed to describe this comment to others. Learn more.
Might mention what the aliases are for. Probably not aliases for folders?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.