Skip to content

Remove test configurations in tests/resources - #212

Merged
Qian-HuiChen merged 6 commits into
mainfrom
117-remove-test-config
May 5, 2026
Merged

Remove test configurations in tests/resources#212
Qian-HuiChen merged 6 commits into
mainfrom
117-remove-test-config

Conversation

@Qian-HuiChen

Copy link
Copy Markdown
Contributor

Remove all configurations stored in tests/resources which are used in unit testing.

Instead, on-demand cloning is called via git clone during unit test execution and cleaned up after the unit tests. A fixed commit hash is currently hard-coded in tests/common.py to ensure reproducibility and version control.

Closes #117.

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.79%. Comparing base (5e851b3) to head (97e23c9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   85.41%   87.79%   +2.37%     
==========================================
  Files          22       22              
  Lines        1303     1303              
==========================================
+ Hits         1113     1144      +31     
+ Misses        190      159      -31     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jo-basevi
jo-basevi previously approved these changes Apr 23, 2026

@jo-basevi jo-basevi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for implementing this @Qian-HuiChen. It is nice to see so many deleted files :)

As the cloned configurations are used in several tests, an option could be to have a session-scoped fixture that creates a cache of the cloned configurations. Then a test-scoped fixture that copies the clone to a tmp directory, and then cleans up the directory after. This might run faster than cloning for every test.

Comment thread tests/common.py Outdated
jo-basevi
jo-basevi previously approved these changes May 4, 2026

@jo-basevi jo-basevi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The fixture implementation looks neat! The latest commit does speed up the tests :) On my local laptop, the tests in 9595035 took about 90s to run and now in 7a19ac6, its about 45s

Both my comments on code are minor and can be left, but it would good to reduce the size of the test esm1.6's access.out file if possible, as it's a large file to add to the repository.

Comment thread tests/config_tests/qa/test_test_access_esm1p6_config.py Outdated
Comment thread tests/conftest.py Outdated
@Qian-HuiChen

Copy link
Copy Markdown
Contributor Author

I tried to trim down esm1.6/output000/access.out in commit 7afe6ef.

@Qian-HuiChen
Qian-HuiChen requested a review from jo-basevi May 5, 2026 01:36
jo-basevi
jo-basevi previously approved these changes May 5, 2026

@jo-basevi jo-basevi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Qian-HuiChen, looks good to me :)

@Qian-HuiChen
Qian-HuiChen merged commit 22f0650 into main May 5, 2026
8 checks passed
@Qian-HuiChen
Qian-HuiChen deleted the 117-remove-test-config branch May 5, 2026 02:38
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.

Remove test configurations in tests/resources?

2 participants