Python API

Contents

Python API#

This reference is generated from module docstrings and public exports.

Template models#

Public input models.

class rs_files_templates.models.BiotoolsModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, development_status=None, topics={'entries': []}, contributors={'entries': []}, funding={'entries': []}, urls={}, registries={'entries': []}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, support_routes={'entries': []}, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, operating_systems={'entries': []}, versioning={})[source]#

Bases: _BiotoolsRSM

Published RSM fields needed to render biotools.json.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • development_status (DevelopmentStatus | None)

  • topics (Topics)

  • contributors (Contributors)

  • funding (FundingModel)

  • urls (Urls)

  • registries (Registries)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

  • licensing (Licensing)

  • access (Access)

  • support_routes (SupportRoutes)

  • programming_languages (ProgrammingLanguages)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • operating_systems (OperatingSystems)

  • versioning (Versioning)

media_type: ClassVar[str] = 'json'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'biotools.json'#
schema_url: ClassVar[str | None] = 'https://raw.githubusercontent.com/bio-tools/biotoolsSchema/refs/heads/main/jsonschema/biotoolsj.json'#
template_data()[source]#

Build the single tool record stored in the top-level array.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'biotools.json.j2'#
class rs_files_templates.models.ChangelogModel(*, versioning={}, urls={}, distribution_channels={'entries': []})[source]#

Bases: _ChangelogRSM

Input model for CHANGELOG.md.

Parameters:
  • versioning (Versioning)

  • urls (Urls)

  • distribution_channels (DistributionChannels)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'CHANGELOG.md'#
template_name: ClassVar[str] = 'CHANGELOG.md.j2'#
class rs_files_templates.models.CitationModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, versioning={}, urls={}, contributors={'entries': []}, keywords={'entries': []}, topics={'entries': []}, persistent_identifiers={'entries': []}, publications={'entries': []})[source]#

Bases: _CitationRSM

Input model for CITATION.cff.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • versioning (Versioning)

  • urls (Urls)

  • contributors (Contributors)

  • keywords (Keywords)

  • topics (Topics)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

media_type: ClassVar[str] = 'yaml'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'CITATION.cff'#
schema_url: ClassVar[str | None] = 'https://citation-file-format.github.io/1.2.0/schema.json'#
template_data()[source]#

Prepare identifiers and references for the readable CFF template.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'CITATION.cff.j2'#
class rs_files_templates.models.CodeMetaModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, development_status=None, keywords={'entries': []}, topics={'entries': []}, contributors={'entries': []}, funding={'entries': []}, motivation={'categories': {'entries': []}}, related_software={'entries': []}, urls={}, registries={'entries': []}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, include_metadata=False, documentation_types={'entries': []}, community_files={'entries': []}, support_routes={'entries': []}, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, operating_systems={'entries': []}, external_dependencies={'entries': []}, test_types={'entries': []}, quality_tools={}, versioning={}, distribution_channels={'entries': []}, containerization={'entries': []})[source]#

Bases: _CodeMetaRSM

Published RSM fields needed to render codemeta.json.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • development_status (DevelopmentStatus | None)

  • keywords (Keywords)

  • topics (Topics)

  • contributors (Contributors)

  • funding (FundingModel)

  • motivation (Motivation)

  • related_software (RelatedSoftwareModel)

  • urls (Urls)

  • registries (Registries)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

  • licensing (Licensing)

  • access (Access)

  • include_metadata (bool)

  • documentation_types (DocumentationTypes)

  • community_files (CommunityFiles)

  • support_routes (SupportRoutes)

  • programming_languages (ProgrammingLanguages)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • operating_systems (OperatingSystems)

  • external_dependencies (ExternalDependencies)

  • test_types (TestTypes)

  • quality_tools (QualityTools)

  • versioning (Versioning)

  • distribution_channels (DistributionChannels)

  • containerization (ContainerizationModel)

media_type: ClassVar[str] = 'json'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'codemeta.json'#
schema_url: ClassVar[str | None] = 'https://lumc-dcc.github.io/rs-metadata/schema/1.0.0/codemeta-lumc.schema.json'#
template_data()[source]#

Return JSON-compatible data for Jinja rendering.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'codemeta.json.j2'#
class rs_files_templates.models.CodeOfConductModel(*, contacts={}, contributors={'entries': []})[source]#

Bases: _CodeOfConductRSM

Input model for CODE_OF_CONDUCT.md.

Parameters:
  • contacts (Contacts)

  • contributors (Contributors)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'CODE_OF_CONDUCT.md'#
template_data()[source]#

Expose whether a contributor has the maintainer role.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'CODE_OF_CONDUCT.md.j2'#
class rs_files_templates.models.Containerization(*, type, details=None)[source]#

Bases: BaseModel

