Skip to content
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

Suggestions of improvements #37

Closed
bzah opened this issue May 2, 2024 · 2 comments · Fixed by #38
Closed

Suggestions of improvements #37

bzah opened this issue May 2, 2024 · 2 comments · Fixed by #38

Comments

@bzah
Copy link

bzah commented May 2, 2024

  • Date you used Cookiecutter PyPackage: March 2024
  • Cookiecutter version used, if any: f391bbd (Feb 28, 2024)

Description

This issue is meant to upstream the improvements suggested on xncml by @fmigneault comments in the PR xarray-contrib/xncml#76

On CHANGELOG.rst/CHANGES.rst:

  • Add .. _changes_x.y.z: as section titles and add the bummyversion config to manage these automatically (example of config here).

On CONTRIBUTING.rst

  • Remove the leading $ when suggestion commands, it makes it harder to copy-paste commands.
  • Remove .. highlight:: shell at the top and use explicit .. code-block:: shell when needed.
  • Use the make commands (in particual make dev and make release), instead of rewriting their content through individual commands.

On Makefile

  • use python -m pip install no need to show flit here.
  • For the local installation do python -m pip install --editable .[all] (see pyproject.toml below for the [all] part).
  • Add a make release-conda do wrap the conda release process described in CONTRIBUTING.rst (edit: not necessary as the initial release is done only once and subsequent release are managed automatically on the feedstock).
  • add pre-commit install step to make dev.

On pyproject.toml

  • add a all = ["{{project_name}}[dev]", "{{project_name}}[docs]"] to easily install all dependency for when stting up a local dev environment.
  • Add the bumpmyversion template update for CHANGES.rst

On readme.rst

  • Use .. code-block:: python instead of ```python
  • Remove leading $ for shell commands

At last, an architectural suggestion: we could also change the overall layout to follow a src layout instead of a flat layout, but this may have a higher migration cost than the other changes suggested above. (separate issue #39)

note: I will be opening a PR shortly with these changes (apart from the architectural change).

@bzah bzah mentioned this issue May 2, 2024
1 task
@Zeitsperre
Copy link

Thanks so much for upstreaming your changes! I've been meaning to perform an update of the existing projects versioned here, so it'll be great to have your improvements as well!

  • Remove the leading $ when suggestion commands, it makes it harder to copy-paste commands.

I think I added this specifically so that:

  1. It's clear to users that these are terminal commands
  2. It's a tiny bit harder to just copy and paste

If you think it's unnecessary, I'll go with your suggestion.

  • use python -m pip install no need to show flit here.

Good call. I think I was reading some older documentation for flit when I wrote that. This will make our (development) lives much less complicated.

we could also change the overall layout to follow a src layout instead of a flat layout, but this may have a higher migration cost than the other changes suggested above.

That's a major change, but I would be willing to discuss it at the very least. This would affect several projects, but if the gains are worthwhile, I don't see an issue with migrating the template over. Perhaps we can start an issue about that specifically?

@bzah
Copy link
Author

bzah commented May 3, 2024

Remove the leading $ when suggestion commands, it makes it harder to copy-paste commands.

It's clear to users that these are terminal commands

I think it's the role of the renderer to make it clear it's a command and both sphinx for readthedoc or github are doing it well IMO. It's only when reading the raw rst file that it can be confusing right ?

I agree for the src layout, I will create a dedicated issue.

@bzah bzah closed this as completed in #38 May 13, 2024
bzah added a commit that referenced this issue May 13, 2024
Closes #37

- Renamed CHANGES.rst to CHANGELOG.rst
- Remove leading '$' for commands to easy copy/pasting
- Moved 'how to release' section from CONTRIBUTING to a dedicated docs/releasing.rst
- Added 'all' dependency target to install both docs and dev dependencies
- Added pre-commit install to the 'make dev' command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants