Skip to content

Show that jupyterlite_dir is expected to be a PosixPath object in docs #106

@matthewfeickert

Description

@matthewfeickert

Problem

Following scikit-hep/pyhf#2299 I noticed that jupyterlite_dir config option

jupyterlite_dir = app.env.config.jupyterlite_dir

is expected to be a PosixPath object

prefix = os.path.relpath(
os.path.join(self.env.app.srcdir, JUPYTERLITE_DIR), source_location
)

else it can raise a warning of

WARNING: The config value `jupyterlite_dir' has type `str', defaults to `PosixPath'.

However, in the docs it is show as a str:

## JupyterLite dir
By default, jupyterlite-sphinx runs the `jupyter lite build` command in the docs directory, you can overwrite this behavior and ask jupyterlite to build in a given directory:
```python
# Build in the current directory
jupyterlite_dir = "/path/to/your/lite/dir"
```

Suggested Improvement

It would be good to avoid warnings at runtime for users, so if the docs can be updated to show usage of a pathlib.Path or os.path object that would be great.

Related: scikit-hep/pyhf#2300

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions