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

Need to find a better way to specify "farm_loc" #328

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

wanghy-anl
Copy link
Contributor

@wanghy-anl wanghy-anl commented Jan 2, 2024


Pull Request Description

What issue does this change request address?

This is not urgent, it can wait after the idaholab/raven#2235 gets merged.

Without installing FARM plugin through raven/scripts/install_plugins.py -s FARM, HERON might occasionally pick up FARM (maybe from previous installation, or existing entries in sys.path?) via the line import FARM.src in HERON/src/validators/Factory.py.
A tentative solution is proposed in this PR, but it may not be the best solution:

  • This tentative solution finds the farm_loc using hutils.get_farm_loc, and then append it to the sys.path;
  • If the sys.path contains another entry of "FARM", will it cause any confusion?
What are the significant changes in functionality due to this change request?
  • I commented out the lines import FARM.src and farm_loc = FARM.__path__,
  • I suggest to directly use the farm_loc = hutils.get_farm_loc(raven_path=raven_path) to specify the location of FARM.

It would be perfect if we can force the code to search the farm_loc only, and import FARM_SISO and FARM_MIMO from that folder. However, I am unsure how to do this properly...

Any advices are appreciated!

Thanks,
Haoyu


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large tes.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added, the the analytic documentation must be updated/added.
  • 9. If any test used as a basis for documentation examples have been changed, the associated documentation must be reviewed and assured the text matches the example.

@PaulTalbot-INL
Copy link
Collaborator

@wanghy-anl this looks good to me for now, and we can look at a more holistic way of finding the paths as part of the installation work this year. I restarted the tests to capture some recent reorganization, but it those pass I can merge this if you're okay with it.

@wanghy-anl
Copy link
Contributor Author

@PaulTalbot-INL Thanks Paul for looking into this PR. Yes, it would be helpful to figure out a new way to find the paths.
I am totally fine with merging this to HERON. Feel free to proceed after the tests are done.
Thanks, Haoyu

Copy link
Collaborator

@dylanjm dylanjm left a comment

Choose a reason for hiding this comment

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

Changes are good. Ready to merge.

@dylanjm dylanjm merged commit af68aed into idaholab:devel Jan 24, 2024
3 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.

3 participants