Closed duncandewhurst closed 1 year ago
The eForms profile had not been updated with the new extensions: https://github.com/open-contracting-extensions/eforms/commit/bd64c2561af9decbaf762f6e3025a5ccd2cc517d
I then ran ./manage.py update
for the eForms repo. (I had to skip an assertion in ocdsextensionregistry, which doesn't expect +statistic.csv for a non-core codelist).
./manage.py lint
caches codes.txt
(as it's long to request every codelist), so you need to also delete it first.
This now seems correct from checking a few. I could be missing some extensions that haven't been registered yet.
OCDS codes (tokens in single quotes) that do not appear in any OCDS codelist:
code,id,title
ELI,BT-01(c)-Procedure,Procedure Legal Basis (ID)
eu-main-activity,BT-10-Procedure-Buyer,Activity Authority,BT-610-Procedure-Buyer,Activity Entity
Restricted.,BT-14-Lot,Documents Restricted,BT-14-Part,Documents Restricted
eu-change-corrig-justification,BT-140-notice,Change Reason Code
none,BT-65-Lot,Subcontracting Obligation,BT-765-Lot,Framework Agreement,BT-765-Part,Framework Agreement,BT-766-Lot,Dynamic Purchasing System,BT-766-Part,Dynamic Purchasing System
buyer-contracting-type,BT-740-Procedure-Buyer,Buyer Contracting Entity
acquiringCentralPurchasingBody,OPP-052-Organization,Acquiring CPB Buyer Indicator
eForms codes (tokens in double quotes) that do not appear in any eForms codelist:
code,id,title
COFOG,BT-10-Procedure-Buyer,Activity Authority,BT-610-Procedure-Buyer,Activity Entity
eu-oj,BT-1252-Procedure,Direct Award Justification Previous Procedure Identifier
Subcontracting,BT-195(BT-773)-Tender,Unpublished Identifier
internal,BT-22-Lot,Internal Identifier,BT-22-LotsGroup,Internal Identifier,BT-22-Part,Internal Identifier,BT-22-Procedure,Internal Identifier
eu-vehicle-category,BT-723-LotResult,Vehicle Category
eu-cvd-contract-type,BT-735-LotResult,CVD Contract Type
vehicles-zero-emissions,OPT-156-LotResult,Vehicle Numeric,OPT-156-LotResult,Vehicle Numeric
Additional fields (17):
field,id,title
relatedProcesses/relatedLots,BT-1251-Lot,Previous Planning Part Identifier
tender/documents/accessDetails,BT-14-Lot,Documents Restricted,BT-14-Part,Documents Restricted,BT-707-Lot,Documents Restricted Justification,BT-707-Part,Documents Restricted Justification
tender/amendments/rationaleClassifications,BT-140-notice,Change Reason Code,BT-140-notice,Change Reason Code
tender/lots/submissionTerms/nonElectronicRationale,BT-19-Lot,Submission Nonelectronic Justification
withheldInformation/rationaleClassification,BT-197(BT-09)-Procedure,Unpublished Justification Code,BT-197(BT-105)-Procedure,Unpublished Justification Code,BT-197(BT-106)-Procedure,Unpublished Justification Code,BT-197(BT-1252)-Procedure,Unpublished Justification Code,BT-197(BT-135)-Procedure,Unpublished Justification Code,BT-197(BT-1351)-Procedure,Unpublished Justification Code,BT-197(BT-136)-Procedure,Unpublished Justification Code,BT-197(BT-142)-LotResult,Unpublished Justification Code,BT-197(BT-144)-LotResult,Unpublished Justification Code,BT-197(BT-160)-Tender,Unpublished Justification Code,BT-197(BT-162)-Tender,Unpublished Justification Code,BT-197(BT-163)-Tender,Unpublished Justification Code,BT-197(BT-171)-Tender,Unpublished Justification Code,BT-197(BT-191)-Tender,Unpublished Justification Code,BT-197(BT-193)-Tender,Unpublished Justification Code,BT-197(BT-539)-Lot,Unpublished Justification Code,BT-197(BT-539)-LotsGroup,Unpublished Justification Code,BT-197(BT-540)-Lot,Unpublished Justification Code,BT-197(BT-540)-LotsGroup,Unpublished Justification Code,BT-197(BT-541)-Lot,Unpublished Justification Code,BT-197(BT-541)-LotsGroup,Unpublished Justification Code,BT-197(BT-5421)-Lot,Unpublished Justification Code,BT-197(BT-5421)-LotsGroup,Unpublished Justification Code,BT-197(BT-5422)-Lot,Unpublished Justification Code,BT-197(BT-5422)-LotsGroup,Unpublished Justification Code,BT-197(BT-5423)-Lot,Unpublished Justification Code,BT-197(BT-5423)-LotsGroup,Unpublished Justification Code,BT-197(BT-543)-Lot,Unpublished Justification Code,BT-197(BT-543)-LotsGroup,Unpublished Justification Code,BT-197(BT-553)-Tender,Unpublished Justification Code,BT-197(BT-554)-Tender,Unpublished Justification Code,BT-197(BT-555)-Tender,Unpublished Justification Code,BT-197(BT-635)-LotResult,Unpublished Justification Code,BT-197(BT-636)-LotResult,Unpublished Justification Code,BT-197(BT-660)-LotResult,Unpublished Justification Code,BT-197(BT-709)-LotResult,Unpublished Justification Code,BT-197(BT-710)-LotResult,Unpublished Justification Code,BT-197(BT-711)-LotResult,Unpublished Justification Code,BT-197(BT-712)-LotResult,Unpublished Justification Code,BT-197(BT-720)-Tender,Unpublished Justification Code,BT-197(BT-733)-Lot,Unpublished Justification Code,BT-197(BT-733)-LotsGroup,Unpublished Justification Code,BT-197(BT-734)-Lot,Unpublished Justification Code,BT-197(BT-734)-LotsGroup,Unpublished Justification Code,BT-197(BT-759)-LotResult,Unpublished Justification Code,BT-197(BT-760)-LotResult,Unpublished Justification Code,BT-197(BT-773)-Tender,Unpublished Justification Code,BT-197(BT-88)-Procedure,Unpublished Justification Code
contracts/amendments/rationaleClassifications,BT-200-Contract,Modification Reason Code
bids/details/identifiers,BT-3201-Tender,Tender Identifier
parties/eDeliveryGateway,BT-509-Organization-Company,Organisation eDelivery Gateway,BT-509-Organization-TouchPoint,eDelivery Gateway
tender/documents/accessDetailsURL,BT-615-Lot,Documents Restricted URL,BT-615-Part,Documents Restricted URL
tender/lots/communication/invitationToConfirmInterest,BT-631-Lot,Dispatch Invitation Interest
tender/documents/unofficialTranslation,BT-737-Lot,Documents Unofficial Language,BT-737-Part,Documents Unofficial Language
tender/communication/noticeRequestedPublicationDate,BT-738-notice,Notice Preferred Publication Date
tender/lots/hasAccessibilityCriteria,BT-754-Lot,Accessibility
tender/lots/noAccessibilityCriteriaRationale,BT-755-Lot,Accessibility Justification
tender/lots/reviewDetails,BT-99-Lot,Review Deadline Description
awards/buyers,OPT-300-Contract-Signatory,Signatory Identifier Reference
bids/details/subcontracting/subcontracts/tenderers,OPT-301-Tenderer-MainCont,Main Contractor ID Reference
I fixed a few easy ones and added amendment_rationale_classifications to the registry. Closing - please delete codes.txt and re-run lint as the above output has changed.
Thanks!
I had pulled the main
branch after your most recent comment but before https://github.com/open-contracting/european-union-support/commit/7b51fe8d80367c65242f9e324be9f52ea8d9e09f, followed your instructions and then fixed the missing id
s in the WithheldInformationItem
s, which I see you've now added an exception for, by adding a few lines of code to the lint command.
Shall I commit the update to guidance.yaml
to add those id
fields? (I don't think it's worth committing the change to .manage.py
as its a one-time task)
For my own reference, as I've now pulled the latest version of main
and don't have a local copy of my changes
I had replaced https://github.com/open-contracting/european-union-support/blob/23bfaab2e26fae4a1a8e954131ff8dd0f1ff13cd/manage.py#L658-L663
With
# Format and validate JSON.
ocds_example = field["OCDS example"]
fields_dict = {field['id']: field for field in fields}
if ocds_example and ocds_example != "N/A":
try:
data = json.loads(ocds_example)
if field['id'][:6] in ['BT-196', 'BT-197', 'BT-198']:
if 'id' not in data['withheldInformation'][0]:
bt_195_example = json.loads(fields_dict[f'BT-195{field["id"][6:]}']['OCDS example'])
data['withheldInformation'][0]['id'] = bt_195_example['withheldInformation'][0]['id']
field["OCDS example"] = json.dumps(data, separators=(",", ":")).replace("Infinity", "1e9999")
@jpmckinney do you want me to check through the remaining additional fields and codes or are you happy with them all?
You should check through them - some of the guidance is out of sync with extensions and/or some fields haven't been defined yet.
I copied the output of the lint command to a spreadsheet, checked through it and identified the actions required to resolve the issues.
The actions are a mix of updating guidance.yaml
and updating extensions. There are a few fields and codes from guidance.yaml
that were missed when updating extensions, some cases where guidance.yaml
is out of sync with updates to extensions, and some simple typos. All should be straightforward to resolve. I will work through the necessary updates.
@jpmckinney there were many false positives in the list of eForms codes (tokens in double quotes) that do not appear in any eForms codelist, some of which do appear in eForms codelists, so it looks like the lint command might not be picking up the latest versions of all the eForms codelists. I've highlighted those in yellow in the unknown eForms codes sheet.
I've prepared PRs and/or updated guidance.yaml
for all of the issues. Once the PRs are merged. We should re-run the lint command and check that the errors are resolved.
@duncandewhurst Try deleting codes-eforms.csv
then re-running. (It's the only other cached file.)
@jpmckinney looks like that file doesn't exist until you run ./manage.py codelists > codes-eforms.csv
. Now that I've done that, there are many fewer unknown eForms codes reported.
I think we're done here. Feel free to reopen if not. For posterity, I'm sharing my notes on the remaining issues reported by the lint
command:
BT-763-Procedure: OCDS is invalid: inf is not of type 'integer', 'null' (properties/tender/properties/lotDetails/properties/maximumLotsBidPerSupplier/type)
Not a problem, per https://github.com/open-contracting/european-union-support/issues/185#issuecomment-1643119645
OCDS codes (tokens in single quotes) that do not appear in any OCDS codelist:
code,id,title
fixed,BT-195(BT-541)-Lot-Fixed,Unpublished Identifier,BT-195(BT-541)-LotsGroup-Fixed,Unpublished Identifier
threshold,BT-195(BT-541)-Lot-Threshold,Unpublished Identifier,BT-195(BT-541)-LotsGroup-Threshold,Unpublished Identifier
weight,BT-195(BT-541)-Lot-Weight,Unpublished Identifier,BT-195(BT-541)-LotsGroup-Weight,Unpublished Identifier
internal,BT-22-Lot,Internal Identifier,BT-22-LotsGroup,Internal Identifier,BT-22-Part,Internal Identifier,BT-22-Procedure,Internal Identifier
none,BT-65-Lot,Subcontracting Obligation,BT-765-Lot,Framework Agreement,BT-765-Part,Framework Agreement,BT-766-Lot,Dynamic Purchasing System,BT-766-Part,Dynamic Purchasing System
All false positives, except 'internal', which I think we previously agreed didn't need to be added to itemClassificationScheme.csv
.
eForms codes (tokens in double quotes) that do not appear in any eForms codelist:
code,id,title
GPA,BT-115-Lot,GPA Coverage,BT-115-Part,GPA Coverage
combined,BT-23-Lot,Main Nature,BT-23-Part,Main Nature,BT-23-Procedure,Main Nature
"GPA" is a false positive. "combined" does appear in the contract-nature codelist so I'm not sure why it's reported here.
Some weren't false positives.
Fixed:
"GPA"
-> 'GPA'
'none'
-> "none"
'fixed'
, 'threshold'
, 'weight'
: Not sure why these had single quotes in the id
pattern. Removed quotes.How confusing that xPathAbsolute
references contract-nature
whilst codeList
references eforms-contract-nature
. Looks like eforms-contract-nature
is indeed the correct codelist. I've removed the references to "combined" from guidance.yaml
.
Only the inf
error and 'internal' are now reported.
A couple more additional fields have crept in. Reopening as a reminder for me to investigate.
field,id,title
tender/items/relatedLots,BT-5071-Lot,Place Performance Country Subdivision,BT-5101(a)-Lot,Place Performance Street,BT-5101(b)-Lot,Place Performance Streetline 1,BT-5101(c)-Lot,Place Performance Streetline 2,BT-5121-Lot,Place Performance Post Code,BT-5131-Lot,Place Performance City,BT-5141-Lot,Place Performance Country Code,BT-625-Lot,Unit,BT-727-Lot,Place Performance Services Other,BT-728-Lot,Place Performance Additional Information
statistics/relatedLots,BT-635-LotResult,Buyer Review Requests Count,BT-636-LotResult,Buyer Review Requests Irregularity Type
Sorry those relatedLots
were my fault, they should all have been relatedLot
, I've updated to correct them, now the only additional fields I'm getting are:
tender/deliveryAddresses/description,BT-728-Part,Place Performance Additional Information,BT-728-Procedure,Place Performance Additional Information
tender/documents/unofficialTranslation,BT-737-Lot,Documents Unofficial Language,BT-737-Part,Documents Unofficial Language
unofficialTranslation
is waiting on agreement on the updated guidance in https://github.com/open-contracting/european-union-support/issues/189 before fixing.
tender/deliveryAddresses/description
was picked up in https://github.com/open-contracting/european-union-support/issues/160 but still needs to be added somewhere. Is the Location extension the best place for it?
tender/deliveryAddresses/description was picked up in https://github.com/open-contracting/european-union-support/issues/160 but still needs to be added somewhere. Is the Location extension the best place for it?
Yes
Closing as the remaining fields are addressed in other issues.
Now that all the extension updates are done, I expected that the lint command would no longer report these fields and codes.
@jpmckinney, should we check through the output to work out if updates are required to
guidance.yaml
or extensions or could the lint command be missing the updated extensions for some reason?