pkglts.option.doc.history module

This tool will try to parse all release tags to create an history of package.

pkglts.option.doc.history.action_history(cfg, **kwds)[source]

Regenerate history file from tag list.

pkglts.option.doc.history.github_tag_list(project)[source]

Retrieve tag list from project.

Notes: release tag format

a release tag is of the form vX.X.X where X.X.X stands for package version

Parameters:

project (str) – name of project (e.g. “revesansparole/pkglts”)

Returns:

tag name, tag info

Return type:

(dict of (str|dict))

pkglts.option.doc.history.gitlab_tag_list(server, project, token)[source]

Retrieve tag list from project.

Notes: release tag format

a release tag is of the form vX.X.X where X.X.X stands for package version

Parameters:
  • server (str) – base url of gitlab server (e.g. “framagit.org”)

  • project (str) – name of project (e.g. “agro/agrosim”)

  • token (str) – valid token to access project repo

Returns:

tag name, tag info

Return type:

(dict of (str|dict))

pkglts.option.doc.history.parser_history(subparsers)[source]

Associate a CLI to this tool.

Notes: The CLI will be a subcommand of pmg.

Parameters:

subparsers (ArgumentParser) – entity to create a subparsers

Returns:

a unique id for this parser (callable): the action to perform

Return type:

(string)

pkglts.option.doc.history.write_changelog(tags, fmt)[source]

Write changelog file according to the content of release tags.

Notes: release tag format

a release tag is of the form vX.X.X where X.X.X stands for package version

Warnings: invalid tags

The process will not check that tags are properly formatted.

Parameters:
  • tags (dict) – as returned by one of tag_list function

  • fmt (str) – format for documentation ‘md’ or ‘rst’

Returns:

(None)