[DOCS] Multiple errors in CONTRIBUTING.md
CONTRIBUTING.md contains several errors that would cause a new contributor following the instructions verbatim to hit walls. Below is the list of findings:
Broken git workflow (Pull Requests section)
- https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L71 clones the upstream repo, not the contributor's fork. Step 2 says "Clone your fork" but the command clones the original.
- https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L79 will fail because
upstreamwas just added as a remote (line 73) but never fetched. Agit fetch upstreamis needed before this step. - https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L136 references a
developbranch that doesn't exist. Should beupstream/master, consistent with line 79. - https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L142 pushes to upstream (the original repo) instead of
origin(the contributor's fork). Should begit push -u origin ...for the 1st push and thengit pushfrom there on.
Broken install command
- https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L84-L96
pip install -e . --all-extras --requirement pyproject.tomldoes not work with standard pip.--all-extrasis auv pipflag (not available in pip), and--requirementexpects a requirements.txt-format file, not pyproject.toml. The Makefile'sinstall-devtarget usesuv pipfor the same command, which works.
Markdown rendering bugs
- Lines 246 & 295 contain stray closing
```after the code blocks in "Function usage and import style" and "Class import style" sections, producing broken rendering.
Misc
- There are a bunch of spelling & grammar corrections needed, and some links need updating (links work but via redirects from old URL to new URL, best to update this doc to contain the new URL)
- https://github.com/lightly-ai/lightly/blob/904c50a7cc8bff9dbc0863a99bc71c84422322a8/CONTRIBUTING.md?plain=1#L146 asks contributors to "print the changes made to the webpage as PDF and include them in the PR" for documentation changes. Would it make more sense to automate this via a docs-build check in CI instead? That would be cleaner and more seamless. Contributors wouldn't need to manually generate and attach PDFs, and reviewers could preview rendered docs directly from CI artefacts or a deploy preview. This is more of a question and may need a separate issue to be opened to address.
Thanks a lot for the findings @RecreationalMath!
Would you like to address them, otherwise we would do it on our side? About 5.: I would just enforce the usage of uv and get rid of the "normal" pip completely. The rest of your suggestions make sense.
"print the changes made to the webpage as PDF and include them in the PR" for documentation changes. Would it make more sense to automate this via a docs-build check in CI instead?
That would ofc be the ✨ prime ✨ solution. I don't think we see an immediate need for this, so we probably would not invest time on our end, but we could discuss a PR. However, I would do it separately and discuss a bit first.
Thanks a lot for the findings @RecreationalMath! Would you like to address them, otherwise we would do it on our side? About 5.: I would just enforce the usage of
uvand get rid of the "normal" pip completely. The rest of your suggestions make sense.
Sure, I'll raise a PR shortly. Thanks for clarifying point 5.
"print the changes made to the webpage as PDF and include them in the PR" for documentation changes. Would it make more sense to automate this via a docs-build check in CI instead?
That would ofc be the ✨ prime ✨ solution. I don't think we see an immediate need for this, so we probably would not invest time on our end, but we could discuss a PR. However, I would do it separately and discuss a bit first.
I am more interested in contributing to Lightly on the ML front, but when I set up my local dev environment, I noticed several gaps that I felt should be addressed. So I just thought of going through them quickly. I'll open a separate issue for an automated docs-build in CI and initiate the discussion. If nobody else picks it up, I'm happy to do it myself, perhaps next month.
I am more interested in contributing to Lightly on the ML front
Probably worth more your time and effort :) But feel free to open an issue and discuss.