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

210 mapping updates #294

Merged
merged 12 commits into from
Mar 18, 2021
Merged

210 mapping updates #294

merged 12 commits into from
Mar 18, 2021

Conversation

pindec
Copy link
Contributor

@pindec pindec commented Feb 24, 2021

Fixes #210, Closes #216

General:

  • update the 'Mapping from OCDS' column to reflect the logic implemented in convert-to-oc4ids.
  • update cost/index.md to separate the OC4IDS and OCDS mappings, whilst maintaining the OCDS-OC4IDS-IDS relationship
  • use italics to indicate which parts of the mapping are not implemented in convert-to-oc4ids.
  • remove references to the PPP profile, reference individual extensions instead.

Specific mappings:

Notes:

  • For brevity, I haven't explicitly stated whether the referenced fields are in OCDS and OC4IDS, except where the field paths in the two standards are identical. I think it is clear enough from the use of 'copy from X to Y' and 'set Y to the value of X' which standard is being referenced. However, we can add those back in if you think it would be clearer. Alternatively, we could colour code the formatting - but I'm not sure how much work that would be.
  • For clarity, I've used object names from the schema rather than titles, e.g. 'If there is more than one Contract object in contracts' rather than 'If there is more than one contract'. However, we can use the shorter form if you think it is clear enough.

Discussion:

  • Is there a use case to also have a column that simply lists the relevant OCDS field paths without the logic documented in the mapping column?

TO-DO:

  • Do not render the 'Mapping from OCDS' column in the 'IDS to OC4IDS Mapping' section
  • Do not render the 'Mapping to OC4IDS' in the 'OCDS to OC4IDS Mapping' section
  • Decide on a better approach for indicating which mappings aren't implemented in convert-to-oc4ids (the combination of italics and code formatting in the CSV files doesn't render correctly)
  • Add a column that simply lists the relevant OCDS field paths without the mapping logic

@pindec pindec marked this pull request as draft February 24, 2021 19:43
@pindec
Copy link
Contributor Author

pindec commented Feb 24, 2021

Note: need to update mapping, rename Budgets and projects extension to "Project extension".

@pindec pindec marked this pull request as ready for review March 2, 2021 12:53
@duncandewhurst duncandewhurst requested review from jpmckinney and removed request for jpmckinney March 2, 2021 22:41
@duncandewhurst duncandewhurst marked this pull request as draft March 3, 2021 02:35
update OCDS mapping to reflect logic from convert-to-oc4ids, separate mappings
@duncandewhurst
Copy link
Contributor

duncandewhurst commented Mar 4, 2021

@pindec I've added my changes for #216 to this PR and updated the PR description with a summary.

Please could you review?

I have a couple of outstanding things to do per the summary, but they are just presentation, so I would like to get your feedback on the substantive changes.

To give a bit of context: the logic in convert-to-oc4ids isn't otherwise documented in detail (you have to read the python code to understand the transforms). So my vision here is to document the mapping to a similar level of detail to the EU profile, or merging routine documentation, with convert-to-oc4ids as the reference implementation. Based on which an implementer could develop their own tool.

Thanks!

@duncandewhurst
Copy link
Contributor

@jpmckinney do you have any ideas for:

  • Do not render the 'Mapping from OCDS' column in the 'IDS to OC4IDS Mapping' section
  • Do not render the 'Mapping to OC4IDS' in the 'OCDS to OC4IDS Mapping' section
  • Decide on a better approach for indicating which mappings aren't implemented in convert-to-oc4ids (the combination of italics and code formatting in the CSV files doesn't render correctly)

@jpmckinney
Copy link
Member

I think we'll have to add a feature to the csv-table-no-translate directive to accept a list of columns to include or exclude.

Copy link
Contributor Author

@pindec pindec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @duncandewhurst, looks good and I'm happy with the substantive changes.

On the two notes, I think that it's clear from the context which source of fields you are referring to, and object names help.

