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

Improvements for tests #106

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Improvements for tests #106

merged 3 commits into from
Dec 12, 2024

Conversation

rgieseke
Copy link
Collaborator

@rgieseke rgieseke commented Dec 5, 2024

The tests which were previously run only locally are now also running in CI (including the slow ones it takes about 3min).

  • Use detrend function for testing

    • also refactors Config object and default arguments.
  • Adjust SSA tests and add provenance

    • use functions
    • use numpy testing for comparison
    • refactor metadata creation

    🚀

@@ -93,19 +86,22 @@ def add_parser(subparsers):
group.add_argument(
"--modes",
type=int,
default=4,
default=Config.__dataclass_fields__["modes"].default,
Copy link
Member

Choose a reason for hiding this comment

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

Is this better than hardcoded values for tests? A user may change them and break tests by accident.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure I understand correctly, but the change to use Config.__dataclass_fields__["modes"].default is to read the default from the 'Config' object in detrend.py as a single source of truth for the default.

Sorry, we should have put this more clearly in the PR description.

@rgieseke rgieseke changed the base branch from tests-np-allclose to develop December 12, 2024 15:24
swillner and others added 3 commits December 12, 2024 16:27
Also refactors Config object and default arguments.
- use functions
- use numpy testing for comparison
- refactor metadata creation
@matthiasmengel matthiasmengel merged commit 7fc2c3e into develop Dec 12, 2024
1 check passed
@rgieseke rgieseke deleted the tests-adjustment branch December 12, 2024 16:01
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