Skip to content

Commit

Permalink
Fix broken benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSava committed Sep 23, 2024
1 parent a44408b commit 1ec2537
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _Short description of the approach_
- [ ] Added appropriate release note label
- [ ] Commit history is consistent and clean, in line with the [contribution guidelines](https://github.com/equinor/ert/blob/main/CONTRIBUTING.md).
- [ ] Make sure unit tests pass locally after every commit (`git rebase -i main
--exec 'pytest tests/unit_tests -n logical -m "not integration_test"'`)
--exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"'`)

## When applicable
- [ ] **When there are user facing changes**: Updated documentation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Run benchmark
run: |
pytest tests/performance_tests/test_analysis.py::test_and_benchmark_adaptive_localization_with_fields --benchmark-json output.json
pytest tests/ert/performance_tests/test_analysis.py::test_and_benchmark_adaptive_localization_with_fields --benchmark-json output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following is a set of guidelines for contributing to ERT.

## Test categories

Tests that are in the `tests/unit_tests` directory and are
Tests that are in the `tests/ert/unit_tests` directory and are
not marked with `integration_test` are ment to be exceptionally
fast and reliable. This is so that one can run those while
iterating on the code. This means special care has to
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ There are many kinds of tests in the `tests` directory, while iterating on your
code you can run a fast subset of the tests with

```sh
pytest -n logical tests/unit_tests -m "not integration_tests"
pytest -n logical tests/ert/unit_tests -m "not integration_tests"
```

[Git LFS](https://git-lfs.com/) must be installed to get all the files. This is packaged as `git-lfs` on Ubuntu, Fedora or macOS Homebrew. For Equinor RGS node users, it is possible to use `git` from Red Hat Software Collections:
Expand Down
3 changes: 1 addition & 2 deletions ci/testkomodo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
copy_test_files () {
cp -r ${CI_SOURCE_ROOT}/tests ${CI_TEST_ROOT}
ln -s ${CI_SOURCE_ROOT}/test-data ${CI_TEST_ROOT}/test-data
ln -s ${CI_SOURCE_ROOT}/examples ${CI_TEST_ROOT}/examples

ln -s ${CI_SOURCE_ROOT}/src ${CI_TEST_ROOT}/src

Expand Down Expand Up @@ -54,7 +53,7 @@ start_tests () {
unset OMP_NUM_THREADS

basetemp=$(mktemp -d -p $_ERT_TESTS_SHARED_TMP)
pytest --timeout=3600 -v --$_ERT_TESTS_QUEUE_SYSTEM --basetemp="$basetemp" unit_tests/scheduler
pytest --timeout=3600 -v --$_ERT_TESTS_QUEUE_SYSTEM --basetemp="$basetemp" ert/unit_tests/scheduler
rm -rf "$basetemp" || true

popd
Expand Down
2 changes: 1 addition & 1 deletion test-data/ert/poly_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a template for instantiating a forward model that generates a variant of
## Usage

To instantiate a version of the template, run the `make_poly_example()` function
in `tests/performance_tests/performance_utils.py`, or the main function in there.
in `tests/ert/performance_tests/performance_utils.py`, or the main function in there.

It takes several parameters:

Expand Down
2 changes: 1 addition & 1 deletion tests/ert/performance_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Don't allow the performance to gradually change inadvertantly when adding a new

## Fixture with example data

There is a fixture `template_config` in the `ert/tests/performance_tests/conftest.py` file. This fixture is run once for each of the "cases_to_run", also defined in `conftest.py`. See below for more about this.
There is a fixture `template_config` in the `ert/tests/ert/performance_tests/conftest.py` file. This fixture is run once for each of the "cases_to_run", also defined in `conftest.py`. See below for more about this.

If your test depends on the `poly_ran` fixture, each of the cases will become a separate parameter for your test, e.g. the test will potentially be run many times.

Expand Down

0 comments on commit 1ec2537

Please sign in to comment.