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

Removing unused method arguments #754

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

john-science
Copy link
Member

Description

@keckler recently opened a ticket for an unused method argument. Well, we fixed his method, but I thought I should do a quick cull through the rest of the repo to see if I could find other methods with unused arguments, and fix those as well.


Checklist

  • The code is understandable and maintainable to people beyond the author.
  • Tests have been added/updated to verify that the new or changed code works.
  • There is no commented out code in this PR.
  • The commit message follows good practices.
  • All docstrings are still up-to-date with these changes.

@john-science john-science added the cleanup Code/comment cleanup: Low Priority label Jul 6, 2022
@john-science john-science requested review from opotowsky and keckler July 6, 2022 19:13
Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

The work of a true hero -- good cleanup!

@john-science john-science merged commit 3f834e0 into terrapower:main Jul 6, 2022
@john-science john-science deleted the rm_unused_args branch July 6, 2022 21:52
Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

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

Awesome!

@@ -938,12 +938,12 @@ class TestHelix(TestShapedComponent):
"id": 0.1,
}

def test_getBoundingCircleOuterDiameter(self, Tc=None, cold=False):
def test_getBoundingCircleOuterDiameter(self):
Copy link
Member

Choose a reason for hiding this comment

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

Good catch.

This went through the review of #747 yesterday without any notice!

"""
pass


Copy link
Member

Choose a reason for hiding this comment

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

This function is just egregious. How did this get in here??

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't tell. It had been there for three years.

I know clean up PRs aren't sexy, but man, sometimes they are necessary.

opotowsky added a commit that referenced this pull request Oct 10, 2022
…tional arguments (#922)

* Update the entry point class to provide the settings file as an required
position argument when a user requests the help menu. Additionally,
add a try/except around adding a new argument from case settings to
handle duplicate entries more robustly rather than requiring exclusion
of settings like `verbosity` and `branchVerbosity`.

* Suppress the printing of all possible settings in clone CLI

* There are 18 entry points!

* Make changes to checkInputs CLI and tests

Having both a settings file and patterns arg is both redundant and causes
unreliable use issues. Since only patterns was used in invoke, decided
to remove the settingsArgument as optional. I also removed the
sys.exit(), since there is no need that I can think of to do this. The
armi unit test settings file, e.g., fails this check (with can start =
UNKNOWN).

* Move settings arg processing to not be first (nargs='*' behavior means this can't be first in the list)

* Minor docstring add

* Remove reloadDBName setting from armiRun.yaml

This is only needed for 3 tests, and it was causing some annoying
failures on the check-inputs entry point test (although I fixed it
separately by rejecting the notion that there needed to be a
sys.exit()).

* Update warning to error for checkInputs CLI

* Remove unused CLI args from checkInputs (finishing what #754 started)

* Remove update to real file because that ain't necessary

* Release Notes

Co-authored-by: Arrielle Opotowsky <c-aopotowsky@terrapower.com>
scottyak pushed a commit to scottyak/armi that referenced this pull request Oct 27, 2022
scottyak pushed a commit to scottyak/armi that referenced this pull request Oct 27, 2022
…tional arguments (terrapower#922)

* Update the entry point class to provide the settings file as an required
position argument when a user requests the help menu. Additionally,
add a try/except around adding a new argument from case settings to
handle duplicate entries more robustly rather than requiring exclusion
of settings like `verbosity` and `branchVerbosity`.

* Suppress the printing of all possible settings in clone CLI

* There are 18 entry points!

* Make changes to checkInputs CLI and tests

Having both a settings file and patterns arg is both redundant and causes
unreliable use issues. Since only patterns was used in invoke, decided
to remove the settingsArgument as optional. I also removed the
sys.exit(), since there is no need that I can think of to do this. The
armi unit test settings file, e.g., fails this check (with can start =
UNKNOWN).

* Move settings arg processing to not be first (nargs='*' behavior means this can't be first in the list)

* Minor docstring add

* Remove reloadDBName setting from armiRun.yaml

This is only needed for 3 tests, and it was causing some annoying
failures on the check-inputs entry point test (although I fixed it
separately by rejecting the notion that there needed to be a
sys.exit()).

* Update warning to error for checkInputs CLI

* Remove unused CLI args from checkInputs (finishing what terrapower#754 started)

* Remove update to real file because that ain't necessary

* Release Notes

Co-authored-by: Arrielle Opotowsky <c-aopotowsky@terrapower.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code/comment cleanup: Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants