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

PE parser: add unit tests and remove usage of arrow module #6481

Merged

Conversation

gianantoniopini
Copy link
Contributor

@gianantoniopini gianantoniopini commented Feb 14, 2024

Issue

#6135

Description

This PR adds unit tests for the PE parser and removes usage of the arrow module from the PE parser.

Preview

Double check

  • I have tested my parser changes locally with poetry run test_parser "zone_key"
  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

@github-actions github-actions bot added parser python Pull requests that update Python code tests labels Feb 14, 2024
@gianantoniopini gianantoniopini mentioned this pull request Feb 14, 2024
95 tasks
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 left a comment

Choose a reason for hiding this comment

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

Looks good!

Just one tiny comment to take a look at then I'll merge this.

"production": element["production"],
"source": element["source"],
"zoneKey": element["zoneKey"],
"sourceType": "measured",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"sourceType": "measured",
"sourceType": element["sourceType"].value,

This just brings it in line with our other tests and makes it easy to update if we ever change this.

Copy link
Member

Choose a reason for hiding this comment

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

One thing we can do if we want to reduce the size of these are minifying the files, it should have no impact on the tests.

@ghost ghost mentioned this pull request Feb 16, 2024
2 tasks
@VIKTORVAV99
Copy link
Member

Merging this as is right now as we have a follow up PR that converts it to use parser event lists as well.

@VIKTORVAV99 VIKTORVAV99 enabled auto-merge (squash) February 16, 2024 14:40
@VIKTORVAV99 VIKTORVAV99 merged commit 8854fdd into electricitymaps:master Feb 16, 2024
19 checks passed
@gianantoniopini
Copy link
Contributor Author

👍

@gianantoniopini gianantoniopini deleted the gp/6135-remove-arrow-PE branch February 20, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser python Pull requests that update Python code tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants