-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
literary
provides a command-line interface literary <COMMAND>
to run the various tools required to build and test a Python package. Although it is a design goal to allow users to make their own choice of package development tools and test frameworks, there are some necessary constraints. literary
uses the traitlets configuration system as a default configuration source of any literary project.
Invoking literary
commands without any arguments will use defaults given by traitlets. These can be overridden in a custom literary_config.[py,json]
file, e.g.
{
"LiteraryApp": {
"packages_dir": "src"
},
"LiteraryBuildApp": {
"generated_dir": "lib"
},
"LiteraryTestApp": {
"extra_sources": ["examples"]
}
}
This file must be placed in the project root directory. Any other traitlets configuration can be set in this file; it is sourced whenever a command-line program or the import hook is run.
The LiteraryApp
configuration affects any Literary application. The implemented applications are subclasses of LiteraryApp
, and implement additional configuration, corresponding to additional sections in the config file; e.g. LiteraryBuildApp
. The shown keys have the following behaviours:
-
packages_dir
sets the root of the project packages. This corresponds to having ansrc/
directory containing packages as subdirectories. In Literary's own repo, theliterary
package is placed insrc/
. -
generated_dir
sets the root of the generated packages. This corresponds to having alib/
directory containing the converted packages at the same location insrc/
. -
extra_sources
sets the additional notebook locations for testing.
Development of Literate notebooks using the IPython extension.
- Setting up the Environment
- Loading the IPython Extension
- Cell Exports
- Patching Classes
- Recommended Extensions
Building packages from a collection of Literate notebooks.