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

Add conversion script #22

Merged
merged 9 commits into from
Nov 14, 2023
Merged

Add conversion script #22

merged 9 commits into from
Nov 14, 2023

Conversation

r0x0d
Copy link
Member

@r0x0d r0x0d commented Nov 7, 2023

Related to HMS-2894

@r0x0d r0x0d requested review from bocekm and andywaltlova November 7, 2023 19:29
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (730d909) 100.00% compared to head (c83396f) 100.00%.

❗ Current head c83396f differs from pull request most recent head 94b227b. Consider uploading reports for the commit 94b227b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #22    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            1         2     +1     
  Lines          173       351   +178     
==========================================
+ Hits           173       351   +178     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@r0x0d
Copy link
Member Author

r0x0d commented Nov 7, 2023

@andywaltlova, any suggestions to deal with the testing for the other script? I have currently duplicated the tests for now, but not sure if that's an appropriate decision here. I think we can discuss this a bit later to see how we want to deal with that.

Copy link
Collaborator

@andywaltlova andywaltlova left a comment

Choose a reason for hiding this comment

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

few comments, otherwise looks good, pretty similar to pre-conversion

for the tests.. 🤔 well of course we would ideally like the module and import functions from it but that is problematic for tasks, hmmm I think here we could at least change the approach little bit? since we have test_files for each function in scripts, we could keep one folder with tests, for whatever is common we would just import same function from both scripts and test both of them against the same expectations, if function is somehow special for one of the scripts we could extract that use case to subfolder.. something like

tests
   common #all functionality common between those two scripts
      test_function_name.py
      ....
   pre-conversion # test cases specific to pre-conversion behavior
   conversion # test cases specific to pre-conversion behavior

this approach kinda assumes there won't be more scripts 😅

I am also fine with the duplicate approach, it's not priority, we could extract this improvements to separate task for future us :D

scripts/conversion_script.py Show resolved Hide resolved
scripts/conversion_script.py Outdated Show resolved Hide resolved
scripts/conversion_script.py Outdated Show resolved Hide resolved
@r0x0d
Copy link
Member Author

r0x0d commented Nov 8, 2023

few comments, otherwise looks good, pretty similar to pre-conversion

for the tests.. 🤔 well of course we would ideally like the module and import functions from it but that is problematic for tasks, hmmm I think here we could at least change the approach little bit? since we have test_files for each function in scripts, we could keep one folder with tests, for whatever is common we would just import same function from both scripts and test both of them against the same expectations, if function is somehow special for one of the scripts we could extract that use case to subfolder.. something like

tests
   common #all functionality common between those two scripts
      test_function_name.py
      ....
   pre-conversion # test cases specific to pre-conversion behavior
   conversion # test cases specific to pre-conversion behavior

this approach kinda assumes there won't be more scripts 😅

I am also fine with the duplicate approach, it's not priority, we could extract this improvements to separate task for future us :D

Yeah, I thought about that strategy, but then, I think there are a couple of things we may want to define before we start working on that. I like the idea, definitely, but I would say for now... We are kinda of okay with the duplication. Do you think it is worth it to tackle that separation for the tests in this PR, or this could be something for the future?

@andywaltlova
Copy link
Collaborator

few comments, otherwise looks good, pretty similar to pre-conversion
for the tests.. 🤔 well of course we would ideally like the module and import functions from it but that is problematic for tasks, hmmm I think here we could at least change the approach little bit? since we have test_files for each function in scripts, we could keep one folder with tests, for whatever is common we would just import same function from both scripts and test both of them against the same expectations, if function is somehow special for one of the scripts we could extract that use case to subfolder.. something like

tests
   common #all functionality common between those two scripts
      test_function_name.py
      ....
   pre-conversion # test cases specific to pre-conversion behavior
   conversion # test cases specific to pre-conversion behavior

this approach kinda assumes there won't be more scripts 😅
I am also fine with the duplicate approach, it's not priority, we could extract this improvements to separate task for future us :D

Yeah, I thought about that strategy, but then, I think there are a couple of things we may want to define before we start working on that. I like the idea, definitely, but I would say for now... We are kinda of okay with the duplication. Do you think it is worth it to tackle that separation for the tests in this PR, or this could be something for the future?

yeah as I said at the end, I am fine leaving it like that :)

Copy link
Collaborator

@andywaltlova andywaltlova left a comment

Choose a reason for hiding this comment

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

Just missing status prints for consistency, otherwise looks good - we will see on test day :)

scripts/conversion_script.py Show resolved Hide resolved
scripts/conversion_script.py Show resolved Hide resolved
@r0x0d r0x0d force-pushed the add-conversion-script branch from 8441596 to c83396f Compare November 14, 2023 12:47
@r0x0d r0x0d requested a review from andywaltlova November 14, 2023 13:14
Copy link
Collaborator

@andywaltlova andywaltlova left a comment

Choose a reason for hiding this comment

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

Just to make it consistent, otherwise looks good! 👍

scripts/conversion_script.py Outdated Show resolved Hide resolved
scripts/conversion_script.py Outdated Show resolved Hide resolved
Co-authored-by: Andrea Waltlová <[email protected]>
@r0x0d
Copy link
Member Author

r0x0d commented Nov 14, 2023

Just to make it consistent, otherwise looks good! 👍

@andywaltlova, updated the preconversion script too: #27

@andywaltlova
Copy link
Collaborator

Just to make it consistent, otherwise looks good! 👍

@andywaltlova, updated the preconversion script too: #27

yep both approved! :)

@r0x0d r0x0d merged commit 3a3cf81 into oamg:main Nov 14, 2023
1 check passed
@r0x0d r0x0d deleted the add-conversion-script branch November 14, 2023 14:45
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