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

Minor clean up issues related to including the config file data classes #1087

Conversation

Little-Ryugu
Copy link
Collaborator

Fixes #1081 .

Removed some commented out lines, removed unused functions and their unit tests in PPConfigParser.py, made sure all config variables are outputted to log and a unit test has been made for function PrintConfigsToLog.

Review Checklist for Source Code Changes

  • Does pip install still work?
  • Have you written a unit test for any new functions?
  • Do all the units tests run successfully?
  • Does Sorcha run successfully on a test set of input files/databases?
  • Have you used black on the files you have updated to confirm python programming style guide enforcement?

Removed some commented out lines, removed unused functions and their unit tests in PPConfigParser.py, made sure all config variables are outputted to log and a unit test has been made for function PrintConfigsToLog.
@Little-Ryugu Little-Ryugu requested a review from mschwamb January 8, 2025 12:33
Copy link
Collaborator

@mschwamb mschwamb left a comment

Choose a reason for hiding this comment

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

minor change - I think it's PPConfigParser goes away as a file for clarity of what is going on in that function

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's confusing to keep a file that's called PPConfigParser with just these functions in them - either we should rename this so it's a file utility or something but ebing PPConfigParser is probably not informative or helpful in the long term for maintenance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What about shoving this into utilities folder with a different name?

Removed PPConfigParser and moved the two functions in it into a new file called Find_File_or_Directory.py in the utilities folder. Also moved the unit tests for these functions into test_Find_File_or_Directory.py
Changed name of Find_File_or_Directory to fileAccessUtils. Unit tests have been manually ran on my computer and they passed.
@mschwamb
Copy link
Collaborator

mschwamb commented Jan 9, 2025

Looks good to me.

@Little-Ryugu Little-Ryugu merged commit 2a6c51c into main Jan 9, 2025
1 of 7 checks passed
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.

minor clean up issues related to including the config file data classes
2 participants