atelier.projects

A minimalistic command-line project management.

See Usage.

(This module’s source code is available here.)

Functions

add_project(root_dir[, nickname])

To be called from your config.py file.

get_project_from_nickname(name)

Find the project info for the given nickname.

get_project_from_tasks(root_dir)

Find the project info for the given directory.

get_project_info_from_mod(modname)

Find the project info for the given Python module.

get_setup_info(root_dir)

Return SETUP_INFO defined in the setup.py file of the specified root_dir.

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])

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, nickname=None)

To be called from your config.py file.

root_dir is the name of a directory which is 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_info_from_mod(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_tasks(root_dir)

Find the project info for the given directory.

atelier.projects.get_setup_info(root_dir)

Return SETUP_INFO defined in the setup.py file of the specified root_dir.

class atelier.projects.Project(i, root_dir, nickname=None)

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.

load_info()

The project can be:

  • Loaded from a config file: we know only the root_dir

  • instantiated by get_project_from_tasks() called in setup_from_tasks(): we know also the inv_namespace

  • instantiated by get_project_info_from_mod() (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.

TODO: explain why we need this.

get_doc_trees()

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