simplify docbuild: merge Windows and Linux commands. Other minor fixes.#198
Conversation
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Don't force users to downgrade their python code. Successfully tested with: breathe 4.11.1 sphinx 2.12 docutils 0.15.2 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Forward slashes (like "sof/doc") work everywhere on Windows except in CMD.EXE. As they're passed to ninja or make, they work here - tested. "dnf install default-jre" doesn't work any more on Fedora 31, replace with "dnf install java" that does. Add double backquotes ``monospace`` font in a number of places (badly needed for --prefix; the double dash was lost) Signed-off-by: Marc Herbert <marc.herbert@intel.com>
| docutils==0.14 | ||
| breathe>=4.9.1 | ||
| sphinx>=1.7.5 | ||
| docutils>=0.14 |
There was a problem hiding this comment.
I just noticed Travis relies on this file too. So this change affects CI too, making it less deterministic? If that's considered an issue then maybe we could have two different requirements.txt files?
lgirdwood
left a comment
There was a problem hiding this comment.
LGTM, but needs answer on travis.
| docutils==0.14 | ||
| breathe>=4.9.1 | ||
| sphinx>=1.7.5 | ||
| docutils>=0.14 |
|
@lgirdwood @marc-hb If this will influence the Travis, it will result Travis failed for this PR. I think the Travis survive this change. |
|
@xiulipan let me expand what I meant. Looking at https://travis-ci.org/github/thesofproject/sof-docs/builds/663789659 we see that the Travis system downloaded breathe-4.14.1, Sphinx-2.4.4, docutils-0.16, etc. Tomorrow it may download breathe 5.1.2.3, Sphinx 3.14, docutils-0.42, etc. The day after it may download higher versions again. Are we happy with that lack of control? If we are not happy with that, then I can think of two possible solutions:
|
|
@marc-hb If your change to the |
So let's say for instance we discover in the future that sphinx 3.0 is not compatible. Then we change the requirements.txt to: Sounds good to me. Is this what you meant? |
|
@marc-hb Yes, this will also help to check if |
Sphinx 2 and above were compatible... until PR #207. |
|
PR #220 switched |
|
Quoting and answering @intelkevinputnam in PR #225
So all supported projects are all hardcoded to the same pip versions? Just trying to understand the version control process.
This assumes users don't have another sphinx project hardcoded to different versions. I think you missed my point about "hidden virtualenv requirement".
Very rare. In my experience these projects are very good with backward compatibility.
I don't get this sorry. It doesn't seem to match the older discussion above. |
|
OK, let me clarify and wrap up my "two files" proposition above:
I can also easily add a second, "sphinx of the day" Travis job that installs with Please thumb this comment up or down (and explain why if down) |
|
Yes, projects do hard code dependencies. Each tech writer/project does their own thing to manage this. Some use venv (I'm working with another team that insists on this). I have a GUI solution that uses Tox that manages dependencies per project, which explains the .tox addition to conf.py in #219. Other projects use Docker to view PRs built by Jenkins or build locally. Best practice for docs is not to update to the latest version unless there are specific features needed. It isn't just a matter of features. Changes are made to look and feel that may not be what project wants and may break existing customizations (see static/sof-custom.css). |
|
Thanks @intelkevinputnam for the additional info, very useful. These requirements and additional tooling make sense to me now but they would be too constraining and too high of a setup cost for "drive-by" documentation contributors. I think it's very important that any random person who spots a documentation mistake can quickly build locally a small fix before submitting it. I think my "two requirements.txt" proposition is a simple and good way to address both situations. The |
|
It's fine with me, though this doc set is a little complex for that. The casual user isn't likely going to notice that you need to build the API doxygen content and be confused by all the resulting warnings. If they go to the trouble of doing that, then the additional step of running pip install -r requirements.txt is trivial. |
Thanks!
Already addressed in a97756a. Try it by cleaning BTW the "missing doxygen" warnings are surprisingly clear and easy to dismiss to focus on the other ones.
Running the command is easy, too easy even. Root-causing much later why other, unrelated projects have changed and how is not. |
|
Agreed that switching isn't optimal, which is why I have started recommending the GUI solution (internal only for now) to the tech writers I work with as it creates a Python project-local build environment that updates when the requirements.txt is changed either locally or upstream. Basically invisible venv for tech writers. Which means Python dependency changes are easier to deal with than others. Ninja is a new dependency for generating docs process, right? It can be tough juggling the needs of both the technical team and the content team, thanks for being flexible. Do you guys have access to build infrastructure that can keep the artifacts around? Would be nice to simply have each PR built in the cloud and review output there. No local build required. |
Sounds cool!
Yes and no. The doxygen guide used to have something like: "switch case Windows: ninja; case Linux: Make" but in this PR and #215 I simplified this to just ninja. ninja is still not a hard requirement for doxygen but it's the easiest and fastest way and the only documented way now. Keep it simple. Compared to
I don't know, I'm new to this project. I've used exactly that in Zephyr and it was beyond awesome for reviewing documentation changes.
Well, if you don't mind the 5-10 minutes between each typo fix and spamming Travis to the point they throttle us down :-) For instance to debug and fix #225 and thesofproject/sof#2773 I had to build countless times + disable UML with b1f8353 |
Avoids hardcoding and virtualenvs. See problem statement and discussion in PR thesofproject#198 and extensive comments in the new file itself. Successfully tested with stock, "apt" versions on Ubuntu 18.04 LTS and a totally empty 'pip3 list --local' Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Avoids hardcoding and virtualenvs. See problem statement and discussion in PR thesofproject#198 and extensive comments in the new file itself. Successfully tested with stock, "apt" versions on Ubuntu 18.04 LTS and a totally empty 'pip3 list --local' Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Avoids hardcoding and virtualenvs. See problem statement and discussion in PR thesofproject#198 and extensive comments in the new file itself. Successfully tested with stock, "apt" versions on Ubuntu 18.04 LTS and a totally empty 'pip3 list --local' Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Done in PR #231 , thanks for reviewing. |
Avoids hardcoding and virtualenvs. See problem statement and discussion in PR #198 and extensive comments in the new file itself. Successfully tested with stock, "apt" versions on Ubuntu 18.04 LTS and a totally empty 'pip3 list --local' Signed-off-by: Marc Herbert <marc.herbert@intel.com>
See commit messages for details.
Biggest change is merge Windows and Linux commands into one.