Skip to content

Commit 2a82306

Browse files
authored
Merge pull request #7 from uwescience/exporting_results
Exporting results
2 parents c0f12b5 + 11380cd commit 2a82306

File tree

5 files changed

+50
-4
lines changed

5 files changed

+50
-4
lines changed

.github/workflows/noise_processing.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Ambient Sound Processing
33
on:
44
# To run manually
55
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
- exporting_results
10+
611
# schedule:
712
# - cron: '9 * * * *'
813

@@ -33,7 +38,22 @@ jobs:
3338
run: |
3439
python ambient_sound_analysis/noise_processing.py
3540
36-
- uses: stefanzweifel/git-auto-commit-action@v5
41+
- name: Upload to GitHub repo
42+
uses: stefanzweifel/git-auto-commit-action@v5
3743
with:
3844
commit_message: Commit to Github
3945
file_pattern: 'ambient_sound_analysis/img/*.png'
46+
47+
- name: Upload as artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ambient_sound_plots
51+
path: ambient_sound_analysis/img/*.png
52+
53+
- name: Upload to Google Drive
54+
uses: AnimMouse/setup-rclone@v1
55+
with:
56+
rclone_config: ${{secrets.RCLONE_CONFIG}}
57+
58+
- run: |
59+
rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/

.github/workflows/test_rclone.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test Rclone
2+
3+
on:
4+
# To run manually
5+
workflow_dispatch:
6+
# push:
7+
# branches:
8+
# - main
9+
# - exporting_results
10+
11+
# schedule:
12+
# - cron: '9 * * * *'
13+
14+
jobs:
15+
process:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Upload to Google Drive
21+
uses: AnimMouse/setup-rclone@v1
22+
with:
23+
rclone_config: ${{secrets.RCLONE_CONFIG}}
24+
25+
- run: |
26+
rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/
-3.98 KB
Loading

ambient_sound_analysis/img/psd.png

-78.8 KB
Loading

ambient_sound_analysis/noise_processing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Set Location and Resolution
1616
# Port Townsend, 1 Hz Frequency, 60-second samples
1717
if __name__ == '__main__':
18-
pipeline = NoiseAnalysisPipeline(Hydrophone.PORT_TOWNSEND,
18+
pipeline = NoiseAnalysisPipeline(Hydrophone.ORCASOUND_LAB,
1919
delta_f=10, bands=None,
2020
delta_t=60, mode='safe')
2121

@@ -25,8 +25,8 @@
2525
# Generate parquet dataframes with noise levels for a time period
2626

2727
now = dt.datetime.now(pytz.timezone('US/Pacific'))
28-
psd_path, broadband_path = pipeline.generate_parquet_file(now - dt.timedelta(hours = 6),
29-
now - dt.timedelta(hours = 1),
28+
psd_path, broadband_path = pipeline.generate_parquet_file(now - dt.timedelta(hours = 9),
29+
now - dt.timedelta(hours = 8),
3030
upload_to_s3=False)
3131

3232
# Read the parquet files

0 commit comments

Comments
 (0)