Settings

Project settings.

class proclamation.settings.ProjectSettings(project_name, template=None, base_url=None, insert_point_pattern=None, news_filename=None, extra_data=None)[source]

Settings for an entire Project.

Often parsed from JSON with a similar structure.

base_url

Base URL of project management.

This is your project URL if using GitHub or GitLab with the default template.

extra_data

Extra data for use by your template.

insert_point_re

A regular expression matching the line we should insert before, compiled from insert_point_pattern.

make_reference_parser(base_dir=None)[source]

Make a ReferenceParser.

This is an expansion point for further usage, if projects end up needing to supply a custom reference parser without having to replace the rest of the command-line infrastructure, etc.

name

Name of the project.

news_filename

The filename of your changelog file.

sections

List of SectionSettings objects.

template

Filename of the changelog template.

class proclamation.settings.SectionSettings(name, directory, sort_by_prefix=False)[source]

Settings for a single Section.

directory

Directory containing changelog fragments for this section.

name

Section name.

sort_by_prefix

Whether fragments should be sorted by first word before rendering.

This would be a stable sort that preserves the reference sort for same first words.

class proclamation.settings.Settings[source]

Top-level settings class.

Often parsed from JSON with a similar structure.

add_project(project_settings)[source]

Add a ProjectSettings object to this settings.

projects

List of ProjectSettings objects.

proclamation.settings.parse_project(proj)[source]

Parse a dictionary into a ProjectSettings object.

proclamation.settings.parse_section(section_name, section_info)[source]

Parse a name and dictionary into a SectionSettings object.

proclamation.settings.parse_settings(config)[source]

Parse settings from a dict into a Settings object.

proclamation.settings.settings_from_json_file(fn)[source]

Load Settings from a JSON file.

proclamation.settings.settings_from_json_io(io)[source]

Load Settings from json in an IO like a file or StringIO.