-
Notifications
You must be signed in to change notification settings - Fork 660
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
Create docs directory with starter pack content #3855
base: main
Are you sure you want to change the base?
Conversation
Adding the /docs/ folder and the .readthedocs.yaml file for integration with RTD. Signed-off-by: Giulia Zanchi <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3855 +/- ##
==========================================
- Coverage 89.02% 88.93% -0.10%
==========================================
Files 255 255
Lines 14577 14827 +250
==========================================
+ Hits 12977 13186 +209
- Misses 1600 1641 +41 ☔ View full report in Codecov by Sentry. |
@edibotopic could you review this PR ? |
Set value of SOURCEDIR to "src" Signed-off-by: Giulia Zanchi <[email protected]>
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.
LGTM Giulia. I think this should just be merged to get RTD recognising the .readthedocs.yaml
and then you should be able to work on preview branches on RTD thereafter (hopefully).
There seems to be some failed lint checks relating to whitespace in a LaTeX template file in .sphinx
(outside of your direct control) and the conf.py
(under your control).
You might be able to address these issues in the config file if your team wants the /docs/
subdir to be linted also but the .sphinx
at least should probably be ignored by the action, if that can be configured.
Any failed builds on local testing of the PR were most likely due to the requirements.txt
being in the /docs/.gitignore
, which meant that it didn't push from your local machine, where everything had worked previously. You have fixed this now.
I tested this PR locally and everything works fine. There are warnings because of links to non-existent files in the index.rst
but that will be resolved once you merge the Multipass docs source files and replace the index file.
Thanks, Shayne @edibotopic ! |
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.
Thank you for the PR @giuliazanchi! I can't believe we're finally doing this 😃 I have a few fixes for missing newlines, along with one or two questions, but otherwise it all looks sane to my (unknowing) eyes.
Could you also please describe how to build/use this new folder again? Perhaps we could add that to our read me, next to the other build instructions, WDYT?
As for the failing linting, I think I am missing something. Could you please clarify what prevents fixing those errors?
BTW, thank you also for your review @edibotopic and sorry for stealing your time over to Multipass :) That's my fault, I told Giulia I would feel more comfortable with your stamp on this one.
"MD042": true, | ||
"MD045": true, | ||
"MD052": true | ||
} |
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.
} | |
} | |
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.
Just for reference, most of the code in .sphinx
comes directly from the upstream starter pack.
So any formatting changes like this and others below will likely be undone on subsequent updates, unless the changes are submitted upstream (if they would warrant that). I'm not sure if everyone is using the same linter, mind.
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.
IMO, as long as any code needs to be copied and adopted by a repo, it should adhere to its standards. Of course, the best would be to avoid any copying at all. If nothing else, we could have a submodule pointing to the starter pack along with the necessary links. Or, better, just clone the starter pack at build time.
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.
Thanks @ricab -- I see your point. It's up to you and your team to decide what's most important to prioritise and whether this should be a blocker or an improvement to plan for later.
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.
To avoid any misunderstanding, I did not mean to propose that a submodule- or build-based approach be implemented in this PR. I would love to see it, but I agree that can be pursued separately.
Failing that though, PRs should just comply with the norm (here and in future updates). This is a priority for sure. Which is why I don't understand the reluctance to just fix these basic things.
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.
It's not reluctance. The main original point I was making was that the changes being proposed needed to be considered in the context of the upstream dependency and any future updates that might override them. I think you have made some sound proposals on that and I don't object to any of these changes in the meantime.
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.
Great, I am glad we've clarified that. Thank you again for all your involvement and help on this!
margin-left: -0.5rem; | ||
padding-left: .5rem; | ||
padding-right: .5rem; | ||
} |
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.
} | |
} | |
|
||
</ul> | ||
</div> | ||
</header> |
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.
</header> | |
</header> | |
}, | ||
"reporter": "cli", | ||
"standard": "WCAG2AA" | ||
} |
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.
} | |
} | |
canonical-sphinx[full] @ git+https://github.com/canonical/canonical-sphinx@main | ||
sphinx-autobuild | ||
sphinxcontrib-svg2pdfconverter[CairoSVG] | ||
sphinx-last-updated-by-git |
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.
sphinx-last-updated-by-git | |
sphinx-last-updated-by-git | |
|
||
linkcheck_ignore = [ | ||
"http://127.0.0.1:8000", | ||
"https://github.com/canonical/ACME/*" |
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.
Is this intended for the time being?
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.
These are defaults. I think the localhost one sometimes helps prevent erroneous errors on local builds.
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.
I was referring to the ACME line specifically. I thought it would be only a default, which is why I asked. In the template, this would presumably serve as an example of what could be added. In this instantiation, I don't see a purpose. As a rule of thumb, pointless LoC are best avoided 😉
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.
Yes, indeed, I think the ACME wildcard link is just an example. The only reason to keep it as this point is that this documentation set is still being bootstrapped, so it could be useful as reference; however, I would have no objection to it being deleted.
Local builds are based on a makefile. Running
I'm not sure about this. Is the linter a part of the Multipass CI pipeline? I don't think we run a linter on docs files in my projects. For the LaTeX template, for example, this is something built-in to the starter pack. So, you could fix it to stop the linter issues but that would be temporary, and you'd have to apply the same fix again after the next update. So if anything it would be better to fix any issues there in the upstream repo. They seem to be just whitespace issues, so I'm sure they'd be easy to fix. I think it's probably better for people to have a formatter in their editor to catch these things rather than the CI, if possible.
No problem. Happy to help. |
Thank you for the build instructions. They failed for me at first, but that was probably because of leftover cruft from the last attempt. It worked after a
Good to know. We should probably add something to CI to make sure we don't forget.
Yeah, that'd be nice :)
Yes, linting is the first check that our CI runs on PRs. The failing step here is just
Exactly: just
I am all for configuring editors to do this automatically and we've recently agreed to do so in the Multipass team. However, I don't think that excludes CI. Things can still get through (as in this PR), because people have different editors, miss the memo, forget configurations in new systems, are new or external contributors, etc. The linting step in CI thus acts as a safety net. |
Yes, I wasn't saying to replace CI completely. My point was that if (and I don't think this will be the case) the /docs/ dir or /docs/.sphinx dir were to be excluded from linting because it wasn't deemed of immediate value, then editor/CLI formatters could be adopted by the people working on the docs. I raised the option just in case getting the repo connected to Read the Docs, so that the final configurations and docs migration could be completed in a subsequent PR, was the priority right now. |
@edibotopic don't get me wrong, this is a priority. For me, for the Multipass team, certainly for Giulia, who authored the PR. But being a priority doesn't give a PR a pass out of review or basic contribution standards. Especially when adhering is one git command away. Surely you understand that would be a slippery slope and a fast track to degraded quality. That said, there might be extraordinary difficulties or justification I was unaware of, which is why I asked. So far I have been unable to recognize them. Template updates can still be "fixed" in the same way. If running that extra command when syncing is too much of a burden, the source can be fixed, or the need to sync in the first place. |
@ricab I didn't know what context you had for the starter pack and just tried to provide some so that you didn't waste any effort. I have no problem with you maintaining the project and it's quality as you see fit and am not challenging that at all. So please proceed based on your judgement. I hadn't considered some of the solutions you proposed, so thanks for suggesting them. |
Of course, no worries. I just felt I should clarify my perspective and goal as reviewer here. I had very little context on the starter pack and your comments helped indeed. It is sort of like a template to boostrap things, right? At least I don't think I will forget how to build the docs anymore 🙂 |
Converting back to draft as I'm still debugging some issues on RTD |
Adding the /docs/ folder and the .readthedocs.yaml file for integration with RTD.
MULTI-1734