open-contracting-extensions / european-union

OCDS for the European Union
http://standard.open-contracting.org/profiles/eu/latest/en/
Apache License 2.0
9 stars 0 forks source link

Add a +itemClassificationScheme.csv to eu extension #69

Closed jpmckinney closed 4 years ago

jpmckinney commented 4 years ago

For classification codes like TED_PT_AWARD_CONTRACT_WITHOUT_CALL (procurementMethodRationaleClassifications) and CELEX (legalBasis).

(The codelist ought to be renamed in OCDS. For that, see https://github.com/open-contracting/standard/issues/982)

ColinMaudry commented 4 years ago

For now I'll add +itemClassificationScheme.csv to procurementMethodRationaleClassifications and legalBasis extensions, with a Context column.

ColinMaudry commented 4 years ago

The extension validation code doesn't like the "Context" column:

test_csv.py::test_codelist
  codelists/+itemClassificationScheme.csv: Additional properties are not allowed ('Context' was unexpected) (items/additionalProperties)
ColinMaudry commented 4 years ago

The codelist "patch" for CELEX looks like this:

Code,Title,Description,Source,Context
CELEX,EUR-Lex documents,Identification scheme for EUR-Lex documents,https://eur-lex.europa.eu/,tender
ColinMaudry commented 4 years ago

TED_PT_AWARD_CONTRACT_WITHOUT_CALL doesn't match with the Code naming conventions. The underscores are not allowed. Shall I replace them with hyphens, or do I convert the string to camelCase?

codelists/+itemClassificationScheme.csv: 'TED_PT_AWARD_CONTRACT_WITHOUT_CALL' does not match '^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*$' (items/properties/Code/pattern)
ColinMaudry commented 4 years ago

Other schemes in the mapping:

Here is my beautiful command to track the schemes down :sweat_smile::

cd git/european-union-support
grep ".scheme" output/mapping/*.csv | grep -v "CPV" | grep -v "CELEX" | grep -v "TED_PT_AWARD_CONTRACT_WITHOUT_CALL" | grep -v "URL scheme" | grep -v "identifier.scheme"
jpmckinney commented 4 years ago

You can add them all to a PR, and then I'll update the tests to allow the new Context column and new code format.

jpmckinney commented 4 years ago

All merged. Thanks!

jpmckinney commented 4 years ago

TED_CE_ACTIVITY wasn't found, because it has a link that contains CELEX. Found with:

grep -h '\.scheme' output/mapping/*.csv | egrep -v "'TED_CA_TYPE'|'TED_CATEGORY'|'TED_PT_AWARD_CONTRACT_WITHOUT_CALL'|'CELEX'|'COFOG'|'CPV'|'CPVS'" | grep "'[^s]" | sort | uniq

ColinMaudry commented 4 years ago

And you took care of it: https://github.com/open-contracting-extensions/ocds_organizationClassification_extension/commit/e19759f9eda88d142f76652734fb99b704f6c11b

Thanks!