Changelog¶
Unreleased¶
Add support for Python 3.14.
0.7.0 (2025-08-25)¶
generate-pot-files:Fix a 0.4.0 regression causing empty
docs.potfiles.Resolve the
--versions-dirdirectory to avoid an exception.Log the extension version if the
--verboseoption is set.Pass the
--verbosecount (for example,-vv) to Sphinx.
CodelistCode: Add a__hash__()method.Add support for Python 3.13.
Drop support for Python 3.9.
0.6.9 (2025-01-07)¶
ProfileBuilderalso acceptsstandard_base_urlas the bytes of a ZIP file.
0.6.8 (2024-12-17)¶
get_versioned_release_schema(): Handle extensions that setitemsto an array or omit$reforitemswhere these are expected.
0.6.7 (2024-12-15)¶
get_versioned_release_schema(): Copy schema before modifying in-place.
0.6.6 (2024-12-15)¶
-
release_package_schema()andrecord_package_schema():Add
proxiesargument.Apply
embedlogic ifpatchedargument is provided.
get_standard_file_contents()replaces{{lang}}and{{version}}in files.
0.6.5 (2024-12-14)¶
ocdsextensionregistry.util.replace_refs(): Addkeep_defsargument.
0.6.4 (2024-12-14)¶
ocdsextensionregistry.util.replace_refs()no longer errors ifdefinitionsisn’t set, like on the release package schema.
0.6.3 (2024-12-14)¶
-
release_package_schema()andrecord_package_schema():Apply
embedargument even ifschema_base_urlis not provided.Add
patchedargument, to skippatched_release_schema().Accept keyword arguments for
release_schema_patch().
-
Patch the
versionedReleaseschema.
0.6.2 (2024-12-13)¶
ocdsextensionregistry.util.replace_refs(): Accepts keyword arguments to pass through tojsonref.replace_refs.
0.6.1 (2024-12-13)¶
get_versioned_release_schema(): Recognize the type["number", "string", "null"].
0.6.0 (2024-12-13)¶
Prohibit extensions from using
nullto remove members.When replacing
$ref’erences:Remove
definitions, as it is no longer relevant.Resolve only HTTP and HTTPS URLs, with a 10-second timeout.
Merge properties that are siblings to the
$refproperty onto the referenced object.
0.5.5 (2024-11-25)¶
Set a User-Agent header on all requests.
0.5.4 (2024-10-27)¶
ProfileBuilder: Addextension_valueargument torelease_schema_patch()andpatched_release_schema().
0.5.3 (2024-10-23)¶
Add
patched-release-schemacommand.
0.5.2 (2024-10-21)¶
-
Allow URI schemes other than
httpandhttpsby adding or replacing theallow_schemesset.Check URI schemes in
remote()andzipfile(), to issue warnings before sending requests, not when initializingProfileBuilder.
0.5.1 (2024-10-21)¶
ProfileBuilder:extensions()raisesUnsupportedSchemeErrorinstead ofNotImplementedErrorif a URI scheme is not supported.
0.5.0 (2024-10-20)¶
Fix variable shadowing that prevented codelist translations.
-
Revert “The
extension_versionsargument can be a list of extensions’ local directories” to eliminate possibility of malicious input reading local files. 7aba524extensions(): Disallow thefile:scheme for theextension_versionsargument.
0.4.0 (2024-09-15)¶
ProfileBuilder:release_package_schema()andrecord_package_schema(): Some arguments must be keyword arguments.Add support for Sphinx 7.
Drop support for Sphinx 4.
Drop support for Python 3.8.
0.3.8 (2023-07-20)¶
feat:
ProfileBuilder: Theextension_versionsargument can be a dict in which values are URLs, in addition to versions.
0.3.7 (2023-07-19)¶
feat: Change assertions to warnings, when adding or removing codes from an extension’s codelist.
0.3.6 (2023-07-12)¶
fix:
ExtensionVersion: Makefiles,schemas,codeliststhread-safe.
0.3.5 (2023-07-12)¶
fix:
ProfileBuilder: Makeget_standard_file_contents()thread-safe.
0.3.4 (2023-07-08)¶
feat:
ProfileBuilderalso acceptsstandard_base_urlas afile://URL to a ZIP file.
0.3.3 (2023-07-07)¶
feat: Make ExtensionVersion more robust to bad data, when using a package’s
extensionsfield as input.Warn if the request errors for an extension’s codelist file (unreachable host, request timeout, HTTP error, too many redirects, etc.), if the bulk file isn’t a ZIP file, or if the codelist isn’t UTF-8.
The previous behavior of raising an exception can be restored with:
import warnings from ocdsextensionregistry.exceptions import ExtensionCodelistWarning with warnings.catch_warnings(): warnings.filterwarnings('error', category=ExtensionCodelistWarning) # Use of ExtensionVersion.codelist that warns.
feat: Warn if the extension’s release schema patch or codelist file isn’t UTF-8.
feat:
ExtensionVersion: Addinput_urlfor the URL that was provided in a list toProfileBuilder’sextensions().fix:
ExtensionVersion:repository_refonly matches if the extension’s files are in the repository’s root – which is required byrepository_ref_download_url.
0.3.2 (2023-07-07)¶
-
feat: Add
repository_refandrepository_ref_download_url.feat: Set
download_urltorepository_ref_download_urlon initialization, if possible.
0.3.1 (2023-07-07)¶
fix:
ProfileBuilder:extensions(): Support retrieval of the metadata file, if theextension_versionsargument is a list of extensions’ metadata files served via API.
0.3.0 (2023-07-06)¶
feat: Make ProfileBuilder more robust to bad data, when using a package’s
extensionsfield as input.Skip a package’s
extensionsfield if it is not an array.Skip an entry in the package’s
extensionsarray if it is blank or is not a string.Warn if the request errors for the extension’s release schema patch (unreachable host, request timeout, HTTP error, too many redirects, etc.), if the bulk file is not a ZIP file, or if the release schema is not a JSON file.
The previous behavior of raising an exception can be restored with:
import warnings from ocdsextensionregistry.exceptions import ExtensionWarning with warnings.catch_warnings(): warnings.filterwarnings('error', category=ExtensionWarning) # Use of ProfileBuilder.release_schema_path() that warns.
feat: Configure the expiration behavior of the responses cache using a
REQUESTS_CACHE_EXPIRE_AFTERenvironment variable. See requests-cache’s documentation (NEVER_EXPIREis-1andEXPIRE_IMMEDIATELYis0, in the source).-
fix:
__repr__()no longer errors if initialized withfile_urlsonly.fix:
get_url()raises clearer error if initialized with a Download URL only.
Add support for Sphinx 6.2 on Python 3.11.
0.2.2 (2023-06-05)¶
-
fix:
repository_full_nameandrepository_namereturn the correct name for GitLab URLs.fix: Clarify error message for
AttributeErroronrepository_full_name,repository_name, andrepository_user.
0.2.1 (2023-05-24)¶
feat: Add a
--no-frozenoption to all commands.Drop support for Python 3.7.
0.2.0 (2022-10-29)¶
fix:
ProfileBuilder:release_package_schema()andrecord_package_schema()return a JSON-serializable object whenembed=True.
0.1.14 (2022-09-07)¶
fix: Skip version of
cattrsthat fails on PyPy.
0.1.13 (2022-06-20)¶
feat:
ProfileBuilder: Theextension_versionsargument can be a list of extensions’ metadata files served via API.
0.1.12 (2022-04-06)¶
generate-pot-files: Drop support for Sphinx<4.3, before which Python 3.10 is unsupported.fix: Ignore ResourceWarning from requests-cache.
0.1.11 (2022-02-01)¶
feat: Retry requests up to 3 times.
0.1.10 (2022-01-31)¶
feat:
ProfileBuilder: Theextension_versionsargument can be a list of extensions’ release schema patch files.
0.1.9 (2022-01-24)¶
fix: Convert the
REQUESTS_POOL_MAXSIZEenvironment variable toint.
0.1.8 (2022-01-20)¶
fix: Fix the default value for an extension’s
release-schema.jsonfile ({}).
0.1.7 (2022-01-12)¶
feat: Use the
REQUESTS_POOL_MAXSIZEenvironment variable to set the maximum number of connections to save in the connection pool.Drop support for Python 3.6.
0.1.6 (2021-11-29)¶
feat:
ExtensionVersion:remote()returns thedefaultargument, if provided, if the file does not exist.ProfileBuilder’srelease_schema_patch()uses a default of{}forrelease-schema.json.
0.1.5 (2021-11-24)¶
Do not patch
requeststo cache responses.
0.1.4 (2021-04-10)¶
Add Python wheels distribution.
0.1.3 (2021-03-05)¶
generate-pot-files: Add-Woption to turn Sphinx warnings into errors, for debugging.
0.1.2 (2021-02-19)¶
ProfileBuilder:release_schema_patch()andpatched_release_schema(): Add alanguageargument to set the language to use for the name of the extension.
0.1.1 (2021-02-17)¶
generate-data-file: Use Authorization header instead ofaccess_tokenquery string parameter to authenticate with GitHub.
0.1.0 (2021-02-16)¶
Switch to MyST-Parser from recommonmark.
Drop support for Sphinx directives.
0.0.26 (2021-02-16)¶
ocdsextensionregistry.util.get_latest_version(): If an extension has no “master” version, check for a “1.1” version.
0.0.25 (2021-02-12)¶
CodelistCode: Add__lt__().
0.0.24 (2020-09-12)¶
ExtensionVersion: Addget_url().build_profile()aggregatesdependenciesandtestDependenciesfrom extensions.
0.0.23 (2020-08-20)¶
ProfileBuilder:get_standard_file_contents(): Fix for OCDS 1.1.5.
0.0.22 (2020-08-11)¶
-
No longer errors if
standard_tagargument isNone.release_schema_patch(): Only annotates definitions and fields withtitleproperties.
0.0.21 (2020-07-22)¶
-
The
extension_versionsargument can be a list of extensions’ local directories.Add a
standard_base_urlargument, which can be afile://URL to the standard’s directory.Add
record_package_schema()method, to matchrelease_package_schema().release_package_schema(): Add aembedargument to indicate whether to embed the patched release schema in the release package schema.
-
Remove
available_in_bulk()method.Remove
directoryproperty (overloaddownload_urlinstead).
build_profile(): Add astandard_base_urlargument to modify the standard base URL.
0.0.20 (2020-06-08)¶
Add Windows support for:
0.0.19 (2020-04-07)¶
The
generate-data-filecommand warns if an MO file is missing.Rename environment variable from
GITHUB_ACCESS_TOKENtoOCDS_GITHUB_ACCESS_TOKEN.
0.0.18 (2020-04-06)¶
The
generate-data-filecommand uses a null translator if an MO file is missing.ExtensionVersion:__repr__()falls back to Base URL and Download URL if Id or Version is blank.
0.0.17 (2020-04-03)¶
-
Add
__repr__().remote()raisesDoesNotExistinstead ofKeyErrorif a file does not exist.
Extension: Add__repr__().
0.0.16 (2019-11-20)¶
Add support for Sphinx>=1.6.
0.0.15 (2019-09-30)¶
build_profile(): Add aupdate_codelist_urlsargument to modify codelist reference URLs.
0.0.14 (2019-09-18)¶
Use in-memory cache for HTTP responses.
0.0.13 (2019-08-29)¶
ProfileBuilder:release_package_schema()andpatched_release_schema(): Add aschemaargument to override the release schema or release package schema.
0.0.12 (2019-08-29)¶
-
Unregistered extensions are now supported by the profile builder. The
extension_versionsargument can be a list of extensions’ metadata URLs, base URLs and/or download URLs.Add an
extension_fieldargument torelease_schema_patch()andpatched_release_schema()methods to annotate all definitions and fields with extension names.
Add
ocdsextensionregistry.util.get_latest_version(), to return the identifier of the latest version from a list of versions of the same extension.
0.0.11 (2019-06-26)¶
The
generate-pot-filesandgenerate-data-filecommands can now be run offline (see documentation for details).Add a
--versions-diroption to thegenerate-pot-filesandgenerate-data-filecommands to specify a local directory of extension versions.ExtensionRegistry: Support thefile://scheme for theextension_versions_dataandextensions_dataarguments. This means the--extension-versions-urland--extensions-urlCLI options can now refer to local files.-
Add
available_in_bulk(), to return whether the extension’s files are available in bulk.Add
zipfile(), to return a ZIP archive of the extension’s files.
Upgrade to ocds-babel 0.1.0.
0.0.10 (2019-01-28)¶
ExtensionVersion:metadata: Fix invaliddependenciesinextension.json.
0.0.9 (2019-01-23)¶
generate-pot-files: Drop support fordocs/directory in extensions.ExtensionVersion: Removedocsproperty.-
Use UTF-8 characters in JSON files.
No longer write extension readme files.
0.0.8 (2019-01-18)¶
generate-data-file: Fix rate limiting error when getting publisher names from GitHub.
0.0.7 (2019-01-18)¶
generate-data-file: Addpublisherdata.ExtensionVersion: Addrepository_userandrepository_user_pageproperties, to return user or organization to which the extension’s repository belongs.
0.0.6 (2018-11-20)¶
Add command-line tools (see documentation for details).
ExtensionVersion: Fix edge case so thatmetadatalanguage maps are ordered, even ifextension.jsondidn’t have language maps.
0.0.5 (2018-10-31)¶
Add
ProfileBuilder,Codelist,CodelistCodeclasses.-
Add
filesproperty, to return the contents of all files within the extension.Add
schemasproperty, to return the schemas.Add
codelistsproperty, to return the codelists.Add
docsproperty, to return the contents of documentation files within the extension.The
metadataproperty normalizes the contents ofextension.jsonto provide consistent access.
0.0.4 (2018-06-27)¶
ExtensionVersion: Themetadataproperty is cached.
0.0.3 (2018-06-27)¶
0.0.2 (2018-06-12)¶
-
Add
get()method, to get a specific extension version.Add
__iter__()method, to iterate over all extension versions.Remove
all()method.
Add package-specific Exceptions.
0.0.1 (2018-06-11)¶
First release.