-
Notifications
You must be signed in to change notification settings - Fork 1
Ecs processing #223
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
Open
frigusgulo
wants to merge
10
commits into
main
Choose a base branch
from
ecs-processing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ecs processing #223
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d1a3855
rds instance
719ca9d
rds connection
183f0e2
ecs tiledb managment
b05c933
ECS stuff. Novatel/RINEX
64e98bf
hatanaka compression
8b59691
dfopoo
034b33b
test df0poo
14e811f
todd garpos bugs
1611eb1
ecs dev
b7ab77f
ecs processing parse survey data
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # download, preprocess, and postprocess SV3 data | ||
| import os | ||
| from pathlib import Path | ||
|
|
||
| os.environ["GARPOS_PATH"] = str(Path.home() / "Project/SeaFloorGeodesy" / "garpos") | ||
| os.environ["WORKING_ENVIRONMENT"] = "ECS" | ||
| os.environ["S3_SYNC_BUCKET"] = "seafloor-public-bucket-bucket83908e77-gprctmuztrim" | ||
| os.environ["MAIN_DIRECTORY_ECS"] = "/Volumes/DunbarSSD/Project/SeafloorGeodesy/ECSDEMO" | ||
| os.environ["DYLD_LIBRARY_PATH"] = ( | ||
| os.environ.get("CONDA_PREFIX", "") | ||
| + "/lib:" | ||
| + os.environ.get("DYLD_LIBRARY_PATH", "") | ||
| ) | ||
| PRIDE_DIR = Path.home() / ".PRIDE_PPPAR_BIN" | ||
| os.environ["PATH"] += os.pathsep + str(PRIDE_DIR) | ||
| from es_sfgtools.config.env_config import Environment, WorkingEnvironment | ||
| Environment.load_working_environment() | ||
| from es_sfgtools.workflows.workflow_handler import WorkflowHandler | ||
| from es_sfgtools.workflows.midprocess import IntermediateDataProcessor | ||
| from es_sfgtools.workflows.pipelines.sv3_pipeline import SV3PipelineECS | ||
| from es_sfgtools.data_mgmt.assetcatalog.schemas import AssetEntry | ||
|
|
||
| def main(): | ||
| wfh:WorkflowHandler = WorkflowHandler() | ||
| network = "cascadia-community" | ||
| station = "NSS1" | ||
| campaign = "2024_A" | ||
| wfh.set_network_station_campaign( | ||
| network_id=network, station_id=station, campaign_id=campaign | ||
| ) | ||
| pl = SV3PipelineECS( | ||
| directory_handler=wfh.directory_handler, | ||
| asset_catalog=wfh.asset_catalog, | ||
| ) | ||
| pl.set_network_station_campaign( | ||
| network_id=network, station_id=station, campaign_id=campaign | ||
|
|
||
| ) | ||
|
|
||
| #pl.config.rinex_config.override = True | ||
| #pl.get_rinex_files() | ||
| # wfh.ingest_catalog_archive_data() | ||
| # wfh.ingest_download_archive_data() | ||
| #pl.process_rinex() | ||
| #pl.update_shotdata() | ||
| dataPostProcessor: IntermediateDataProcessor = wfh.midprocess_get_processor(override_metadata_require=True) | ||
| dataPostProcessor.parse_surveys() | ||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
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 |
|---|---|---|
|
|
@@ -58,5 +58,6 @@ dependencies: | |
| - gnatss | ||
| - regex | ||
| - cloudpathlib[s3] | ||
| - hatanaka | ||
| variables: | ||
| CGO_ENABLED: 1 | ||
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 |
|---|---|---|
|
|
@@ -53,5 +53,6 @@ dependencies: | |
| - gnatss | ||
| - regex | ||
| - cloudpathlib[s3] | ||
| - hatanaka | ||
| variables: | ||
| CGO_ENABLED: 1 | ||
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 @@ | ||
| version = "0.5.3" |
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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # src/es_sfgtools/__init__.py | ||
|
|
||
| from ._version import version as __version__ | ||
| __version__ = "0.5.3" |
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 |
|---|---|---|
|
|
@@ -14,12 +14,13 @@ class WorkingEnvironment(Enum): | |
|
|
||
| LOCAL = "LOCAL" | ||
| GEOLAB = "GEOLAB" | ||
| ECS = "ECS" | ||
|
|
||
|
|
||
| WORKING_ENVIRONMENT_KEY = "WORKING_ENVIRONMENT" | ||
| S3_SYNC_BUCKET_KEY = "S3_SYNC_BUCKET" | ||
| MAIN_DIRECTORY_GEOLAB_KEY = "MAIN_DIRECTORY_GEOLAB" | ||
|
|
||
| MAIN_DIRECORY_ECS_KEY = "MAIN_DIRECTORY_ECS" | ||
|
||
|
|
||
| class Environment: | ||
| """ | ||
|
|
@@ -32,6 +33,7 @@ class methods. | |
| _working_environment: WorkingEnvironment = WorkingEnvironment.LOCAL | ||
| _s3_sync_bucket: str | None = None | ||
| _main_directory_GEOLAB: str | None = None | ||
| _main_directory_ECS: str | None = None | ||
|
|
||
| @classmethod | ||
| def working_environment(cls) -> WorkingEnvironment: | ||
|
|
@@ -48,6 +50,11 @@ def main_directory_GEOLAB(cls) -> str | None: | |
| """Returns the main directory for the GEOLAB environment, if configured.""" | ||
| return cls._main_directory_GEOLAB | ||
|
|
||
| @classmethod | ||
| def main_directory_ECS(cls) -> str | None: | ||
| """Returns the main directory for the ECS environment, if configured.""" | ||
| return cls._main_directory_ECS | ||
|
|
||
| @classmethod | ||
| def load_working_environment(cls) -> None: | ||
| """ | ||
|
|
@@ -74,6 +81,15 @@ def load_working_environment(cls) -> None: | |
| f"{MAIN_DIRECTORY_GEOLAB_KEY} environment variable must be set in GEOLAB environment." | ||
| ) | ||
| cls._main_directory_GEOLAB = md_geolab | ||
|
|
||
| case "ECS": | ||
| cls._working_environment = WorkingEnvironment.ECS | ||
| md_ecs = os.environ.get(MAIN_DIRECORY_ECS_KEY) | ||
| if md_ecs is None: | ||
| raise ValueError( | ||
| f"{MAIN_DIRECORY_ECS_KEY} environment variable must be set in ECS environment." | ||
| ) | ||
| cls._main_directory_ECS = md_ecs | ||
| case _: | ||
| raise ValueError( | ||
| f"Unknown WORKING_ENVIRONMENT: {env_str}. " | ||
|
|
||
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.
Import of 'AssetEntry' is not used.