Skip to content

Feature/pdct 1399 map document to new json structure #9

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

Merged

Conversation

odrakes-cpr
Copy link
Contributor

What's changed?

Update the document function in the file that maps the data frame to the expected structure being a list of dictionaries with some denoted properties.

  • In the instances where the document data consists of translated titles, we are mapping those to its own object with the es/fr/ar version etc.
  • We also check for invalid urls and raise error if the document data has any

Proposed version

Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.

  • Skip auto-tagging
  • Patch
  • Minor version
  • Major version

Visit the Semver website to understand the
difference between MAJOR, MINOR, and PATCH versions.

Notes:

  • If none of these options are selected, auto-tagging will fail
  • Where multiple options are selected, the most senior option ticked will be
    used -- e.g. Major > Minor > Patch
  • If you are selecting the version in the list above using the textbox, make
    sure your selected option is marked [x] with no spaces in between the
    brackets and the x

katybaulch and others added 7 commits September 2, 2024 09:48
- separate functionality for mapping translated files, checking
  validation etc
- check for missing columns in the data frame
- add new column headers to titles
- update validate function to check for invalid paths
- small udpates for readability
@odrakes-cpr odrakes-cpr requested a review from a team as a code owner September 3, 2024 08:08
Copy link

linear bot commented Sep 3, 2024

Copy link
Collaborator

@katybaulch katybaulch left a comment

Choose a reason for hiding this comment

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

Fab!!! Couple of tiny changes and a question

Copy link
Collaborator

@katybaulch katybaulch left a comment

Choose a reason for hiding this comment

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

Great work! I think we need to revisit your conftest though. It's best practice to use mock data rather than actual data when writing tests & fixtures, as it helps isolate what's under test and remove external dependencies (in this case, the test data is the external dependency as we're using actual GCF data).

Osneil Drakes added 2 commits September 3, 2024 14:02
Copy link
Collaborator

@katybaulch katybaulch left a comment

Choose a reason for hiding this comment

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

Nice work!

@odrakes-cpr odrakes-cpr merged commit bab7919 into main Sep 3, 2024
2 checks passed
@odrakes-cpr odrakes-cpr deleted the feature/pdct-1399-map-document-to-new-json-structure branch September 3, 2024 15:29
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.

2 participants