-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
175 additions
and
529 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/usr/bin/env bash | ||
cd /home/math/IonBeam | ||
cd /home/math/IonBeam/ | ||
export ODC_ENABLE_WRITING_LONG_STRING_CODEC=1 | ||
echo >> cron_logs_acronet.txt | ||
echo Acronet `date` >> cron_logs_acronet.txt | ||
echo >> cron/logs_acronet.txt | ||
echo Acronet `date` >> cron/logs_acronet.txt | ||
/home/math/.venv/bin/python -m ionbeam \ | ||
./config -vvvv \ | ||
--env ewc \ | ||
--sources acronet \ | ||
--download \ | ||
--no-ingest-to-pipeline \ | ||
--logfile cron_logs_acronet.txt | ||
--logfile cron/logs_acronet.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/usr/bin/env bash | ||
cd /home/math/IonBeam | ||
export ODC_ENABLE_WRITING_LONG_STRING_CODEC=1 | ||
echo >> cron_logs_ingest.txt | ||
echo Ingestion `date` >> cron_logs_ingest.txt | ||
echo >> cron/logs_ingest.txt | ||
echo Ingestion `date` >> cron/logs_ingest.txt | ||
/home/math/.venv/bin/python -m ionbeam \ | ||
./config -vvv \ | ||
--env ewc \ | ||
--sources meteotracker smart_citizen_kit acronet \ | ||
--no-download \ | ||
--ingest-to-pipeline \ | ||
--overwrite-fdb \ | ||
--logfile cron_logs_ingest.txt | ||
--logfile cron/logs_ingest.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/usr/bin/env bash | ||
cd /home/math/IonBeam | ||
export ODC_ENABLE_WRITING_LONG_STRING_CODEC=1 | ||
echo >> cron_logs_meteotracker.txt | ||
echo Meteotracker `date` >> cron_logs_meteotracker.txt | ||
echo >> cron/logs_meteotracker.txt | ||
echo Meteotracker `date` >> cron/logs_meteotracker.txt | ||
/home/math/.venv/bin/python -m ionbeam \ | ||
./config -vvvv \ | ||
--env ewc \ | ||
--sources meteotracker \ | ||
--download \ | ||
--no-ingest-to-pipeline \ | ||
--logfile cron_logs_meteotracker.txt | ||
--logfile cron/logs_meteotracker.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/usr/bin/env bash | ||
cd /home/math/IonBeam | ||
export ODC_ENABLE_WRITING_LONG_STRING_CODEC=1 | ||
echo >> cron_logs_smart_citizen_kit.txt | ||
echo smart_citizen_kit `date` >> cron_logs_smart_citizen_kit.txt | ||
echo >> cron/logs_smart_citizen_kit.txt | ||
echo smart_citizen_kit `date` >> cron/logs_smart_citizen_kit.txt | ||
/home/math/.venv/bin/python -m ionbeam \ | ||
./config -vvvv \ | ||
--env ewc \ | ||
--sources smart_citizen_kit \ | ||
--download \ | ||
--no-ingest-to-pipeline \ | ||
--overwrite-fdb \ | ||
--logfile cron_logs_smart_citizen_kit.txt | ||
--logfile cron/logs_smart_citizen_kit.txt | ||
|
This file was deleted.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from ionbeam.metadata.db import Station, Property, Author | ||
from ionbeam.sources.API_sources_base import DataChunk, DBDataChunk, DataStream | ||
from ionbeam.core.config_parser import parse_single_action, parse_config | ||
from pathlib import Path | ||
from sqlalchemy.orm import Session | ||
from sqlalchemy import delete, text | ||
|
||
config_file = Path("./config").expanduser() | ||
|
||
action_yaml = """ | ||
class: SmartCitizenKitSource | ||
mappings: [] | ||
copy_metadata_to_columns: | ||
external_station_id: device.id | ||
""" | ||
|
||
config, source = parse_single_action(config_file, action_yaml, | ||
environment = "local", | ||
die_on_error = False, | ||
) | ||
|
||
with Session(config.globals.sql_engine) as db_session: | ||
with db_session.begin(): | ||
db_session.execute(text("TRUNCATE TABLE property_station_association_table CASCADE")) | ||
db_session.execute(text("TRUNCATE TABLE station CASCADE")) | ||
db_session.execute(text("TRUNCATE TABLE property CASCADE")) | ||
db_session.execute(text("TRUNCATE TABLE author CASCADE")) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from ionbeam.metadata.db import Station, Property, Author | ||
from ionbeam.sources.API_sources_base import DataChunk, DBDataChunk, DataStream | ||
from ionbeam.core.config_parser import parse_single_action, parse_config | ||
from pathlib import Path | ||
from sqlalchemy.orm import Session | ||
from sqlalchemy import delete, text | ||
|
||
config_file = Path("./config").expanduser() | ||
|
||
action_yaml = """ | ||
class: SmartCitizenKitSource | ||
mappings: [] | ||
copy_metadata_to_columns: | ||
external_station_id: device.id | ||
""" | ||
|
||
config, source = parse_single_action(config_file, action_yaml, | ||
environment = "local", | ||
die_on_error = False, | ||
) | ||
|
||
with Session(config.globals.sql_engine) as db_session: | ||
with db_session.begin(): | ||
for p in db_session.query(Property).all(): | ||
print(p) |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.