Page MenuHomeSoftware Heritage

Main documentation build broken by missing swh-web-specific setup
Closed, MigratedEdits Locked

Description

The swh.web module needs django initialized with a proper configuration enviroment variable before its documentation builds. This initialization is done in the swh-web specific docs config.

The main documentation build, which imports all subdocumentations, needs to also do this initialization. We probably need to have a generic pattern to do this initialization for all modules that need it.

Event Timeline

olasd lowered the priority of this task from High to Normal.Sep 15 2017, 4:31 PM

(Lowering priority as the problem has been worked around.)

We've got a few options:

  1. keep duplicating hacks between submodules and the main docs
  2. for each submodule: provide an importable "docs/extra_conf.py" file, and collect those in the main documentation config
  3. add autodoc_mock_imports = ['django'] to the documentation config template to work around the current instance of this problem
  1. is what we do now; 2. is the most generic solution but adds a bunch of scaffolding to the main docs repository; 3. punts the problem until the next thing we won't be able to import