-
Notifications
You must be signed in to change notification settings - Fork 10
Move configuration objects to virtualship.models
#189
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7fa842c
Move location.py and spacetime.py to models
VeckoTheGecko 83f1e51
Move ship_config to models
VeckoTheGecko 9eedd31
Move schedule to models
VeckoTheGecko 7ab7fc3
Move space_time_region to models
VeckoTheGecko 8322aa2
Move errors to separate file
VeckoTheGecko a339607
Run hooks
VeckoTheGecko 1ecd201
Update reference to ConfigError
VeckoTheGecko 1e48d55
Add tidy-imports ruff rule
VeckoTheGecko 6a632a5
Add models.__init__
VeckoTheGecko db140ca
Update imports to models subpackage
VeckoTheGecko 5b38efc
Update imports of errors
VeckoTheGecko a87e9cc
cleanup virtualship/expedition/__init__.py
VeckoTheGecko 54ec985
cleanup virtualship/__init__.py
VeckoTheGecko 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
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| class CredentialFileError(Exception): | ||
| """Exception raised for errors in the input file format.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class IncompleteDownloadError(Exception): | ||
| """Exception raised for incomplete downloads.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class CheckpointError(RuntimeError): | ||
| """An error in the checkpoint.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class ScheduleError(RuntimeError): | ||
| """An error in the schedule.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class ConfigError(RuntimeError): | ||
| """An error in the config.""" | ||
|
|
||
| pass |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| Variable, | ||
| ) | ||
|
|
||
| from ..spacetime import Spacetime | ||
| from virtualship.models import Spacetime | ||
|
|
||
|
|
||
| @dataclass | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| """Pydantic models and data classes used to configure virtualship (i.e., in the configuration files or settings).""" | ||
|
|
||
| from .location import Location | ||
| from .schedule import Schedule, Waypoint | ||
| from .ship_config import ( | ||
| ADCPConfig, | ||
| ArgoFloatConfig, | ||
| CTD_BGCConfig, | ||
| CTDConfig, | ||
| DrifterConfig, | ||
| InstrumentType, | ||
| ShipConfig, | ||
| ShipUnderwaterSTConfig, | ||
| XBTConfig, | ||
| ) | ||
| from .space_time_region import ( | ||
| SpaceTimeRegion, | ||
| SpatialRange, | ||
| TimeRange, | ||
| ) | ||
| from .spacetime import ( | ||
| Spacetime, | ||
| ) | ||
|
|
||
| __all__ = [ # noqa: RUF022 | ||
| "Location", | ||
| "Schedule", | ||
| "Waypoint", | ||
| "InstrumentType", | ||
| "ArgoFloatConfig", | ||
| "ADCPConfig", | ||
| "CTDConfig", | ||
| "CTD_BGCConfig", | ||
| "ShipUnderwaterSTConfig", | ||
| "DrifterConfig", | ||
| "XBTConfig", | ||
| "ShipConfig", | ||
| "SpatialRange", | ||
| "TimeRange", | ||
| "SpaceTimeRegion", | ||
| "Spacetime", | ||
| ] |
File renamed without changes.
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.