Parameters:
  • type (Type3)

  • details (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: Type3#
details: str | None#
class rs_files_templates.models.ContributingModel(*, community_files={'entries': []}, code_review_policy=None, documentation_builder=None, documentation_types={'entries': []}, include_metadata=False, licensing={}, project_manager=None, quality_tools={}, test_frameworks={'entries': []}, test_types={'entries': []}, distribution_channels={'entries': []})[source]#

Bases: _ContributingRSM

Input model for CONTRIBUTING.md.

Parameters:
  • community_files (CommunityFiles)

  • code_review_policy (str | None)

  • documentation_builder (DocumentationBuilder | None)

  • documentation_types (DocumentationTypes)

  • include_metadata (bool)

  • licensing (Licensing)

  • project_manager (ProjectManager | None)

  • quality_tools (QualityTools)

  • test_frameworks (TestFrameworks)

  • test_types (TestTypes)

  • distribution_channels (DistributionChannels)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'CONTRIBUTING.md'#
template_data()[source]#

Prepare concise contributor guidance from selected RSM capabilities.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'CONTRIBUTING.md.j2'#
class rs_files_templates.models.Contributor(*, name, given_names=None, family_names=None, email=None, affiliations=None, orcid=None, roles, url=None)[source]#

Bases: Person

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • given_names (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • family_names (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • email (EmailStr | None)

  • affiliations (list[Organization] | None)

  • orcid (str | None)

  • roles (Annotated[list[Role], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

roles: Annotated[list[Role], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
class rs_files_templates.models.DataFormat(*, term=None, uri=None, version_constraint=None, schema_constraints=None, sample_url=None)[source]#

Bases: BaseModel

Parameters:
  • term (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • uri (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • version_constraint (str | None)

  • schema_constraints (str | None)

  • sample_url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

term: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
uri: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
version_constraint: str | None#
schema_constraints: str | None#
sample_url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
class rs_files_templates.models.DocumentationDeploymentModel(*, project_name=None, containerization={'entries': []}, operating_systems={'entries': []}, external_dependencies={'entries': []}, external_services={'entries': []}, resource_requirements=None)[source]#

Bases: _DocumentationDeploymentRSM

Input model for deployment and operational requirements.

Parameters:
  • project_name (str | None)

  • containerization (ContainerizationModel)

  • operating_systems (OperatingSystems)

  • external_dependencies (ExternalDependencies)

  • external_services (ExternalServices)

  • resource_requirements (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'deployment.md'#
template_name: ClassVar[str] = 'documentation_deployment.md.j2'#
class rs_files_templates.models.DocumentationDeveloperModel(*, project_name=None, project_manager=None, community_files={'entries': []}, code_review_policy=None, include_metadata=False, quality_tools={}, test_frameworks={'entries': []}, test_types={'entries': []})[source]#

Bases: _DocumentationDeveloperRSM

Input model for contributor-oriented development guidance.

Parameters:
  • project_name (str | None)

  • project_manager (ProjectManager | None)

  • community_files (CommunityFiles)

  • code_review_policy (str | None)

  • include_metadata (bool)

  • quality_tools (QualityTools)

  • test_frameworks (TestFrameworks)

  • test_types (TestTypes)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'developer.md'#
template_data()[source]#

Resolve manager and quality commands from selected RSM values.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'documentation_developer.md.j2'#
class rs_files_templates.models.DocumentationLegalModel(*, project_name=None, licensing={}, access={}, regulatory_requirements={'selected': {'entries': []}})[source]#

Bases: _DocumentationLegalRSM

Input model for licensing, access, and regulatory information.

Parameters:
  • project_name (str | None)

  • licensing (Licensing)

  • access (Access)

  • regulatory_requirements (RegulatoryRequirements)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'legal.md'#
template_name: ClassVar[str] = 'documentation_legal.md.j2'#
class rs_files_templates.models.DocumentationOverviewModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, motivation={'categories': {'entries': []}}, topics={'entries': []}, audiences={'entries': []}, related_software={'entries': []}, urls={}, access={}, funding={'entries': []})[source]#

Bases: _DocumentationOverviewRSM

Input model for the project overview page.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • motivation (Motivation)

  • topics (Topics)

  • audiences (Audiences)

  • related_software (RelatedSoftwareModel)

  • urls (Urls)

  • access (Access)

  • funding (FundingModel)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'overview.md'#
template_name: ClassVar[str] = 'documentation_overview.md.j2'#
class rs_files_templates.models.DocumentationReferenceModel(*, project_name=None, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []})[source]#

Bases: _DocumentationReferenceRSM

Input model for public functions and interfaces.

Parameters:
  • project_name (str | None)

  • programming_languages (ProgrammingLanguages)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'reference.md'#
template_name: ClassVar[str] = 'documentation_reference.md.j2'#
class rs_files_templates.models.DocumentationUserModel(*, project_name=None, project_slug, project_short_description=None, project_manager=None, programming_languages={'entries': []}, distribution_channels={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, urls={})[source]#

Bases: _DocumentationUserRSM

Input model for installation and usage guidance.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_manager (ProjectManager | None)

  • programming_languages (ProgrammingLanguages)

  • distribution_channels (DistributionChannels)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • urls (Urls)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'usage.md'#
template_data()[source]#

Add installation and usage commands derived from RSM metadata.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'documentation_user.md.j2'#
class rs_files_templates.models.EdamTerm(*, term=None, uri=None)[source]#

Bases: BaseModel

Parameters:
  • term (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • uri (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

term: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
uri: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
class rs_files_templates.models.ExternalDependency(*, name, version_constraint=None, url=None, license=None, purpose=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • version_constraint (str | None)

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • license (str | None)

  • purpose (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
version_constraint: str | None#
url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
license: str | None#
purpose: str | None#
class rs_files_templates.models.ExternalService(*, name, provider=None, service_types=None, quantity=None, cost_coverage=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • provider (str | None)

  • service_types (list[ServiceType] | None)

  • quantity (str | None)

  • cost_coverage (list[CostCoverageEnum] | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
provider: str | None#
service_types: list[ServiceType] | None#
quantity: str | None#
cost_coverage: list[CostCoverageEnum] | None#
class rs_files_templates.models.FileTemplateModel[source]#

Bases: BaseModel, ABC

Base class for data consumed by one generated file.

Models are deliberately small: each concrete model selects only the published RSM fields needed by its generated file.

archive_entries()[source]#

Return {filename: rendered content} for a zip-typed model.

Only overridden by models whose media_type is "zip", which bundle several rendered files into one downloadable archive instead of rendering a single Jinja template.

Return type:

dict[str, str]

classmethod from_json(value)[source]#

Build a model from JSON text.

Parameters:

value (str | bytes | bytearray) – JSON document containing model fields.

Returns:

FileTemplateModel – Validated concrete model instance.

Return type:

Self

classmethod from_json_file(path)[source]#

Build a model from a UTF-8 JSON file.

Parameters:

path (str | Path)

Return type:

Self

media_type: ClassVar[str] = 'text'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

render(output_dir, *, validate_schema=False)[source]#

Render this model to its default output file.

Parameters:
  • output_dir (str | Path) – Directory receiving the generated file.

  • validate_schema (bool) – Validate schema-backed output after rendering.

Returns:

pathlib.Path – Generated file path.

Return type:

Path

schema_url: ClassVar[str | None] = None#
template_data()[source]#

Return JSON-compatible data for Jinja rendering.

Return type:

dict[str, Any]

to_json_file(path, *, indent=2)[source]#

Write this model to a JSON file.

Parameters:
Return type:

None

template_name: ClassVar[str]#
output_name: ClassVar[str]#
class rs_files_templates.models.FunctionIo(*, data=None, format=None)[source]#

Bases: BaseModel

Parameters:
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

data: EdamTerm | None#
format: list[DataFormat] | None#
class rs_files_templates.models.Funding(*, funder=None, funder_identifier=None, funder_identifier_type=None, funder_url=None, award_number=None, award_title=None, grant_url=None, project_code=None)[source]#

Bases: BaseModel

Parameters:
  • funder (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • funder_identifier (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • funder_identifier_type (FunderIdentifierType | None)

  • funder_url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • award_number (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • award_title (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • grant_url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • project_code (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

funder: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
funder_identifier: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#

Stable identifier for the funder, such as a ROR ID or Crossref Funder ID.

funder_identifier_type: FunderIdentifierType | None#

Identifier scheme used by funder_identifier.

funder_url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#

Public webpage for the funding organization.

award_number: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
award_title: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
grant_url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
project_code: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
class rs_files_templates.models.GovernanceModel(*, governance_notes=None, contributors={'entries': []}, continuity_plan=None, retirement_criteria={'entries': []})[source]#

Bases: _GovernanceRSM

Input model for GOVERNANCE.md.

Parameters:
  • governance_notes (str | None)

  • contributors (Contributors)

  • continuity_plan (str | None)

  • retirement_criteria (RetirementCriteria)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'GOVERNANCE.md'#
template_data()[source]#

Prepare readable role lines for the governance template.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'GOVERNANCE.md.j2'#
class rs_files_templates.models.Interface(*, type, specification=None, status=None)[source]#

Bases: BaseModel

Parameters:
  • type (Type2)

  • specification (str | None)

  • status (Status | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: Type2#
specification: str | None#
status: Status | None#
class rs_files_templates.models.IssueTemplateModel(*, urls={}, support_routes={'entries': []})[source]#

Bases: _IssueTemplateRSM

Input model for the bundled .github/ISSUE_TEMPLATE archive.

Parameters:
  • urls (Urls)

  • support_routes (SupportRoutes)

archive_entries()[source]#

Render the routing config and the static issue forms for the archive.

Return type:

dict[str, str]

media_type: ClassVar[str] = 'zip'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = '.github/ISSUE_TEMPLATE.zip'#
template_name: ClassVar[str] = 'issue_template_config.yml.j2'#
class rs_files_templates.models.LicenseModel(*, licensing={})[source]#

Bases: _LicenseRSM

Published RSM licensing fields needed to render LICENSE.

Parameters:

licensing (Licensing)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'LICENSE'#
template_data()[source]#

Return JSON-compatible data for Jinja rendering.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'LICENSE.j2'#
class rs_files_templates.models.OperatingSystem(*, name, specification=None, status=None)[source]#

Bases: BaseModel

Parameters:
  • name (Name)

  • specification (str | None)

  • status (Status1 | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Name#
specification: str | None#
status: Status1 | None#
class rs_files_templates.models.Organization(*, name, identifier=None, email=None, url=None, address=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • identifier (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • email (EmailStr | None)

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • address (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
identifier: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
email: EmailStr | None#
url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
address: str | None#
class rs_files_templates.models.PersistentIdentifier(*, type, identifier, associated_version=None)[source]#

Bases: BaseModel

Parameters:
  • type (Type1)

  • identifier (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • associated_version (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: Type1#
identifier: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
associated_version: str | None#
class rs_files_templates.models.Person(*, name, given_names=None, family_names=None, email=None, affiliations=None, orcid=None, roles=None, url=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • given_names (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • family_names (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • email (EmailStr | None)

  • affiliations (list[Organization] | None)

  • orcid (str | None)

  • roles (list[Role] | None)

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
given_names: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
family_names: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
email: EmailStr | None#
affiliations: list[Organization] | None#

Organizations the person is affiliated with, most relevant first.

orcid: str | None#
roles: list[Role] | None#
url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
class rs_files_templates.models.ProgrammingLanguage(*, name, version_constraint=None, role=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • version_constraint (str | None)

  • role (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
version_constraint: str | None#
role: str | None#
class rs_files_templates.models.Publication(*, title=None, type=None, doi=None, pmid=None, pmcid=None, url=None, citation=None, note=None, preferred=None, authors=None)[source]#

Bases: BaseModel

Parameters:
  • title (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • type (str | None)

  • doi (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • pmid (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • pmcid (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

  • citation (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • note (str | None)

  • preferred (bool | None)

  • authors (list[Person] | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

title: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
type: str | None#
doi: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
pmid: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
pmcid: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
citation: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
note: str | None#
preferred: bool | None#
authors: list[Person] | None#
class rs_files_templates.models.PullRequestTemplateModel(*, code_review_policy=None, include_metadata=False, documentation_types={'entries': []}, test_types={'entries': []})[source]#

Bases: _PullRequestTemplateRSM

Input model for .github/pull_request_template.md.

Parameters:
  • code_review_policy (str | None)

  • include_metadata (bool)

  • documentation_types (DocumentationTypes)

  • test_types (TestTypes)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = '.github/pull_request_template.md'#
template_data()[source]#

Expose which optional checklist items apply to this project.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'pull_request_template.md.j2'#
class rs_files_templates.models.RSMMetadata(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, development_status=None, topics={'entries': []}, keywords={'entries': []}, contributors={'entries': []}, funding={'entries': []}, motivation={'categories': {'entries': []}}, audiences={'entries': []}, related_software={'entries': []}, urls={}, registries={'entries': []}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, include_metadata=False, documentation_builder=None, documentation_types={'entries': []}, community_files={'entries': []}, code_review_policy=None, support_routes={'entries': []}, contacts={}, governance_notes=None, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, operating_systems={'entries': []}, external_dependencies={'entries': []}, external_services={'entries': []}, test_types={'entries': []}, test_frameworks={'entries': []}, quality_tools={}, project_manager=None, versioning={}, distribution_channels={'entries': []}, containerization={'entries': []}, resource_requirements=None, maintenance_level=None, continuity_plan=None, retirement_criteria={'entries': []}, public_risk_notes=None, regulatory_requirements={'selected': {'entries': []}}, security_measures={'selected': {'entries': []}}, data_management={})[source]#

Bases: BaseModel

Structured metadata for research software management (RSM).

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • development_status (DevelopmentStatus | None)

  • topics (Annotated[Topics, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • keywords (Annotated[Keywords, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • contributors (Annotated[Contributors, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • funding (Annotated[FundingModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • motivation (Annotated[Motivation, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • audiences (Annotated[Audiences, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • related_software (Annotated[RelatedSoftwareModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • urls (Annotated[Urls, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • registries (Annotated[Registries, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • persistent_identifiers (Annotated[PersistentIdentifiers, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • publications (Annotated[Publications, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • licensing (Annotated[Licensing, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • access (Annotated[Access, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • include_metadata (bool)

  • documentation_builder (DocumentationBuilder | None)

  • documentation_types (Annotated[DocumentationTypes, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • community_files (Annotated[CommunityFiles, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • code_review_policy (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'contentMediaType': 'text/markdown'})])

  • support_routes (Annotated[SupportRoutes, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • contacts (Annotated[Contacts, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • governance_notes (str | None)

  • programming_languages (Annotated[ProgrammingLanguages, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • software_functions (Annotated[SoftwareFunctions, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • interfaces (Annotated[Interfaces, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • operating_systems (Annotated[OperatingSystems, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • external_dependencies (Annotated[ExternalDependencies, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • external_services (Annotated[ExternalServices, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • test_types (Annotated[TestTypes, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • test_frameworks (Annotated[TestFrameworks, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • quality_tools (Annotated[QualityTools, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • project_manager (ProjectManager | None)

  • versioning (Annotated[Versioning, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • distribution_channels (Annotated[DistributionChannels, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • containerization (Annotated[ContainerizationModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • resource_requirements (str | None)

  • maintenance_level (MaintenanceLevel | None)

  • continuity_plan (str | None)

  • retirement_criteria (Annotated[RetirementCriteria, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • public_risk_notes (str | None)

  • regulatory_requirements (Annotated[RegulatoryRequirements, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • security_measures (Annotated[SecurityMeasures, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

  • data_management (Annotated[DataManagement, FieldInfo(annotation=NoneType, required=True, validate_default=True)])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

project_name: str | None#

Human-readable project title.

project_slug: str#

Machine-readable package and repository name. Consumers apply their own additional slug constraints.

project_short_description: str | None#

One-sentence description used in README and package metadata.

project_long_description: str | None#

Longer public description of the project motivation and scope.

development_status: DevelopmentStatus | None#

Current repostatus.org lifecycle status for the software.

topics: Annotated[Topics, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Research domains the software applies to, as EDAM topic terms. Entries may include term and uri. Broader and controlled where keywords are free text.

keywords: Annotated[Keywords, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public keywords used in package metadata, citation metadata, registries, and archives.

contributors: Annotated[Contributors, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Everyone credited for the software, each entry declaring one or more roles. Name and roles are required; entries may also include given_names, family_names, email, affiliations, orcid, and url. A non-empty list must credit at least one author, which is what citation metadata requires.

funding: Annotated[FundingModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public funding records. Entries may include funder, funder identifiers and URLs, award_number, award_title, grant_url, and project_code.

motivation: Annotated[Motivation, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public purpose, purpose categories, problem statement, and value proposition.

audiences: Annotated[Audiences, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Intended users or stakeholder groups.

related_software: Annotated[RelatedSoftwareModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Related or upstream tools. Entries may include name, url_or_doi, and relationship.

urls: Annotated[Urls, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Canonical source repository, project homepage, and published documentation URLs.

registries: Annotated[Registries, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Registry entries such as PyPI, CRAN, bio.tools, WorkflowHub, or institutional catalogues. Entries may include name, url_or_id, and notes.

persistent_identifiers: Annotated[PersistentIdentifiers, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Persistent identifiers. Each entry declares its CFF identifier type and value, with an optional associated version.

publications: Annotated[Publications, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Associated publications. Entries may include title, type, authors, doi, pmid, pmcid, url, citation, note, and preferred.

licensing: Annotated[Licensing, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

License text or SPDX identifier and the selected dependency-license compatibility method.

access: Annotated[Access, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

How users can obtain or use the software, independently of its copyright license.

include_metadata: bool#

Whether the project publishes CodeMeta and Citation File Format metadata files alongside their validation workflow.

documentation_builder: DocumentationBuilder | None#

Optional documentation site generator. An empty selection means documentation is plain Markdown.

documentation_types: Annotated[DocumentationTypes, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

SMP documentation categories the project provides. API and technical reference material are part of developer documentation.

community_files: Annotated[CommunityFiles, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Standard root community files the project provides. CONTRIBUTING.md and SUPPORT.md imply the corresponding GitHub collaboration files.

code_review_policy: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, json_schema_extra={'contentMediaType': 'text/markdown'})]#

Public code-review policy for proposed changes, including reviewer expectations, approval requirements, and merge conditions. Markdown is supported.

support_routes: Annotated[SupportRoutes, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public support, bug-reporting, or feature-request systems and their public URLs.

contacts: Annotated[Contacts, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public contact routes for general community, code-of-conduct, and private security reports.

governance_notes: str | None#

Public governance and decision-making notes.

programming_languages: Annotated[ProgrammingLanguages, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Programming languages used by the project. Entries include a name and may include version_constraint and role from the SMP.

software_functions: Annotated[SoftwareFunctions, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Functions or operations performed by the software. Entries may include operations, inputs, outputs, cmd, and note.

interfaces: Annotated[Interfaces, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Interfaces exposed by the software. Type names the interface; specification and status describe it.

operating_systems: Annotated[OperatingSystems, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Supported operating systems or platforms. Entries may include name, specification, and status from the SMP.

external_dependencies: Annotated[ExternalDependencies, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

External software dependencies or standards. Entries may include name, version_constraint, url, license, and purpose.

external_services: Annotated[ExternalServices, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

External public services, partners, or roles needed by the project. Entries may include name, provider, service_types, quantity, and cost_coverage.

test_types: Annotated[TestTypes, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Types of tests used or desired. Supported values match the SMP testing checklist.

test_frameworks: Annotated[TestFrameworks, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Testing frameworks used by the project.

quality_tools: Annotated[QualityTools, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Optional primary formatter, linter, and static type checker.

project_manager: ProjectManager | None#

Primary project and dependency manager, which determines setup, command execution, lockfile handling, and CI.

versioning: Annotated[Versioning, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Version value and public release policy. Empty properties leave the policy unspecified.

distribution_channels: Annotated[DistributionChannels, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Controlled public distribution routes, including package registries, releases, archives, installers, and hosted services.

containerization: Annotated[ContainerizationModel, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Container recipes the project ships. Project managers and lockfiles are declared separately.

resource_requirements: str | None#

Public typical and worst-case memory, storage, compute, GPU, wall-clock, or scaling requirements.

maintenance_level: MaintenanceLevel | None#

Public maintenance commitment after active development winds down; leave empty when no commitment is declared.

continuity_plan: str | None#

Public continuity or handover plan.

retirement_criteria: Annotated[RetirementCriteria, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public conditions under which the software may be retired.

public_risk_notes: str | None#

Public risk or mitigation notes. Sensitive security, privacy, or compliance details should not be included.

regulatory_requirements: Annotated[RegulatoryRequirements, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Controlled and additional public regulatory, quality, policy, or availability requirements.

security_measures: Annotated[SecurityMeasures, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Controlled and additional public security measures protecting the software and its data.

data_management: Annotated[DataManagement, FieldInfo(annotation=NoneType, required=True, validate_default=True)]#

Public sensitive-data statement and DMP reference or contact route.

class rs_files_templates.models.ReadmeModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, versioning={}, motivation={'categories': {'entries': []}}, topics={'entries': []}, audiences={'entries': []}, related_software={'entries': []}, urls={}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, include_metadata=False, support_routes={'entries': []}, contacts={}, operating_systems={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, community_files={'entries': []}, project_manager=None, programming_languages={'entries': []}, distribution_channels={'entries': []}, documentation_types={'entries': []}, quality_tools={}, test_frameworks={'entries': []}, test_types={'entries': []}, resource_requirements=None, maintenance_level=None, continuity_plan=None, retirement_criteria={'entries': []}, public_risk_notes=None, security_measures={'selected': {'entries': []}}, data_management={})[source]#

Bases: _ReadmeRSM

Published RSM fields used by the reusable project README.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • versioning (Versioning)

  • motivation (Motivation)

  • topics (Topics)

  • audiences (Audiences)

  • related_software (RelatedSoftwareModel)

  • urls (Urls)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

  • licensing (Licensing)

  • access (Access)

  • include_metadata (bool)

  • support_routes (SupportRoutes)

  • contacts (Contacts)

  • operating_systems (OperatingSystems)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • community_files (CommunityFiles)

  • project_manager (ProjectManager | None)

  • programming_languages (ProgrammingLanguages)

  • distribution_channels (DistributionChannels)

  • documentation_types (DocumentationTypes)

  • quality_tools (QualityTools)

  • test_frameworks (TestFrameworks)

  • test_types (TestTypes)

  • resource_requirements (str | None)

  • maintenance_level (MaintenanceLevel | None)

  • continuity_plan (str | None)

  • retirement_criteria (RetirementCriteria)

  • public_risk_notes (str | None)

  • security_measures (SecurityMeasures)

  • data_management (DataManagement)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'README.md'#
template_data()[source]#

Prepare a complete README from RSM values only.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'README.md.j2'#
class rs_files_templates.models.Registry(*, name, url_or_id=None, notes=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • url_or_id (str | None)

  • notes (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
url_or_id: str | None#
notes: str | None#
class rs_files_templates.models.RelatedSoftware(*, name=None, url_or_doi=None, relationship=None)[source]#

Bases: BaseModel

Parameters:
  • name (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • url_or_doi (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • relationship (str | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
url_or_doi: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
relationship: str | None#
class rs_files_templates.models.SecurityModel(*, contacts={}, contributors={'entries': []}, security_measures={'selected': {'entries': []}}, data_management={}, public_risk_notes=None, regulatory_requirements={'selected': {'entries': []}})[source]#

Bases: _SecurityRSM

Input model for SECURITY.md.

Parameters:
  • contacts (Contacts)

  • contributors (Contributors)

  • security_measures (SecurityMeasures)

  • data_management (DataManagement)

  • public_risk_notes (str | None)

  • regulatory_requirements (RegulatoryRequirements)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'SECURITY.md'#
template_data()[source]#

Expose whether a contributor has the maintainer role.

Return type:

dict[str, Any]

template_name: ClassVar[str] = 'SECURITY.md.j2'#
class rs_files_templates.models.SoftwareFunction(*, operations=None, inputs=None, outputs=None, cmd=None, note=None)[source]#

Bases: BaseModel

Functions or operations performed by the software. Entries may include operations, inputs, outputs, cmd, and note.

Parameters:
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

operations: list[EdamTerm] | None#
inputs: list[FunctionIo] | None#
outputs: list[FunctionIo] | None#
cmd: str | None#
note: str | None#
class rs_files_templates.models.SupportModel(*, urls={}, contacts={}, support_routes={'entries': []}, maintenance_level=None)[source]#

Bases: _SupportRSM

Input model for SUPPORT.md.

Parameters:
  • urls (Urls)

  • contacts (Contacts)

  • support_routes (SupportRoutes)

  • maintenance_level (MaintenanceLevel | None)

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = 'SUPPORT.md'#
template_name: ClassVar[str] = 'SUPPORT.md.j2'#
class rs_files_templates.models.SupportRoute(*, system, url=None)[source]#

Bases: BaseModel

Parameters:
  • system (Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])])

  • url (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])])

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

system: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]#
url: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(?:[A-Za-z][A-Za-z0-9+.-]*:.*)?$')])]#
class rs_files_templates.models.ZenodoModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, licensing={}, keywords={'entries': []}, topics={'entries': []}, contributors={'entries': []}, funding={'entries': []}, publications={'entries': []})[source]#

Bases: _ZenodoRSM

Input model for the GitHub integration’s .zenodo.json file.

Zenodo reads this file from the repository when it archives a GitHub release. The release itself supplies the version and files; this model supplies the deposit metadata that the repository author wants to override or enrich.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • licensing (Licensing)

  • keywords (Keywords)

  • topics (Topics)

  • contributors (Contributors)

  • funding (FundingModel)

  • publications (Publications)

media_type: ClassVar[str] = 'json'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_name: ClassVar[str] = '.zenodo.json'#
schema_url: ClassVar[str | None] = 'https://raw.githubusercontent.com/zenodo/zenodo/master/zenodo/modules/deposit/jsonschemas/deposits/records/legacyrecord.json'#
template_data()[source]#

Prepare values consumed by the explicit .zenodo.json.j2 layout.

Return type:

dict[str, Any]

template_name: ClassVar[str] = '.zenodo.json.j2'#

Metadata-only model and renderer for README.md.

class rs_files_templates.models.readme.ReadmeModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, versioning={}, motivation={'categories': {'entries': []}}, topics={'entries': []}, audiences={'entries': []}, related_software={'entries': []}, urls={}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, include_metadata=False, support_routes={'entries': []}, contacts={}, operating_systems={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, community_files={'entries': []}, project_manager=None, programming_languages={'entries': []}, distribution_channels={'entries': []}, documentation_types={'entries': []}, quality_tools={}, test_frameworks={'entries': []}, test_types={'entries': []}, resource_requirements=None, maintenance_level=None, continuity_plan=None, retirement_criteria={'entries': []}, public_risk_notes=None, security_measures={'selected': {'entries': []}}, data_management={})[source]#

Bases: _ReadmeRSM

Published RSM fields used by the reusable project README.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • versioning (Versioning)

  • motivation (Motivation)

  • topics (Topics)

  • audiences (Audiences)

  • related_software (RelatedSoftwareModel)

  • urls (Urls)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

  • licensing (Licensing)

  • access (Access)

  • include_metadata (bool)

  • support_routes (SupportRoutes)

  • contacts (Contacts)

  • operating_systems (OperatingSystems)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • community_files (CommunityFiles)

  • project_manager (ProjectManager | None)

  • programming_languages (ProgrammingLanguages)

  • distribution_channels (DistributionChannels)

  • documentation_types (DocumentationTypes)

  • quality_tools (QualityTools)

  • test_frameworks (TestFrameworks)

  • test_types (TestTypes)

  • resource_requirements (str | None)

  • maintenance_level (MaintenanceLevel | None)

  • continuity_plan (str | None)

  • retirement_criteria (RetirementCriteria)

  • public_risk_notes (str | None)

  • security_measures (SecurityMeasures)

  • data_management (DataManagement)

template_name: ClassVar[str] = 'README.md.j2'#
output_name: ClassVar[str] = 'README.md'#
template_data()[source]#

Prepare a complete README from RSM values only.

Return type:

dict[str, Any]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

rs_files_templates.models.readme.render_readme_text(model)[source]#

Render a README whose only inputs are validated RSM fields.

Parameters:

model (ReadmeModel)

Return type:

str

rs_files_templates.models.readme.render_readme(model, output_dir)[source]#

Write a metadata-only README and return its path.

Parameters:
Return type:

Path

Model and normalization logic for biotools.json.

class rs_files_templates.models.biotools.BiotoolsModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, development_status=None, topics={'entries': []}, contributors={'entries': []}, funding={'entries': []}, urls={}, registries={'entries': []}, persistent_identifiers={'entries': []}, publications={'entries': []}, licensing={}, access={}, support_routes={'entries': []}, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, operating_systems={'entries': []}, versioning={})[source]#

Bases: _BiotoolsRSM

Published RSM fields needed to render biotools.json.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • development_status (DevelopmentStatus | None)

  • topics (Topics)

  • contributors (Contributors)

  • funding (FundingModel)

  • urls (Urls)

  • registries (Registries)

  • persistent_identifiers (PersistentIdentifiers)

  • publications (Publications)

  • licensing (Licensing)

  • access (Access)

  • support_routes (SupportRoutes)

  • programming_languages (ProgrammingLanguages)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • operating_systems (OperatingSystems)

  • versioning (Versioning)

template_name: ClassVar[str] = 'biotools.json.j2'#
output_name: ClassVar[str] = 'biotools.json'#
schema_url: ClassVar[str | None] = 'https://raw.githubusercontent.com/bio-tools/biotoolsSchema/refs/heads/main/jsonschema/biotoolsj.json'#
media_type: ClassVar[str] = 'json'#
template_data()[source]#

Build the single tool record stored in the top-level array.

Return type:

dict[str, Any]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Metadata-only project overview documentation model.

class rs_files_templates.models.documentation_overview.DocumentationOverviewModel(*, project_name=None, project_slug, project_short_description=None, project_long_description=None, motivation={'categories': {'entries': []}}, topics={'entries': []}, audiences={'entries': []}, related_software={'entries': []}, urls={}, access={}, funding={'entries': []})[source]#

Bases: _DocumentationOverviewRSM

Input model for the project overview page.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_long_description (str | None)

  • motivation (Motivation)

  • topics (Topics)

  • audiences (Audiences)

  • related_software (RelatedSoftwareModel)

  • urls (Urls)

  • access (Access)

  • funding (FundingModel)

template_name: ClassVar[str] = 'documentation_overview.md.j2'#
output_name: ClassVar[str] = 'overview.md'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Metadata-only user documentation model.

class rs_files_templates.models.documentation_user.DocumentationUserModel(*, project_name=None, project_slug, project_short_description=None, project_manager=None, programming_languages={'entries': []}, distribution_channels={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []}, urls={})[source]#

Bases: _DocumentationUserRSM

Input model for installation and usage guidance.

Parameters:
  • project_name (str | None)

  • project_slug (str)

  • project_short_description (str | None)

  • project_manager (ProjectManager | None)

  • programming_languages (ProgrammingLanguages)

  • distribution_channels (DistributionChannels)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

  • urls (Urls)

template_name: ClassVar[str] = 'documentation_user.md.j2'#
output_name: ClassVar[str] = 'usage.md'#
template_data()[source]#

Add installation and usage commands derived from RSM metadata.

Return type:

dict[str, Any]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Metadata-only deployment documentation model.

class rs_files_templates.models.documentation_deployment.DocumentationDeploymentModel(*, project_name=None, containerization={'entries': []}, operating_systems={'entries': []}, external_dependencies={'entries': []}, external_services={'entries': []}, resource_requirements=None)[source]#

Bases: _DocumentationDeploymentRSM

Input model for deployment and operational requirements.

Parameters:
  • project_name (str | None)

  • containerization (ContainerizationModel)

  • operating_systems (OperatingSystems)

  • external_dependencies (ExternalDependencies)

  • external_services (ExternalServices)

  • resource_requirements (str | None)

template_name: ClassVar[str] = 'documentation_deployment.md.j2'#
output_name: ClassVar[str] = 'deployment.md'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Metadata-only developer documentation model.

class rs_files_templates.models.documentation_developer.DocumentationDeveloperModel(*, project_name=None, project_manager=None, community_files={'entries': []}, code_review_policy=None, include_metadata=False, quality_tools={}, test_frameworks={'entries': []}, test_types={'entries': []})[source]#

Bases: _DocumentationDeveloperRSM

Input model for contributor-oriented development guidance.

Parameters:
  • project_name (str | None)

  • project_manager (ProjectManager | None)

  • community_files (CommunityFiles)

  • code_review_policy (str | None)

  • include_metadata (bool)

  • quality_tools (QualityTools)

  • test_frameworks (TestFrameworks)

  • test_types (TestTypes)

template_name: ClassVar[str] = 'documentation_developer.md.j2'#
output_name: ClassVar[str] = 'developer.md'#
template_data()[source]#

Resolve manager and quality commands from selected RSM values.

Return type:

dict[str, Any]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Metadata-only technical reference documentation model.

class rs_files_templates.models.documentation_reference.DocumentationReferenceModel(*, project_name=None, programming_languages={'entries': []}, software_functions={'entries': []}, interfaces={'entries': []})[source]#

Bases: _DocumentationReferenceRSM

Input model for public functions and interfaces.

Parameters:
  • project_name (str | None)

  • programming_languages (ProgrammingLanguages)

  • software_functions (SoftwareFunctions)

  • interfaces (Interfaces)

template_name: ClassVar[str] = 'documentation_reference.md.j2'#
output_name: ClassVar[str] = 'reference.md'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class rs_files_templates.models.documentation_legal.DocumentationLegalModel(*, project_name=None, licensing={}, access={}, regulatory_requirements={'selected': {'entries': []}})[source]#

Bases: _DocumentationLegalRSM

Input model for licensing, access, and regulatory information.

Parameters:
  • project_name (str | None)

  • licensing (Licensing)

  • access (Access)

  • regulatory_requirements (RegulatoryRequirements)

template_name: ClassVar[str] = 'documentation_legal.md.j2'#
output_name: ClassVar[str] = 'legal.md'#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Canonical commands shared by generated repository files and documentation.

rs_files_templates.commands.project_manager_profile(name)[source]#

Return a copy of one canonical project-manager command profile.

Parameters:

name (str)

Return type:

dict[str, Any]

rs_files_templates.commands.python_installation_command(manager, package, *, published)[source]#

Return installation instructions for the selected Python environment manager.

Parameters:
Return type:

str

Rendering and validation#

Rendering engine for file-template models.

class rs_files_templates.renderer.GeneratedFile(model, path, validated)[source]#

Bases: object

Result of rendering one file model.

Parameters:
  • model (str) – Concrete model class name used for rendering.

  • path (pathlib.Path) – Generated file path.

  • validated (bool) – Whether an output schema was checked successfully.

model: str#
path: Path#
validated: bool#
rs_files_templates.renderer.render_text(model)[source]#

Render one model without writing it to disk.

Parameters:

model (FileTemplateModel) – Validated file-template model.

Returns:

str – Rendered content.

Return type:

str

rs_files_templates.renderer.render_template(template_name, data)[source]#

Render one packaged template by name.

Used by zip-typed models to compose several packaged templates into one archive without a dedicated model per archive member.

Parameters:
Return type:

str

rs_files_templates.renderer.render_file(model, output_dir, *, validate_schema=False)[source]#

Render one model to its default output path.

Parameters:
  • model (FileTemplateModel) – Validated file-template model.

  • output_dir (str | Path) – Directory receiving the generated file.

  • validate_schema (bool) – Validate the rendered file when the model declares a schema.

Returns:

GeneratedFile – Generation result.

Return type:

GeneratedFile

rs_files_templates.renderer.render_many(models, output_dir, *, validate_schemas=False)[source]#

Render several independent file models into one directory.

Parameters:
Return type:

list[GeneratedFile]

Validation helpers for generated structured files.

rs_files_templates.validation.load_schema(url, timeout=15.0)[source]#

Fetch and cache a JSON Schema from a trusted schema URL.

Parameters:
Return type:

dict[str, Any]

rs_files_templates.validation.parse_rendered(path, media_type)[source]#

Parse a rendered file according to its declared media type.

Parameters:
Return type:

Any

rs_files_templates.validation.validate_rendered(path, schema_url, media_type)[source]#

Validate a JSON or YAML file against a JSON Schema.

Parameters:
Return type:

None

Development-time compatibility checks against the upstream context contract.

The external contract is intentionally not a runtime model for this package. Concrete file models remain small and independent. These helpers only verify that overlapping field names and values are still compatible with the upstream JSON Schema when maintainers choose to run the check.

rs_files_templates.contract.projected_contract_schema(model_type, schema)[source]#

Build a partial upstream schema containing fields used by one model.

Parameters:
Returns:

dict[str, Any] – JSON Schema containing only overlapping top-level fields plus $defs.

Raises:

ValueError – If the model contains a field that is absent from the upstream contract.

Return type:

dict[str, Any]

rs_files_templates.contract.contract_payload(model)[source]#

Serialize a file model in the published RSM contract shape.

Parameters:

model (FileTemplateModel)

Return type:

dict[str, Any]

rs_files_templates.contract.validate_contract_compatibility(model, *, schema=None, schema_url='https://lumc-dcc.github.io/rsm-schema/schema/1.0.0/rsm.schema.json')[source]#

Validate one model’s overlapping data against the upstream contract.

This is intended for tests and maintenance checks. Supplying schema keeps the operation offline; otherwise schema_url is fetched.

Parameters:
Return type:

None

External services#

Resolve SPDX license identifiers to authoritative full license text.

exception rs_files_templates.external.spdx.UnknownSpdxLicense[source]#

Bases: ValueError

Raised when SPDX does not recognize a supplied identifier.

rs_files_templates.external.spdx.fetch_spdx_license_text(identifier, timeout=15.0)[source]#

Fetch and cache the full text for one SPDX license identifier.

Parameters:
Return type:

str

rs_files_templates.external.spdx.resolve_license_text(value)[source]#

Resolve an SPDX identifier, or preserve unrecognized input as custom text.

Parameters:

value (str | None)

Return type:

str