On the display issue, we could just add a * for the items that are covered by convert-to-oc4ids, rather than use italics, but I realise that's more problematic for parts where some logic is implemented and some not (e.g. Project Budget). Ditto the latter issue for adding another column. Maybe using colour here might be best.


#### Handling multiple currencies

Some mappings involve converting values in OCDS, which may be in different currencies, to a base currency.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clarify here OCDS Kit doesn't do currency conversions (I can see it's clear in the mapping)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in edfdeae

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the sentence about currency conversion added under "Command-line tool and reference implementation" be more relevant here?

@pindec
Copy link
Contributor Author

pindec commented Mar 4, 2021

On the "use case to also have a column that simply lists the relevant OCDS field paths without the mapping logic", I think this would be useful as a quick reference.

Depending on how the csv-tables render when columns can be excluded, it might be clearer as additional separate tables with just 'CoST IDS element' and 'OCDS field paths' columns, to avoid users having to scroll down to the horizontal scroll bar to then scroll right to see the simplified mapping.

@duncandewhurst
Copy link
Contributor

@jpmckinney although there's a couple of outstanding to-do's, I'd like to get your review. Please see the PR description and #294 (comment) for context.

  • Do not render the 'Mapping from OCDS' column in the 'IDS to OC4IDS Mapping' section

  • Do not render the 'Mapping to OC4IDS' in the 'OCDS to OC4IDS Mapping' section

I think we'll have to add a feature to the csv-table-no-translate directive to accept a list of columns to include or exclude.

It looks like https://github.com/crate/sphinx_csv_filter :included_cols: option gives us what we need. Could we use that or would it cause problems with translation?

  • Decide on a better approach for indicating which mappings aren't implemented in convert-to-oc4ids (the combination of italics and code formatting in the CSV files doesn't render correctly)

Absent a better idea, I went for italicizing the text between the code literals.

  • Add a column that simply lists the relevant OCDS field paths without the mapping logic

I'll do this once the mapping is finalized.

@duncandewhurst duncandewhurst marked this pull request as ready for review March 8, 2021 01:50
@jpmckinney
Copy link
Member

I'll review, but let's create a new issue about Sphinx extensions, since it's just a UI improvement and not fundamental to the changes in the PR.

Copy link
Member

@jpmckinney jpmckinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only skimmed the CSVs, but I assume they have been sufficiently reviewed.


#### Handling multiple currencies

Some mappings involve converting values in OCDS, which may be in different currencies, to a base currency.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the sentence about currency conversion added under "Command-line tool and reference implementation" be more relevant here?

duncandewhurst and others added 2 commits March 19, 2021 10:30
Co-authored-by: James McKinney <[email protected]>
Co-authored-by: James McKinney <[email protected]>
duncandewhurst and others added 3 commits March 19, 2021 10:31
@duncandewhurst
Copy link
Contributor

duncandewhurst commented Mar 18, 2021

@jpmckinney for some reason I'm unable to reply to #294 (comment):

Would the sentence about currency conversion added under "Command-line tool and reference implementation" be more relevant here?

I thought it was better to keep all the OCDS Kit-related content under one heading, as it is only relevant to anyone interested in using the tool (and also easier to find and update if, for example, we add currency conversion to convert-to-oc4ids)

@jpmckinney
Copy link
Member

OK for sentence placement.

@duncandewhurst
Copy link
Contributor

Thanks!

I'll merge this now, we can address the outstanding TO-DOs once #296 is done:

* [ ]  Do not render the 'Mapping from OCDS' column in the 'IDS to OC4IDS Mapping' section

* [ ]  Do not render the 'Mapping to OC4IDS' in the 'OCDS to OC4IDS Mapping' section

* [ ]  Add a column that simply lists the relevant OCDS field paths without the mapping logic

@duncandewhurst duncandewhurst merged commit 206565e into 0.9-dev Mar 18, 2021
@duncandewhurst duncandewhurst deleted the 210-mapping-updates branch March 18, 2021 21:56
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

Successfully merging this pull request may close these issues.

Separate the IDS and OCDS mappings Review OCDS Kit's OC4IDS transform and update mapping
3 participants