Skip to content

Readthedocs needs config for install #78

Closed

Description

@sverhoeven

The builds of the documentation on readthedocs.org fail with a ModuleNotFoundError error. It would be nice if template would build the docs without problems.

Error is caused by a import of the package in the Sphinx configuration, see

import {{ cookiecutter.project_slug.lower().replace(' ', '_').replace('-', '_')}}

This only succeeds when the package has been installed.

To have readthedocs.org build process also install the package you would need to put a .readthedocs.yaml file in the root of the repo filled with

# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
python:
  install:
    - method: pip
      path: .

Activity

  1. fdiblen commented on Apr 7, 2021

    @fdiblen
    Member

    Related to #44

  2. added this to the milestone on Apr 7, 2021
  3. added
    generated-package
    on Apr 14, 2021
  4. modified the milestones: , 0.3.0 on Apr 15, 2021
  5. sverhoeven commented on Apr 16, 2021

    @sverhoeven
    MemberAuthor

    Root of repo is added to sys.path in the docs/conf.py before package is imported. Readthedocs now works without config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggenerated-package

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions