tsfpga.tools package
Submodules
tsfpga.tools.sphinx_doc module
- class tsfpga.tools.sphinx_doc.Release(repo: Repo, release_notes_file: Path)
Bases:
object
Used to represent a release.
- tsfpga.tools.sphinx_doc.build_sphinx(build_path: Path, output_path: Path) None
Execute sphinx on command line to build HTML documentation.
- Parameters:
build_path – The location that contains
conf.py
andindex.rst
.output_path – Where to place the generated HTML.
- tsfpga.tools.sphinx_doc.generate_release_notes(repo_root: Path, release_notes_directory: Path, project_name: str) str
Generate release notes in RST format based on a directory full of release note files. Will match each file to a git tag.
- Parameters:
repo_root – Git commands will be executed here.
release_notes_directory – Location of release notes files.
project_name – Name of project will be used for the GitHub link.
- Returns:
RST code with release notes.
tsfpga.tools.version_number_handler module
- class tsfpga.tools.version_number_handler.VersionNumberHandler(repo: Repo, version_file_path: Path)
Bases:
object
Class for handling the version number in __init__.py.
- tsfpga.tools.version_number_handler.commit_and_tag_release(repo: Repo, version: str, git_tag: str) None
Make a git commit with a “release” message, and tag it.
- Parameters:
repo – The git repository to work with.
version – New version.
git_tag – New git tag.
- tsfpga.tools.version_number_handler.make_commit(repo: Repo, commit_message: str) None
Make a git commit, and check that it worked.
- Parameters:
repo – The git repository to work with.
commit_message – Commit message to use.
- tsfpga.tools.version_number_handler.verify_new_version_number(repo: Repo, pypi_project_name: str, new_version: str, unreleased_notes_file: Path) str
Verify that the new version number is sane for this project. Will check git log and PyPI release history.
- Parameters:
repo – The git repository to work with.
pypi_project_name – The name of this project on PyPI.
version – New version.
unreleased_notes_file – Path to the “unreleased.rst” release notes file. Must not be empty.
- Returns:
The name of the git tag that corresponds to the new version number.