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

Section III mapped for F01 through F21 #15

Merged
merged 27 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a345781
Section III mapped for F01, F04 and F05
ColinMaudry Aug 27, 2019
961a9cf
Section mapped for F07
ColinMaudry Aug 27, 2019
61a1175
Section III mapped for F12 and F21
ColinMaudry Aug 27, 2019
17b8688
Add a Document to tender.documents instead of minting a new field
ColinMaudry Aug 28, 2019
c6f3e2c
Discard > ""
ColinMaudry Aug 28, 2019
4ab7602
Array of selection criteria and a .type field
ColinMaudry Aug 28, 2019
32ff59f
Added a .minimumLevel field to SelectionCriterion
ColinMaudry Aug 28, 2019
0bfe324
hasReservedToProfession > isReservedToProfession
ColinMaudry Aug 28, 2019
55139fd
Mapping to higher semantics
ColinMaudry Aug 28, 2019
a34362f
Aligning with eForms terminology
ColinMaudry Aug 28, 2019
394d162
hasReservedToProfession => isReservedToProfession (F12)
ColinMaudry Aug 28, 2019
6ac88e5
Merge branch 'master' of github.com:open-contracting/european-union-s…
ColinMaudry Aug 28, 2019
07a8ce3
Switched to code lists for reserved contracts
ColinMaudry Aug 28, 2019
8450a61
Moving .hasPerformingStaffQualification from .contractTerms to .parti…
ColinMaudry Aug 29, 2019
e11bf24
.groupLegalFrom to .tendererLegalForm to match BT-761
ColinMaudry Aug 29, 2019
90d07ce
.contractTerms.financialTerms
ColinMaudry Aug 29, 2019
9485c83
Merge branch 'master' into sectionIII
jpmckinney Aug 29, 2019
d8359d9
F20:
jpmckinney Aug 30, 2019
500a9cd
Add scripts for mapping sheet for all extensions
jpmckinney Aug 30, 2019
3bb09e2
Update heredoc in scripts
jpmckinney Aug 30, 2019
00ddf5d
Ignore scripts outputs
jpmckinney Aug 30, 2019
0ba6ccf
Change "See above" links to copy guidance
jpmckinney Aug 30, 2019
7dbc9eb
Move some mappings from additional.csv to ignore.csv. Add missing row…
jpmckinney Aug 30, 2019
aabfeae
Fix label:validate task to report short rows
jpmckinney Aug 30, 2019
d6ba5e6
Move instructions from script to readme. Skip ppp extension as it rem…
jpmckinney Aug 30, 2019
71f782c
Add script to report fields for which to write extensions
jpmckinney Aug 30, 2019
f08f6f3
Review PR
jpmckinney Aug 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ source/*
!source/Forms labels R2.09.csv
source/TED_forms_templates_R2.0.8/*.txt
source/TED_forms_templates_R2.0.9/*.txt
/scripts/*.csv
/scripts/*.json
.~lock*
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ You can now generate a table for each form, displaying, for each element and att
for i in 01 02 03 04 05 06 07 08 12 13 14 15 20 21 22 23 24 25; rake table LANGUAGE=EN FILES=F$i > path/to/european-union/docs/F$i.md; end
for i in 01 02; rake table LANGUAGE=EN FILES=MOVE FORM=T$i > path/to/european-union/docs/T$i.md; end

### Find fields for which to write extensions

Generate a release schema with all extensions applied, except the PPP extension (which removes fields):

python scripts/patched_release_schema.py > scripts/release-schema-patched.json

Generate a CSV file with all fields from the extended schema, including a column for the extension name:

ocdskit mapping-sheet --infer-required --extension-field extension scripts/release-schema-patched.json > scripts/mapping-sheet.csv

Print a list of fields for which there are no extensions:

python scripts/mapped_ocds_fields.py

## Design

* Label keys are expected to change less frequently than labels. The code therefore focuses on label keys.
Expand Down
35 changes: 27 additions & 8 deletions lib/table_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def table(label=nil)
def row(label, help_labels: [], index: nil, xpath: nil, value: nil, reference: nil, guidance: false)
if xpath
if value
@enum_targets[label] ||= xpath
@enum_targets[label] ||= [xpath, guidance]
else
@elem_targets[label] ||= xpath
@elem_targets[label] ||= [xpath, guidance]
end
end
if xpath && guidance
@guidances[xpath] ||= guidance
@guidances[xpath] ||= [label, guidance]
end

no_guidance = reference.nil? && (guidance == false || guidance == '')
Expand Down Expand Up @@ -130,14 +130,33 @@ def row(label, help_labels: [], index: nil, xpath: nil, value: nil, reference: n
# "OCDS guidance" cell.
if reference
if value
target = @enum_targets.fetch(label)
target, text = @enum_targets.fetch(label)
else
target = @elem_targets.fetch(label)
target, text = @elem_targets.fetch(label)
end
cell(link_to('See above', "##{target}"))
if text.start_with?('/')
text = @guidances.fetch(text)[1]
end
start_cell
paragraph(link_to("Same as <i>#{t(label)}</i> above", "##{target}"))
if !text.empty?
markdown(text)
end
end_cell
elsif !no_guidance
if @guidances.include?(guidance)
cell(link_to('See above', "##{guidance}"))
if @guidances.key?(guidance) # guidance is an xpath
label_key, text = @guidances[guidance]
if label_key
infix = "<i>#{t(label_key)}</i>"
else
infix = "<code>#{guidance}</code>"
end
start_cell
paragraph(link_to("Same as #{infix} above", "##{guidance}"))
if !text.empty?
markdown(text)
end
end_cell
elsif guidance
start_cell
markdown(guidance)
Expand Down
38 changes: 19 additions & 19 deletions output/mapping/F01_2014.csv
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,28 @@ xpath,label-key,index,comment,guidance
/OBJECT_CONTRACT/OBJECT_DESCR/NO_EU_PROGR_RELATED,_no,,,"Discard. If there's no party with the role 'funder' and the name 'European Union', then the procurement isn't related to a project and/or programme financed by European Union funds."
/OBJECT_CONTRACT/OBJECT_DESCR/INFO_ADD,info_additional,II.2.14,,"Append to the lot's `.description`, and append to the item's `.description`\n\nThis results in a loss of structure. (WARNING #28)"
/OBJECT_CONTRACT/DATE_PUBLICATION_NOTICE,date_of_contract_notice,II.3,,Map to `tender.communication.futureNoticeDate`
/LEFTI,info_legal,III,,"The standard forms express exclusion grounds and selection criteria in this section as unstructured text. In the [introductory note](https://github.com/eForms/eForms/raw/master/20180604_eForms_consultation_introduction.docx) to its [eForms consultation](https://github.com/eForms/eForms), the European Commission proposes to create an extension to eForms to implement the [European Single Procurement Document (ESPD)](http://ec.europa.eu/growth/single-market/public-procurement/e-procurement/espd/), which expresses this information as structured data, following the model of the [Core Criterion and Core Evidence Vocabulary](https://joinup.ec.europa.eu/solution/core-criterion-and-core-evidence-vocabulary). With respect to OCDS, work on this section is postponed until either the extension to eForms is available or until the [ESPD Exchange Data Model](https://github.com/ESPD/ESPD-EDM) is stable."
/LEFTI/SUITABILITY,info_evaluating_requir,,,""
/LEFTI/ECONOMIC_CRITERIA_DOC,criteria_selection_docs,,,""
/LEFTI/ECONOMIC_FINANCIAL_INFO,info_evaluating_weth_requir,,,""
/LEFTI/ECONOMIC_FINANCIAL_MIN_LEVEL,min_standards_required,,,""
/LEFTI/TECHNICAL_CRITERIA_DOC,criteria_selection_docs,,,""
/LEFTI/TECHNICAL_PROFESSIONAL_INFO,info_evaluating_weth_requir,,,""
/LEFTI/TECHNICAL_PROFESSIONAL_MIN_LEVEL,min_standards_required,,,""
/LEFTI/RESTRICTED_SHELTERED_WORKSHOP,restricted_sheltered_workshop,,,""
/LEFTI/RESTRICTED_SHELTERED_PROGRAM,restricted_sheltered_program,,,Set `tender.contractTerms.reservedExecution` to `true`
/LEFTI/PARTICULAR_PROFESSION,particular_profession_reserved,,,""
/LEFTI/REFERENCE_TO_LAW,ref_law_reg_prov,,,""
/LEFTI/PERFORMANCE_CONDITIONS,other_conditions,III.2.2,,Map to `tender.contractTerms.termsPerformance`
/LEFTI/PERFORMANCE_STAFF_QUALIFICATION,staff_responsible_indicate,,,""
/LEFTI,info_legal,III,,"The standard forms express exclusion grounds and selection criteria in this section as unstructured text. In the introductory note to its [eForms consultation](https://github.com/eForms/eForms), the European Commission had proposed to create an extension to eForms to implement the [European Single Procurement Document (ESPD)](http://ec.europa.eu/growth/single-market/public-procurement/e-procurement/espd/) [Exchange Data Model](https://github.com/ESPD/ESPD-EDM), which expresses this information as structured data, following the model of the [Core Criterion and Core Evidence Vocabulary](https://joinup.ec.europa.eu/solution/core-criterion-and-core-evidence-vocabulary)."
/LEFTI/SUITABILITY,info_evaluating_requir,,,"Add a `SelectionCriterion` object to the `tender.selectionCriteria.criteria` array, set its `.type` to 'suitability', and map to its `.description`."
/LEFTI/ECONOMIC_CRITERIA_DOC,criteria_selection_docs,,,"Add a `Document` object to the `tender.documents` array, set its `.documentType` to 'economicSelectionCriteria', and set its `.id`."
/LEFTI/ECONOMIC_FINANCIAL_INFO,info_evaluating_weth_requir,,,"Add a `SelectionCriterion` object to the `tender.selectionCriteria.criteria` array, set its `.type` to 'economic', and map to its `.description`."
/LEFTI/ECONOMIC_FINANCIAL_MIN_LEVEL,min_standards_required,,,"Get the `SelectionCriterion` object whose `.type` is 'economic', and map to its `.minimum`"
/LEFTI/TECHNICAL_CRITERIA_DOC,criteria_selection_docs,,,"Add a `Document` object to the `tender.documents` array, set its `.documentType` to 'technicalSelectionCriteria', and set its `.id`."
/LEFTI/TECHNICAL_PROFESSIONAL_INFO,info_evaluating_weth_requir,,,"Add a `SelectionCriterion` object to the `tender.selectionCriteria.criteria` array, set its `.type` to 'technical', and map to its `.description`."
/LEFTI/TECHNICAL_PROFESSIONAL_MIN_LEVEL,min_standards_required,,,"Get the `SelectionCriterion` object whose `.type` is 'technical', and map to its `.minimum`"
/LEFTI/RESTRICTED_SHELTERED_WORKSHOP,restricted_sheltered_workshop,,,"Set `tender.otherRequirements.reservedParticipation` to 'shelteredWorkshop'"
/LEFTI/RESTRICTED_SHELTERED_PROGRAM,restricted_sheltered_program,,,"Set `tender.contractTerms.hasReservedExecution` to `true`, and set `tender.contractTerms.reservedExecution` to 'Sheltered employment programmes'"
/LEFTI/PARTICULAR_PROFESSION,particular_profession_reserved,,,Set `tender.contractTerms.hasReservedExecution` to `true`
/LEFTI/REFERENCE_TO_LAW,ref_law_reg_prov,,,Map to `tender.contractTerms.reservedExecution`
/LEFTI/PERFORMANCE_CONDITIONS,other_conditions,III.2.2,,Map to `tender.contractTerms.performanceTerms`
/LEFTI/PERFORMANCE_STAFF_QUALIFICATION,staff_responsible_indicate,,,Set `tender.otherRequirements.requiresStaffNamesQualifications` to `true`
/PROCEDURE,procedure,IV,,""
/PROCEDURE/PT_RESTRICTED,proctype_restricted,,,"Set `tender.procurementMethod` to 'selective', and set `tender.procurementMethodDetails` to 'Restricted procedure'"
/PROCEDURE/PT_COMPETITIVE_NEGOTIATION,proctype_comp_negotiation,,,"Set `tender.procurementMethod` to 'selective', and set `tender.procurementMethodDetails` to 'Competitive procedure with negotiation'"
/PROCEDURE/FRAMEWORK,notice_involves_framework,,,Set `tender.techniques.hasFrameworkAgreement` to `true`
/PROCEDURE/FRAMEWORK/SEVERAL_OPERATORS,framework_several,,,"If *Envisaged maximum number of participants to the framework agreement* isn't set, set `tender.techniques.frameworkAgreement.maximumNumberParticipants` to 1e9999 (which parses to infinity)"
/PROCEDURE/FRAMEWORK/NB_PARTICIPANTS,framework_particip_envis,,,Map to `tender.techniques.frameworkAgreement.maximumNumberParticipants`
/PROCEDURE/FRAMEWORK/SINGLE_OPERATOR,framework_single,,,Set `tender.techniques.frameworkAgreement.maximumNumberParticipants` to 1
/PROCEDURE/FRAMEWORK/JUSTIFICATION,framework_just_four,,,Map to `tender.techniques.frameworkAgreement.durationRationale`
/PROCEDURE/FRAMEWORK/SEVERAL_OPERATORS,framework_several,,,"If *Envisaged maximum number of participants to the framework agreement* isn't set, set `tender.techniques.frameworkAgreement.maximumParticipants` to 1e9999 (which parses to infinity)"
/PROCEDURE/FRAMEWORK/NB_PARTICIPANTS,framework_particip_envis,,,Map to `tender.techniques.frameworkAgreement.maximumParticipants`
/PROCEDURE/FRAMEWORK/SINGLE_OPERATOR,framework_single,,,Set `tender.techniques.frameworkAgreement.maximumParticipants` to 1
/PROCEDURE/FRAMEWORK/JUSTIFICATION,framework_just_four,,,Map to `tender.techniques.frameworkAgreement.periodRationale`
/PROCEDURE/DPS,notice_involves_dps,,,Set `tender.techniques.hasDynamicPurchasingSystem` to `true`
/PROCEDURE/DPS_ADDITIONAL_PURCHASERS,dps_purchasers,,,Set `tender.techniques.dynamicPurchasingSystem.type` to 'open'
/PROCEDURE/EAUCTION_USED,eauction_will_used,,,Set `tender.techniques.hasElectronicAuction` to `true`
Expand All @@ -121,7 +121,7 @@ xpath,label-key,index,comment,guidance
/PROCEDURE/DATE_AWARD_SCHEDULED,award_scheduled,IV.2.5,,Map to `tender.awardPeriod.startDate`
/COMPLEMENTARY_INFO,info_complement,VI,,""
/COMPLEMENTARY_INFO/EORDERING,eordering_used,,https://github.com/open-contracting-archive/trade/tree/master/draft_extensions/tender_ElectronicWorkflows,Set `tender.contractTerms.hasElectronicOrdering` to `true`
/COMPLEMENTARY_INFO/EINVOICING,einvoicing_used,,https://github.com/open-contracting-archive/trade/tree/master/draft_extensions/tender_ElectronicWorkflows https://github.com/eForms/eForms/issues/88,Set `tender.contractTerms.electronicInvoicing` to 'allowed'
/COMPLEMENTARY_INFO/EINVOICING,einvoicing_used,,https://github.com/open-contracting-archive/trade/tree/master/draft_extensions/tender_ElectronicWorkflows https://github.com/eForms/eForms/issues/88,Set `tender.contractTerms.electronicInvoicingPolicy` to 'allowed'
/COMPLEMENTARY_INFO/EPAYMENT,epayment_used,,https://github.com/open-contracting-archive/trade/tree/master/draft_extensions/tender_ElectronicWorkflows https://github.com/eForms/eForms/issues/88,Set `tender.contractTerms.hasElectronicPayment` to `true`
/COMPLEMENTARY_INFO/INFO_ADD,info_additional,VI.3,,Map to `description`
/COMPLEMENTARY_INFO/ADDRESS_REVIEW_BODY,appeals_body,VI.4.1,https://github.com/open-contracting-archive/trade/tree/master/draft_extensions/tender_ReviewProcedure,"[Add a party](../operations#add-a-party), and add 'reviewBody' to its `.roles`"
Expand Down
Loading