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

RavenFramework tests using pip package or pre-built executable #2273

Merged
merged 24 commits into from
Apr 17, 2024

Conversation

j-bryan
Copy link
Collaborator

@j-bryan j-bryan commented Mar 1, 2024


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)

#2272

What are the significant changes in functionality due to this change request?

Adds the ability to run RavenFramework tests using either a pip-installed version of raven or a prebuilt executable of raven. Note that as currently implemented, the other types of raven tests (e.g. RavenPython) and the plugin tests will run using the development version of raven and its installed plugins, not the alternative installation.


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, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must 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 test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in XML block, the node <internalParallel> to True.
  • 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 is the the analytic documentation updated/added?
  • 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

Copy link
Contributor

@joshua-cogliati-inl joshua-cogliati-inl left a comment

Choose a reason for hiding this comment

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

I like where this patch is going and it will be useful. I think there are parts that can be simplified (if I am wrong feel free to explain what I missed). Thanks.

if executable == 'raven_framework':
# (j-bryan, 2024-03-05) A raven_framework script may also be the command used to run RAVEN, such
# as when using a prebuilt executable of RAVEN.
if executable == '%RAVENFRAMEWORK%':
Copy link
Contributor

Choose a reason for hiding this comment

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

Various comments:

  • RAVENEXECUTABLE might be more self explanatory than RAVENFRAMEWORK
  • Why can't this all be in ravenframework//Models/Code.py with the other command mangling?

ravenframework/Models/Code.py Outdated Show resolved Hide resolved
tests/framework/unit_tests/CustomDrivers/basic_pip.xml Outdated Show resolved Hide resolved
rook/main.py Outdated Show resolved Hide resolved
rook/main.py Outdated Show resolved Hide resolved
@moosebuild
Copy link

Job Test Ubuntu 18-2 Python 3 on 1a34487 : invalidated by @joshua-cogliati-inl

removed numexpr so retrying test

@j-bryan
Copy link
Collaborator Author

j-bryan commented Mar 29, 2024

The recent commit (8c67f36) is a large rework of the capability with an emphasis on simplicity. The major changes are

  • Renaming magic variable %RAVENFRAMEWORK% to %RAVENEXECUTABLE%, per the suggestion
  • Handling interpretation of %RAVENEXECUTABLE% magic variable in ravenframework/Models/Code.py where the other magic variables are handled.
  • Removal of the --use-pip and --use-binary command line options for Rook. Instead, a new command line option --tester-command can be used to specify the command to use to when running a certain tester. This removes RAVEN-specific instructions for Rook with the trade-off of a more difficult syntax for the developer running the tests. An example of using this option to set the RavenFramework tester command is ./run_tests --tester-command RavenFramework path/to/raven_framework. In conjunction with the existing --python-command and --command-prefix options, this gives users full control over what a Tester runs as a command.
  • Removal of the skip_if_install_type logic in RAVEN "tests" files. This was messy and a workaround for the lone python-raven-runs-raven test. However, I have not yet implemented a fix for this! This test is expected to fail if the magic variable %RAVENEXECUTABLE% is used to specify how to run raven in the inner raven for that test.

@moosebuild
Copy link

Job Test mac on 6828a8e : invalidated by @joshua-cogliati-inl

failed in set python environment

@moosebuild
Copy link

Job Test qsubs sawtooth on 6206fd8 : invalidated by @j-bryan

Rerunning to get log files on failing qsubs test

Copy link
Contributor

@joshua-cogliati-inl joshua-cogliati-inl left a comment

Choose a reason for hiding this comment

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

Reviewed and approve.

@@ -50,7 +50,7 @@
<!-- MODELS -->
<Models>
<Code name="raven_running_rom" subType="RAVEN">
<executable>%FRAMEWORK_DIR%/../raven_framework</executable>
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, should this be left as is?

@joshua-cogliati-inl joshua-cogliati-inl merged commit 34c78d4 into idaholab:devel Apr 17, 2024
12 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