Page MenuHomeSoftware Heritage

Refactor the sphinx-dev build environment to get rid of the link-stamp step
ClosedPublic

Authored by douardda on Apr 28 2020, 4:33 PM.

Details

Summary

by installing swh packages in standard (non-editable) mode, so we have an
easy to specify swh/ directory in which all the swh packages are installed.

The main drawback of this solution is we loose the possibility of rebuilding
the doc (in tox) while editing a package's documentation without rebuilding
the tox env (i.e. using tox -r). But IMHO this usage has never been
adpoted by anyone, so it's much simpler that way.

Diff Detail

Repository
rDDOC Development documentation
Branch
wip
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 12112
Build 18375: arc lint + arc unit

Event Timeline

The only caveat I see from this diff is that it forces people to use tox to build docs reliably.

I don't mind (I almost never use direct commands anymore) but some people might?

(also, looking at these files, a bunch of django < 2s should go away)

anlambert added a subscriber: anlambert.

The main drawback of this solution is we loose the possibility of rebuilding
the doc (in tox) while editing a package's documentation without rebuilding
the tox env (i.e. using tox -r). But IMHO this usage has never been
adpoted by anyone, so it's much simpler that way.

While individual doc build can still be launched in each subproject, I am fine with it.
Building the whole doc requires to retrieve a LOT of dependencies, so the tox approach seems a better choice.
Could we manage to launch tox -r -e sphinx-dev when calling make ?

docs/Makefile
42–43

This line needs to be removed.

This revision now requires changes to proceed.Apr 28 2020, 4:57 PM
In D3073#74823, @olasd wrote:

The only caveat I see from this diff is that it forces people to use tox to build docs reliably.
I don't mind (I almost never use direct commands anymore) but some people might?

As long as it is still possible to just build the doc for a specific project, I also don't mind.

+1 on @anlambert request, can we have a more abstract UI rather than "tox -e sphinx-dev" to build the doc?
Ideally, as running "make" under swh-foo/docs right now just works, maybe we can make that invoke the needed tox voodoo?

While individual doc build can still be launched in each subproject, I am fine with it.

As far as I know, this diff should not impact the ability to locally build the doc.

docs/Makefile
42–43

good catch (again)

Could we manage to launch tox -r -e sphinx-dev when calling make ?

I managed to do it by adding this in swh-docs/Makefile.local

tox-doc:
	tox -r -e sphinx-dev

all: tox-doc

Calling make in swh-docs will then launch tox.

tox.ini
12

django < 3

21

same here

There is also a dependency in requirements.txt to update: swh.storage[schemata,listener] => swh.storage[schemata]

fixes according to comments

  • get rid of <2 constraint for django,
  • remove trailing ref to ln-sphinx-subprojects
  • add an all target in Makefile.local

Django version must be pinned to < 3

tox.ini
12

This should really be django < 3 to match swh-web and swh-deposit requirements

This revision now requires changes to proceed.Apr 28 2020, 5:41 PM
This revision is now accepted and ready to land.Apr 28 2020, 5:49 PM