Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcove to libcove2 migration #3

Open
jpmckinney opened this issue Sep 28, 2024 · 1 comment
Open

libcove to libcove2 migration #3

jpmckinney opened this issue Sep 28, 2024 · 1 comment

Comments

@jpmckinney
Copy link

jpmckinney commented Sep 28, 2024

Starting to document the migration path to identify anything missing.

Since a lot is missing, maybe we can start by establishing what is NOT planned for libcove2 and should instead be the responsibility of individual CoVEs.

Usage notes are from OCDS and OC4IDS perspective.

Validation

libcove.lib.common Question / Solution
common_checks_context High priority: This is the most common API call
get_additional_codelist_values Do any standards other than OCDS use codelists?
get_field_coverage
get_json_data_deprecated_fields Do any standards other than OCDS use deprecated fields? (Called by common_checks_context, but OCDS only directly calls it in tests)
get_json_data_generic_paths (Called by common_checks_context, but OCDS only directly calls it in tests)
get_json_data_missing_ids Do any standards other than OCDS use id in objects? (Called by common_checks_context, but OCDS only directly calls it in tests)
get_schema_codelist_paths Do any standards other than OCDS use codelists?
get_schema_validation_errors
get_spreadsheet_meta_data Do any standards other than OCDS have spreadsheet metadata?
load_core_codelists Do any standards other than OCDS use codelists?
schema_dict_fields_generator Change to libcove2.common
SchemaJsonMixin
unique_ids Do any standards other than OCDS use id in objects?
validator

Conversion

libcove.lib.converters Question / Solution
convert_json
convert_spreadsheet

Utilities

libcove.lib Solution
exceptions.CoveInputDataError In principle, not needed as not raised by libcove2
tools.decimal_default Check if actually needed in specific CoVE
tools.get_file_type Check if actually needed in specific CoVE
tools.get_no_exception Use item.get(key, fallback)
tools.ignore_errors Write code correctly to avoid key errors, etc.
tools.to_list Use x if isinstance(x, list) else [x]
tools.update_docs OCDS specific
@ghost
Copy link

ghost commented Oct 9, 2024

Thanks for this. (And similar issue in lib-cove-web-2)

I've started writing up pages on migration in both repo's docs, eg: https://libcove2.readthedocs.io/en/latest/migration-from-lib-cove.html I will refer to this list and both flesh out the docs and add specific issues for more work over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant