-
Notifications
You must be signed in to change notification settings - Fork 0
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
docs: Docathon 📚 #22
docs: Docathon 📚 #22
Conversation
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Great work. Reviewing in readthedocs, I noticed a few things: _ Should we tell contributors to avoid rewriting history in their PR branches, or not ? _ in https://anemoi--22.org.readthedocs.build/en/22/contributing/code_style.html _ is this duplicated doc for "testing" ? _ "longtests" is not an English word in "@pytest.mark.longtests". I would rather have @pytest.mark.large and/or @pytest.mark.@long _ in "Configuration Handling", it seems that the "#." syntax is buggy. |
Since it will get squashed anyway, does that matter? (just curious) |
Thanks for the feedback!
The "Testing Guidelines" are quite long, so we decided to separate them out and only have a brief section in contributing guidelines with a reference. Since this seems to not have been clear I have shortened that section (also to avoid redundancies), and made the reference to guidelines more explicit -- hope it is more clear now.
I would prefer to not address this in this PR since it requires a change in the testing code. Can you raise this issue in anemoi-core?
Good spot! Fixed. |
When developing on your own, I like to commit very often on my local clone, so I don't lose my work and I can stash when things get bad. Usually, I don't want to expose all these drafts to the public view, so, I In a "best practice guideline", we could encourage one behaviour or another. But we also could say nothing about it, as you wrote, this does not matter for the final state of the code in the package : once it has been merged, all these commits are hidden. |
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.
A definite improvement and a good starting point to build on in the future. Thanks!
(Added a few comments - feel free to accept/reject these as you see fit)
|
||
.. code:: bash | ||
|
||
git clone https://github.com/ecmwf/anemoi-core/ |
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.
The line below is for a generic package - should this also be generic (rather than core
)? (Maybe we could tie in with the variable suggestion below?)
Also, should we instead prefer the use of ssh over https? I feel like I once read that GitHub was encouraging ssh over https, but I might be wrong...
(That said, if we recommend ssh, we may want to point people at this GitHub page for help getting set up)
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.
NB: The README.md file in this repo recommends ssh
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.
See above (as to package vs core)
I haven't changed to ssh for now -- different question: does this even make sense given that this is the public documentation and we are assuming people are working on forks?
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.
Good point - copying over my comment from Teams for visibility to others.
I think if you want to cover the forked repo workflow, you could either: run through the GitHub forking process, then tell people to clone their fork, and then set up upstream as a remote, and then explicitly set no_push on upstream. Or: clone upstream, and if people want to fork, set up the fork as a remote.
docs/contributing/guidelines.rst
Outdated
Branching Guidelines | ||
********************** | ||
|
||
- Use feature branches for new features (e.g., `feature/your-feature`) |
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.
For consistency we should recommend semantic commit keywords, so feat/your-feature
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.
Challenge: if it's on a personal fork, does it matter?
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.
No, but also doesn't hurt to at least keep the example consistent -- which it now is. (I think this is one of several places where we don't exclusively have the "fork case" in mind. But I also don't think that this particular bit overburdens users -- happy for people to disagree.)
docs/contributing/guidelines.rst
Outdated
While these commit message conventions are recommended for all branches | ||
in Anemoi, they are strictly enforced only for commits to the ``main`` | ||
branch. This enforcement is particularly important as our automated |
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.
While this is true, it can be confusing to talk about commits to main when contribors don't commit to main directly.
Instead, I would say that it's only enforced for the PR titles. You already say this in the next section, but I would reiterate it here.
I would maybe even not talk about "commit guidelines" at all, but only talk about "PR title guidelines". Since the commits that users do inside their own branch don't really matter at all imo. When you review PRs you just look at the code changes, not at the commit messages.
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.
More flexibility in commit messages is something I approve of. I think the fewer rules we impose before things get to the PR/merging stage, the better - at least in terms of reducing the barriers to contributing.
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.
But I can absolutely see why having some enforcement around the PR merge-sqaush-commit is helpful :)
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.
Very good point. Have changed updated the "commit guidelines" (now "PR title guidlines") accordingly
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.
On Aaron's point, the wording is now that we "recommend" this for commits more generally -- hope that leaves enough room (as it's under PR title guidelines, not commit guidelines)
@floriankrb I do this too, and think it's good practice to try to clean up your git history before creating a PR (although I'm not always perfect at this...). Once the code's public, I think we should generally try to avoid rewriting history/force pushing in order to avoid inconveniencing other people. That said, draft PRs are a good way of getting feedback while the code is still being developed (and something we encourage in the docs) - and are explicitly not in a mergeable state - so maybe we could say that you're free to do whatever you want on a draft PR, but if it's a proper PR (i.e. intended to be merged), then we probably shouldn't be rewriting history from that point on? That seems like a sensible balance to me. What do you think? |
Co-authored-by: aaron-hopkinson <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: aaron-hopkinson <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: aaron-hopkinson <[email protected]>
Co-authored-by: aaron-hopkinson <[email protected]>
Co-authored-by: aaron-hopkinson <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: Harrison Cook <[email protected]> Co-authored-by: Corentin Carton de Wiart <[email protected]> Co-authored-by: Baudouin Raoult <[email protected]> Co-authored-by: Vera Gahlen <[email protected]> Co-authored-by: aaron-hopkinson <[email protected]>
📚 Documentation preview 📚: https://anemoi--22.org.readthedocs.build/en/22/