Processes ROS changelogs so that they can be used in binary packaging.
The Changelog format is described in REP-0132:
http://ros.org/reps/rep-0132.html
Bases: builtins.object
Represent a bulleted list of text.
Bases: builtins.object
Represents a REP-0132 changelog.
Add a version section.
Parameters: |
|
---|---|
Returns: | None |
Create a generator for iterating over the versions, dates and content.
Versions are stored and iterated in order.
Parameters: | reverse – bool if True then the iteration is reversed |
---|---|
Returns: | generator for iterating over versions, dates and content |
Bases: builtins.Exception
Raised when more than one section per version is given.
Bases: builtins.Exception
raised on non REP-0132 section titles.
Bases: builtins.object
Represents text mixed with references and nested bullets.
Bases: builtins.object
Represents a piece of text with an associated link.
Bases: builtins.object
Represents a trasition element from ReST.
Process elements of bullet list into an encapsulating class.
Parameters: |
|
---|---|
Returns: | BulletList object representing a docutils bullet_list |
Changelog factory, which reads a changelog file into a class.
Parameters: |
|
---|---|
Returns: | Changelog changelog class or None if file was not readable |
Take most Text-ish docutils objects and converts them to MixedText.
Parameters: | node – docutils.nodes.{paragraph, list_item, ...} text-ish |
---|---|
Returns: | MixedText representing the given docutils object |
Changelog factory, which converts the raw ReST into a class.
Parameters: |
|
---|---|
Returns: | Changelog changelog that was populated |
Process docutils children into a REP-0132 changelog instance.
Recurse into sections, check (sub-)titles if they are valid versions.
Parameters: |
|
---|---|
Returns: | Changelog changelog that was populated |
Generate/update ROS changelog files.
The Changelog format is described in REP-0132:
http://ros.org/reps/rep-0132.html
Extract log information from repositories.
Bases: catkin_pkg.changelog_generator_vcs.VcsClientBase
Bases: catkin_pkg.changelog_generator_vcs.VcsClientBase
Bases: builtins.object
Evaluate a .in template file used in CMake with configure_file().
Parameters: |
|
---|---|
Returns: | string with evaluates template |
Raises: | KeyError for placeholders in the template which are not in the environment |
Substitute variables enclosed by @ characters.
Parameters: |
|
---|---|
Returns: | string with evaluates template |
Raises: | KeyError for placeholders in the template which are not in the environment |
Bases: builtins.object
Evaluate the condition.
The result is also stored in the member variable evaluated_condition.
Parameters: | context – A dictionary with key value pairs to replace variables starting with $ in the condition. |
---|---|
Returns: | True if the condition evaluates to True, else False |
Raises: | ValueError if the condition fails to parse |
Bases: builtins.object
Evaluate the condition.
The result is also stored in the member variable evaluated_condition.
Parameters: | context – A dictionary with key value pairs to replace variables starting with $ in the condition. |
---|---|
Returns: | True if the condition evaluates to True, else False |
Raises: | ValueError if the condition fails to parse |
Checks metapackages for compliance with REP-0127.
Reference: http://ros.org/reps/rep-0127.html#metapackage
Bases: builtins.Exception
Fetch the CMakeLists.txt from a given path.
Parameters: | path (str) – path to the folder containing the CMakeLists.txt |
---|---|
Returns: | contents of CMakeLists.txt file in given path |
Return type: | str |
Raises OSError: | if there is no CMakeLists.txt in given path |
Return the expected boilerplate CMakeLists.txt file for a metapackage.
Parameters: | metapackage_name (str) – name of the metapackage |
---|---|
Returns: | expected CMakeLists.txt file |
Return type: | str |
Return True if the given path contains a CMakeLists.txt, otherwise False.
Parameters: | path (str) – path to folder potentially containing CMakeLists.txt |
---|---|
Returns: | True if path contains CMakeLists.txt, else False |
Return type: | bool |
Return True if the given path contains a valid CMakeLists.txt, otherwise False.
A valid CMakeLists.txt for a metapackage is defined by REP-0127
Parameters: |
|
---|---|
Returns: | True if the path contains a valid CMakeLists.txt, else False |
Return type: | bool |
Raises OSError: | if there is no CMakeLists.txt in given path |
Validate the given package (catkin_pkg.package.Package) as a metapackage.
This validates the metapackage against the definition from REP-0127
Parameters: |
|
---|---|
Raises: |
|
Library for parsing package.xml and providing an object representation.
Bases: builtins.object
Evaluate the condition.
The result is also stored in the member variable evaluated_condition.
Parameters: | context – A dictionary with key value pairs to replace variables starting with $ in the condition. |
---|---|
Returns: | True if the condition evaluates to True, else False |
Raises: | ValueError if the condition fails to parse |
Bases: builtins.object
Evaluate the condition.
The result is also stored in the member variable evaluated_condition.
Parameters: | context – A dictionary with key value pairs to replace variables starting with $ in the condition. |
---|---|
Returns: | True if the condition evaluates to True, else False |
Raises: | ValueError if the condition fails to parse |
Bases: builtins.Exception
Bases: builtins.object
Object representation of a package manifest file.
Evaluate the conditions of all dependencies and memberships.
Parameters: | context – A dictionary with key value pairs to replace variables starting with $ in the condition. |
---|---|
Raises: | ValueError if any condition fails to parse |
Return value of export/build_type element, or ‘catkin’ if unspecified.
Returns: | package build type |
---|---|
Return type: | str |
Raises: | InvalidPackage |
Return True if this Package buildtool depends on catkin, otherwise False.
Returns: | True if the given package buildtool depends on catkin |
---|---|
Return type: | bool |
Return True if this package has invalid dependencies for a metapackage.
This is defined by REP-0127 as any non-run_depends dependencies other then a buildtool_depend on catkin.
Returns: | True if the given package has any invalid dependencies, otherwise False |
---|---|
Return type: | bool |
Return True if this pacakge is a metapackage, otherwise False.
Returns: | True if metapackage, else False |
---|---|
Return type: | bool |
Make sure all standards for packages are met.
Parameters: |
|
---|---|
Raises InvalidPackage: | |
in case validation fails |
Check if the XML file contains a processing instruction referencing a ROS package manifest schema.
Parameters: | path (str) – The path of the package.xml file, it may or may not include the filename |
---|---|
Returns: | True if it contains the known reference, else False |
Return type: | bool |
Raises: | IOError |
Check if the XML data contains a processing instruction referencing a ROS package manifest schema.
Parameters: | data (str) – package.xml contents |
---|---|
Returns: | True if it contains the known reference, else False |
Return type: | bool |
Check that a package exists at the given path.
Parameters: | path (str) – path to a package |
---|---|
Returns: | True if package exists in given path, else False |
Return type: | bool |
Parse package manifest.
Parameters: |
|
---|---|
Returns: | return Package instance, populated with parsed fields |
Raises: | |
Raises: | IOError |
Parse package.xml string contents.
Parameters: |
|
---|---|
Returns: | return parsed Package |
Raises: |
Bases: string.Template
subclass to use @ instead of $ as markers.
Bases: catkin_pkg.package.Package
Create CMake file contents from the template.
Parameters: | package_template – contains the required information |
---|---|
Returns: | file contents as string |
Create several files from templates to start a new package.
Parameters: |
|
---|
Increases version number.
Parameters: |
|
---|---|
Returns: | version with the given part increased, and all inferior parts reset to 0 |
Return type: | str |
Raises ValueError: | |
if the version string is not in the format x.y.z |
Bulk replace of version: searches for package.xml and setup.py files directly in given folders and replaces version tag within.
Parameters: |
|
---|---|
Raises RuntimeError: | |
if any one package.xml cannot be updated |
Library to find packages in the filesystem.
Crawls the filesystem to find package manifest files.
When a subfolder contains either of the files mentioned in ignore_markers it is ignored. By default, these are: - AMENT_IGNORE - CATKIN_IGNORE - COLCON_IGNORE
Parameters: |
|
---|---|
Returns: | A list of relative paths containing package manifest files list |
Crawls the filesystem to find package manifest files and parses them.
Parameters: |
|
---|---|
Returns: | A dict mapping relative paths to Package objects dict |
Raises: | :exc:RuntimeError` If multiple packages have the same name |
Crawls the filesystem to find package manifest files and parses them.
Parameters: |
|
---|---|
Returns: | A dict mapping relative paths to Package objects dict |
Library for providing the relevant information from the package manifest for the Python setup.py file.
Extract the information relevant for distutils from the package manifest.
The following keys will be set:
The “name” and “version” are taken from the eponymous tags.
A single maintainer will set the keys “maintainer” and “maintainer_email” while multiple maintainers are merged into the “maintainer” fields (including their emails). Authors are handled likewise.
The first URL of type “website” (or without a type) is used for the “url” field.
The “description” is taken from the eponymous tag if it does not exceed 200 characters and has no newlines. If it does “description” contains the truncated text while “long_description” contains the complete.
All licenses are merged into the “license” field.
Parameters: | kwargs – All keyword arguments are passed through. The above mentioned keys are verified to be identical if passed as a keyword argument |
---|---|
Returns: | return dict populated with parsed fields and passed keyword arguments |
Raises: | InvalidPackage |
Raises: | IOError |
API provided for rospack to reorder include/library paths according to the chained workspaces.
Module to enable color terminal output.
Bases: string.Template
Set all the ANSI escape sequences to empty strings, effectively disabling console colors.
Common functions that can be used to mark spaces, e.g. build and devel, to indicate which tools previously built the space.
This allows the tools to detect cross tool talk and avoid it where appropriate
Return the tool used to build the space at the given path, or None.
Returns None if the path does not exist or if there is no built by file.
Parameters: | space_path (str) – path to the space in question. |
---|---|
Returns: | str identifying the tool used to build the space or None. |
Place a marker file in the space at the given path, telling who built it.
The path to the marker is created if necessary.
Parameters: |
|
---|---|
Raises: | OSError, others, when trying to create the folder. |
Crawls the filesystem to find packages and uses their dependencies to return a topologically order list.
When a circular dependency is detected, the last item in the returned list is a tuple with None and a string giving a superset of the guilty packages.
Parameters: |
|
---|---|
Returns: | A list of tuples containing the relative path and a Package object, list |
Topologically orders packages.
evaluate_conditions() will be called for each package.
If group dependencies haven’t determined their members yet extract_group_members() will be called for each group dependency to do so.
First returning packages which have message generators and then the rest based on direct build-/buildtool_depends and indirect recursive run_depends.
When a circular dependency is detected, the last item in the returned list is a tuple with None and a string giving a superset of the guilty packages.
Parameters: |
|
---|---|
Returns: | A list of tuples containing the relative path and a Package object, list |
Library to provided logic for chained workspaces.
Create workspace marker file at path if not existing.
Parameters: | path – target folder |
---|
Return a list of spaces based on the CMAKE_PREFIX_PATH or passed in list of workspaces.
It resolves the source space for each devel space and ignores non-catkin paths. :param paths_to_order: list of paths :param prefix_paths: list of prefixes, must not end with ‘/’
Library for retrieving information about catkin packages.