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

Out of place ATS #2964

Merged
merged 18 commits into from
Feb 13, 2024
Merged

Out of place ATS #2964

merged 18 commits into from
Feb 13, 2024

Conversation

cssherman
Copy link
Contributor

@cssherman cssherman commented Jan 29, 2024

This PR moves ats files from the integratedTests repo into the main GEOS repo. The new test baselines will have a 1:1 structure to the inputFiles directory. We are planning to address changes to baseline storage in a follow-up PR.

geosPythonPackages PR:
GEOS-DEV/geosPythonPackages#6

integratedTests PR:
GEOS-DEV/integratedTests#88

@cssherman cssherman added type: testing Unit tests, non-regression testing, ... flag: requires rebaseline Requires rebaseline branch in integratedTests labels Jan 29, 2024
set(ATS_BASELINE_DIR "/p/lustre2/${USER}/integratedTests/baselines" CACHE PATH "")

# Temporary argument for python module change testing
set(GEOS_PYTHON_PACKAGES_BRANCH "feature/sherman/outOfPlaceATS" CACHE STRING "" FORCE)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a cmake variable that can override the branch of geosPythonPackages during the build. We'll want to have a procedure in place for handling this when we make potentially breaking changes to the CI

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense. We'll need that cmake target to reinstall the packages though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it also working if we put and hash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That shouldn't be hard to hard to do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TotoGaz - This is forwarded to this git clone arg, so a hash should work: https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---branchltnamegt

@cssherman cssherman self-assigned this Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3613109) 52.21% compared to head (1d34b55) 52.21%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2964   +/-   ##
========================================
  Coverage    52.21%   52.21%           
========================================
  Files          973      973           
  Lines        82572    82572           
========================================
+ Hits         43112    43114    +2     
+ Misses       39460    39458    -2     

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

@cssherman cssherman force-pushed the feature/sherman/outOfPlaceATS branch from 2aac46e to 965ca89 Compare January 29, 2024 20:38
Copy link
Collaborator

@CusiniM CusiniM left a comment

Choose a reason for hiding this comment

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

Thanks Chris! I think having the ats files in the same folder as the xml without those soft links is great. A few things we could work on:

  • Naming of the ats files (it's all over the place)
  • Enforce smoke and benchmark naming for all xmls so that we can then easily create a filter that only runs smoke tests and one that only runs benchmarks.
  • consolidate to a single ats file per folder?
  • add a field file_name to TestDeck

Copy link
Contributor

@TotoGaz TotoGaz left a comment

Choose a reason for hiding this comment

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

Did you test your PR on the CI?

Also, something that can be really interesting is to mount the source directory read only --volume=${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE_MOUNT_POINT} from https://github.com/GEOS-DEV/GEOS/blob/develop/.github/workflows/build_and_test.yml#L116
Normally, we should not touch the source folder anymore so it should be OK.

@rrsettgast that could be a very nice way not to bother about cleaning after the build: when the docker container gets removed with the --rm option, then we're good.

@@ -0,0 +1,19 @@
import geos_ats
Copy link
Contributor

Choose a reason for hiding this comment

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

So are you adding new tests? Or are you basically "removing" the links with the file they are pointing to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm just about ready to start testing on the CI. The last steps are to figure out how we want to fetch the baselines and the default path for things on the CI.

I'm not adding/removing any tests here. Essentially, the script that I wrote did the following:

  1. Find any .ats files in the integrated tests repo
  2. Find any corresponding .xml file links in the same repo, resolving their absolute paths
  3. For each set of (absolute) test directories, create a new test file with correct xml names (or a flag to indicate that a file isn't present in the target directory)

This was followed by some manual cleanup of invalid tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We 100% should go through and further curate the test files

Comment on lines 43 to 51
check_step=1,
curvecheck_params=CurveCheckParameters(**curvecheck_params)),
TestDeck(name="SneddonRotated_smoke",
description='Sneddon with inclined fracture',
partitions=((1, 1, 1), (2, 2, 1)),
restart_step=0,
check_step=1,
restartcheck_params=RestartcheckParameters(**restartcheck_params))
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can use yapf on ats files as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, already done. Something like this works in the inputFiles directory: python -m yapf -i $(find -name "*.ats")

inputFiles/main.ats Show resolved Hide resolved
set(ATS_BASELINE_DIR "/p/lustre2/${USER}/integratedTests/baselines" CACHE PATH "")

# Temporary argument for python module change testing
set(GEOS_PYTHON_PACKAGES_BRANCH "feature/sherman/outOfPlaceATS" CACHE STRING "" FORCE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it also working if we put and hash?

src/CMakeLists.txt Outdated Show resolved Hide resolved
set( integrated_tests_python_sources )
file( GLOB_RECURSE integrated_tests_python_sources "${CMAKE_SOURCE_DIR}/../inputFiles/*.py" )
set( integrated_tests_ats_sources )
file( GLOB_RECURSE integrated_tests_ats_sources "${CMAKE_SOURCE_DIR}/../inputFiles/*.ats" )
Copy link
Contributor

Choose a reason for hiding this comment

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

😎

)

add_custom_command( OUTPUT ${ATS_SCRIPT}
COMMAND ${CMAKE_BINARY_DIR}/bin/setup_ats_environment ${CMAKE_SOURCE_DIR}/.. ${CMAKE_BINARY_DIR} ${ATS_WORKING_DIR} ${ATS_BASELINE_DIR} ${ATS_ARGUMENTS}
Copy link
Contributor

Choose a reason for hiding this comment

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

At some moment, maybe it'll be useful to have named options like --src ...

@cssherman cssherman added ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI labels Feb 2, 2024
@cssherman cssherman force-pushed the feature/sherman/outOfPlaceATS branch from 21f2c51 to 4aec705 Compare February 13, 2024 01:51
@cssherman cssherman merged commit 728848e into develop Feb 13, 2024
23 checks passed
@cssherman cssherman deleted the feature/sherman/outOfPlaceATS branch February 13, 2024 19:04
ouassimkh pushed a commit that referenced this pull request Feb 16, 2024
Implementing out of place ATS, moving testing docs
arng40 pushed a commit that referenced this pull request Feb 22, 2024
Implementing out of place ATS, moving testing docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: requires rebaseline Requires rebaseline branch in integratedTests type: testing Unit tests, non-regression testing, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants