-
Notifications
You must be signed in to change notification settings - Fork 4
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
Document/Unit Test gempyor.parameters
#277
Merged
Merged
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
95e0437
Preliminary documentation for `gempyor.parameters`
TimothyWillard b914481
Create unit testing utils for `confuse` package
TimothyWillard 500b212
Unit test `Parameters` exceptions in init
TimothyWillard d21d808
Test fixture for `Parameters` attributes
TimothyWillard b3e58d0
Added `partials_are_similar` convenience function
TimothyWillard a375df3
`partials_are_similar` in `Parameters` unit tests
TimothyWillard f2be834
Test fixtures for `picklable_lamda_alpha/sigma`
TimothyWillard 25f583c
Added test fixture for `get_pnames2pindex`
TimothyWillard 5dec9dd
Test fixture for `parameters_quick_draw`
TimothyWillard 896023f
Test fixture for `Parameters.parameters_load`
TimothyWillard 0fec2da
Test fixture for `Parameters.getParameterDF`
TimothyWillard 893fac2
Add note for `parameters_reduce` test fixture
TimothyWillard fe830b1
Parameterized insufficient dates test fixutre
TimothyWillard c9a64be
Add `partials_are_similar` to `__all__`
TimothyWillard 2aa7267
Added `random_distribution_sampler` to `utils`
TimothyWillard 7822ce9
Parameterized `Parameters` attributes test fixture
TimothyWillard cb95001
Parametrize accessor methods of `Parameters`
TimothyWillard 7e88353
Added `sample_fits_distribution` testing util
TimothyWillard 706f5f3
Parametrize `parameters_quick_draw` test fixture
TimothyWillard 1571710
Parameterize `parameters_load` test fixture
TimothyWillard 0284e56
Parameterize `getParameterDF` test fixture
TimothyWillard 5ccd9cd
`Parameters` attrs fixture `MockParametersInputs`
TimothyWillard 50583bc
Expanded parameters for test fixtures
TimothyWillard 9a381d5
Changed parameterization style on test fixtures
TimothyWillard 33dbf17
Parametrize exception test fixtures
TimothyWillard e19c0b3
Remove `MockData`, expand `parameters_load` test
TimothyWillard 01c5329
Loosen guarantees on `pnames2pindex` attribute
TimothyWillard 8d38d0f
Types for `Parameters` instance attrs, formatting
TimothyWillard ad87669
Merge branch 'main' into unit-test-gempyor-parameters
TimothyWillard a82596d
Consolidated confuse testing helpers
TimothyWillard 2ec9695
Update `Parameters` unit tests to use new helper
TimothyWillard a01c4ce
Merge main into unit-test-gempyor-parameters
TimothyWillard db0e025
Merge main into unit-test-gempyor-parameters
TimothyWillard d00dffc
Merge main into unit-test-gempyor-parameters
TimothyWillard 6cbd803
Merge main into unit-test-gempyor-parameters
TimothyWillard 5b4d062
Added brief desc of example for testing util
TimothyWillard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TimothyWillard checking my understanding here: this file effectively establishes a module within gempyor, corresponding to testing support functions, yes?
if so, what are the benefits of making those functions part of the public interface of gempyor? i'm familiar with the downsides, and am more accustomed to seeing this sort of thing as internal to the test suite, not exported. But I can imagine possible benefits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that understanding is correct.
The unit tests are defined outside of the package so they need to be able to import these functions from
gempyor
. I could set__all__ = []
anyways to exclude these from the "public interface", there are ways to easily get around the__all__
restrictions. Other options would be either 1) moving these functions into an appropriate place in thetests
folder or 2) moving the tests intogempyor
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it - this should be a next-issue-problem and seems like the right answer is 2).
if we're thinking of gempyor as its own little capability / package, it should have its own internal tests.