All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Remove all aggregates except
count
andunique_ocids_count
.
libcoveocds.schema.SchemaOCDS.__init__
no longer setsinvalid_version_data
if the package version is missing. (Regression in 0.16.1.)
libcoveocds.schema.SchemaOCDS.__init__
no longer errors if the package version is an unhashable type.
-
libcoveocds.api.ocds_json_output
no longer accepts afile_type
argument. -
Reduce use of libcove. These removals might cause errors:
ignore_errors
decorator fromget_records_aggregates
andget_releases_aggregates
functionsdefault
argument fromjson.dumps
call, for handling decimals
-
Some arguments must be keyword arguments in:
libcoveocds.api.ocds_json_output
libcoveocds.common_checks.common_checks_ocds
libcoveocds.schema.SchemaOCDS.__init__
libcoveocds.schema.SchemaOCDS.get_pkg_schema_obj
libcoveocds.schema.SchemaOCDS.get_schema_obj
-
Drop support for Python 3.8.
- Add error message if
common_checks_ocds()
is called in a web context, without dependencies installed. - Ignore flattentool warnings, specifically.
- Reissue unrecognized warnings from
process_codelists()
andget_schema_obj()
.
- Additional checks are robust to bad data.
- Create parent directories when using
--output-dir
. - Remove the last suffix for the default
--output-dir
value, instead of all suffixes. - Update the default configuration with a user-provided partial configuration, instead of requiring a user-provided full configuration.
- Use a temporary directory if
--delete
or--exclude-file
are set without--convert
or--output-dir
. - Fix the default
--output-dir
value on Windows.
- lib-cove-web configuration options (set in Django applications, instead).
- Drop support for libcove < 0.32.
- Don't leak
isCodelist
property to web context. (Re-added in 0.12.5.) - Don't error on
currency
fields in versioned releases.
- Include the extension URL in API context. (Changed in 0.12.0.)
- Use the correct package schema in documentation URL fragments.
- Use
JsonRef
proxies to determine the URL fragments for definitions' fields. (Regression in 0.12.4.) - Report closed codelists errors separately if the field is a string. (Regression in 0.12.0.)
- Report closed codelists errors separately if the field is an array of codes. (Regression in lib-cove 0.19.0.) #115
- Eliminate
JsonRef
proxies to avoidAttributeError: 'JsonRef' object has no attribute 'get'
exceptions.
- Report
json_deref_error
in API context, only if the errors occur. (Added in 0.12.2.) - Don't attempt to report
invalid_version_data
, as an error is raised fromocds_json_output()
. (Added in 0.12.2.) - Cache public methods of
SchemaOCDS
, so that its instances can be cached.
- Report
json_deref_error
andinvalid_version_data
in API context. #109
- Use OCDS 1.1 if no
version
field. #110
- Allow use of translated codelists in extensions (i.e. with
Código
heading). #47 - Calculate additional codelist values for record packages, if using lib-cove#125. #106
- Fix jsonschema resource for
versioned-release-validation-schema.json
. (Changed in 0.12.0.)
- Add options to
libcoveocds.config.LibCoveOCDSConfig
:standard_zip
(defaultNone
)additional_checks
(default "all")skip_aggregates
(defaultFalse
) #43context
(default "web")
- Add CLI options:
--additional-checks
--skip-aggregates
--standard-zip
BREAKING CHANGES:
libcoveocds.lib.common_checks
:- Rename
get_bad_ocds_prefixes
toget_bad_ocid_prefixes
.
- Rename
libcoveocds.schema.SchemaOCDS
:- Rename
release_data
argument topackage_data
. - Remove
pkg_schema_name
,default_version
,default_schema_host
attributes.
- Rename
libcoveocds.config.LibCoveOCDSConfig
:schema_version_choices
values are 3-tuples (added tag), instead of 2-tuples.- Remove
schema_name
,schema_item_name
,schema_host
keys.
- Install dependencies for the web context with the
libcoveocds[web]
extra.
Other changes:
libcoveocds.schema.SchemaOCDS
:- Raise an error if the
select_version
is invalid in API context. - Extensions
- Create the record package schema correctly, if extensions present. #112
- Use ocdsextensionregistry to merge extensions. #81
- Cache all requests made by ocdsextensionregistry by default. Set the
REQUESTS_CACHE_EXPIRE_AFTER
environment variable to0
to expire immediately. - An extra error message is no longer reported for empty extension URLs. (Already reported as invalid URI.) (0.11.1)
- Merge an extension even if its metadata is missing or invalid.
- Use jsonschema's registry instead of lib-cove's resolver.
- Codelists
- Log at exception level if the request fails for the standard's codelists, instead of failing silently.
- Report all non-existing codes being removed by an extension, not only the last.
- Raise an error if the
- Improve performance in API context.
- Skip the schema description and reference URL for OCID prefix conformance errors.
- Skip the formatted message, schema title, schema description and reference URL for validation errors.
- Skip the metadata fields for OCDS extensions.
- Skip sorting the JSON locations of additional checks.
- Improve
context_api_transform()
performance. - Use orjson if available to load the input data.
ocds_json_output
determinesrecord_pkg
, if not provided.- CLI validates
--schema-version
. - flattentool is optional.
- Drop support for Python 3.7.
- Catch unresolvable reference errors in jsonschema, in addition to jsonref. #66
- The deprecated
cache_schema
keyword argument toocds_json_output()
andSchemaOCDS()
is removed. (0.4.0)
- Drop support for jsonschema 3.x.
- Allow execution of command-line interface using
python -m libcoveocds
.
- Drop support for Python 3.6.
- Add support for Bleach 6.
- Extract the description of the
ocid
field in all languages. - Label an extension as invalid if the extension metadata URL is empty or the release schema patch is not valid JSON.
- Check the combination of
ocid
andid
is unique in releases, instead of justid
open-contracting/cove-ocds#127
- Add a
record_pkg
keyword argument to theocds_json_output
function. Since 0.8.0 (#44), theocds_json_output
function would check record packages against the release package schema.
- Add Python wheels distribution.
common_checks_ocds
returns more fields on each error dictionary, so that we can replace the message with a translation in cove-ocds- Update the default config to use branch urls instead of tag urls for the schema. This means patch fixes will automatically be pulled in.
- libcoveocds commandline fails for record packages #39
- Fix package: Correct version number.
- Add Unique IDs count to aggregates
- Added many options to CLI: convert, output-dir, schema-version, delete, exclude-file
- Cache all requests in the tests OpenDataServices/lib-cove#59
- Move OCDS specific code here from lib-cove #44
- Upgrade to OCDS 1.1.5. Fix URL for codelists.
- Upgrade to OCDS 1.1.5.
- Needed dependencies were removed. Put back Python Dependencies until we can properly review which ones can be removed and which can't. #31
- Don't error when looking up a path on a empty schema (e.g. due to broken refs)
- Fix package: Indicate readme's encoding.
- Fix package: Declare package dependencies.
- get_bad_ocds_prefixes no longer tests for hyphens after OCID prefixes, and no longer allows uppercase letters in OCID prefixes.
- OCDS Version 1.1.4 has been released! Changed default config to match
- The standard site is now available over SSL
- Load data in ordered to get consistent output
- Add handling of new additional fields context
- When cache_all_requests was on, some requests were not being cached
- Add additional check EmptyFieldCheck for records.
- cache_all_requests config option, off by default.
- Add additional check EmptyFieldCheck for releases.
- Upgraded lib-cove to v0.6.0
- The cache_schema option to SchemaOCDS and ocds_json_output is now deprecated; but for now it just sets the new cache_all_requests option
- Remove core code; use libcove instead.
- Record ocid now picked up when checking bad ocid prefix.
- Will not error if compiledRelease is not a object.
- get_file_type() - could not detect JSON file if extension was not "JSON" and filename had upper case letters in it
- Corrected name of key broken in initial creation
- When duplicate ID's are detected, show a better message OpenDataServices/cove#782
- Add config option for disable_local_refs mode in flatten-tool, default to on.
- Add config option for remove_empty_schema_columns mode in flatten-tool, default to on.
- Added code for class: SchemaOCDS
- Added code for function: common_checks_ocds
- Added code for function: ocds_json_output
- Added CLI