diff --git a/.github/workflows/noise_processing.yml b/.github/workflows/noise_processing.yml index de67396..40990f4 100644 --- a/.github/workflows/noise_processing.yml +++ b/.github/workflows/noise_processing.yml @@ -3,6 +3,11 @@ name: Ambient Sound Processing on: # To run manually workflow_dispatch: + push: + branches: + - main + - exporting_results + # schedule: # - cron: '9 * * * *' @@ -33,7 +38,22 @@ jobs: run: | python ambient_sound_analysis/noise_processing.py - - uses: stefanzweifel/git-auto-commit-action@v5 + - name: Upload to GitHub repo + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Commit to Github file_pattern: 'ambient_sound_analysis/img/*.png' + + - name: Upload as artifact + uses: actions/upload-artifact@v4 + with: + name: ambient_sound_plots + path: ambient_sound_analysis/img/*.png + + - name: Upload to Google Drive + uses: AnimMouse/setup-rclone@v1 + with: + rclone_config: ${{secrets.RCLONE_CONFIG}} + + - run: | + rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/ diff --git a/.github/workflows/test_rclone.yml b/.github/workflows/test_rclone.yml new file mode 100644 index 0000000..0366e33 --- /dev/null +++ b/.github/workflows/test_rclone.yml @@ -0,0 +1,26 @@ +name: Test Rclone + +on: + # To run manually + workflow_dispatch: +# push: +# branches: +# - main +# - exporting_results + + # schedule: + # - cron: '9 * * * *' + +jobs: + process: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Upload to Google Drive + uses: AnimMouse/setup-rclone@v1 + with: + rclone_config: ${{secrets.RCLONE_CONFIG}} + + - run: | + rclone copy ambient_sound_analysis/img/broadband.png mydrive:rclone_uploads/ diff --git a/ambient_sound_analysis/img/broadband.png b/ambient_sound_analysis/img/broadband.png index 26b8704..450440e 100644 Binary files a/ambient_sound_analysis/img/broadband.png and b/ambient_sound_analysis/img/broadband.png differ diff --git a/ambient_sound_analysis/img/psd.png b/ambient_sound_analysis/img/psd.png index 0eeda94..745906c 100644 Binary files a/ambient_sound_analysis/img/psd.png and b/ambient_sound_analysis/img/psd.png differ diff --git a/ambient_sound_analysis/noise_processing.py b/ambient_sound_analysis/noise_processing.py index 8442f37..f8d5b97 100644 --- a/ambient_sound_analysis/noise_processing.py +++ b/ambient_sound_analysis/noise_processing.py @@ -15,7 +15,7 @@ # Set Location and Resolution # Port Townsend, 1 Hz Frequency, 60-second samples if __name__ == '__main__': - pipeline = NoiseAnalysisPipeline(Hydrophone.PORT_TOWNSEND, + pipeline = NoiseAnalysisPipeline(Hydrophone.ORCASOUND_LAB, delta_f=10, bands=None, delta_t=60, mode='safe') @@ -25,8 +25,8 @@ # Generate parquet dataframes with noise levels for a time period now = dt.datetime.now(pytz.timezone('US/Pacific')) -psd_path, broadband_path = pipeline.generate_parquet_file(now - dt.timedelta(hours = 6), - now - dt.timedelta(hours = 1), +psd_path, broadband_path = pipeline.generate_parquet_file(now - dt.timedelta(hours = 9), + now - dt.timedelta(hours = 8), upload_to_s3=False) # Read the parquet files