atelier.projects

A minimalistic command-line project management.

See Usage.

Functions

add_project(root_dir, **kwargs)

To be called from your config.py file.

get_project_from_module(modname)

Find the project info for the given Python module.

get_project_from_nickname(name)

Find the project info for the given nickname.

get_project_from_path(root_dir)

Find the project info for the given directory.

load_config()

load_inv_namespace(root_dir)

Execute the tasks.py file of this project and return its ns.

load_projects()

Classes

Project(i, root_dir[, nickname, published])

Represents a project.

atelier.projects.load_inv_namespace(root_dir)

Execute the tasks.py file of this project and return its ns.

atelier.projects.add_project(root_dir, **kwargs)

To be called from your config.py file.

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 Project instance 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: object

Represents 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 pd command 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

load_setup_file()

Load the setup.py file if it exists.

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_doc_trees()

Yield one DocTree instance for every item of this project’s doc_trees.

get_public_docs_url(dtname='docs')

Return the URL where the main doctree of this project is published.