atelier.projects¶
A minimalistic command-line project management.
See Usage.
Functions
|
To be called from your |
|
Find the project info for the given Python module. |
Find the project info for the given nickname. |
|
|
Find the project info for the given directory. |
|
|
|
Execute the |
|
Classes
|
Represents a project. |
- atelier.projects.load_inv_namespace(root_dir)¶
Execute the
tasks.pyfile of this project and return its ns.
- atelier.projects.add_project(root_dir, **kwargs)¶
To be called from your
config.pyfile.root_dir is the name of a directory expected to contain a
tasks.py.If no nickname is specified, the nickname will be the leaf name of that directory.
Returns a
Projectinstance describing the project.
- atelier.projects.get_project_from_module(modname)¶
Find the project info for the given Python module.
- atelier.projects.get_project_from_nickname(name)¶
Find the project info for the given nickname.
- atelier.projects.get_project_from_path(root_dir)¶
Find the project info for the given directory.
- class atelier.projects.Project(i, root_dir, nickname=None, published=True)¶
Bases:
objectRepresents a project.
- main_package¶
The main package (a Python module object).
- index¶
An integer representing the sequence number of this project in the global projects list.
- published¶
Whether I am the responsible editor of this repository.
Default value is True. You can set this to False in your config.py file using
set_published().If this is False, the
inv pdcommand will simply do nothing in this directory. We use this to fix #4361.
- config¶
A dict containing the configuration options of this project. See Project configuration settings.
- load_info()¶
The project can be:
Loaded from a config file: we know only the root_dir
instantiated by get_project_from_path() called in setup_from_tasks(): we know also the inv_namespace
instantiated by get_project_from_module() (by sphinxconf.interproject) : we know also the main_package
A project can have no inv_namespace
- get_xconfig(name, default=None)¶
Return the specified setting from either main module or tasks.py.
Why do we need this? Shortly, for example a setting like
intersphinx_urls: for a Python package we want to read this from Python code (even when the package is installed via pip), but atelier also needs this, and also for atelier projects that have no python package (but a doctree).
- get_public_docs_url(dtname='docs')¶
Return the URL where the main doctree of this project is published.