Skip to content

Commit

Permalink
fail web scrap script if changes to data files are found
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Mar 1, 2024
1 parent 9ce164d commit fb60254
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/web_scrap_dynamic_csv_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.11'
architecture: 'x64'
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
Expand All @@ -25,30 +25,30 @@ jobs:
pip install -r requirements.txt
pip install pydar
- name: Set Github credentials
- name: Web Scrap for New Changes - swath_coverage_by_time_position.csv
working-directory: pydar
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
git pull
python updateCsvSwathCoverage.py
- name: Web Scrap for New Changes
- name: Web Scrap for New Changes - coradr_jpl_options.csv
working-directory: pydar
run: |
python updateCsvSwathCoverage.py
python updateCsvCORADARJPLOptions.py
- name: Web Scrap for New Changes - feature_name_details.csv
working-directory: pydar
run: |
python updateCsvFeatureNameDetails.py
- name: Check if script results in changes in files
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files

- name: If file changed, commit and push if files
- name: If file changed, throw error to review changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git add -A
timestamp=$(date -u)
git commit -m "Github Actions: update csv scripts (${timestamp})"
git push
echo "Github Actions: review changes to data files"
exit 1
- name: If file not changed, do not commit empty changes
if: steps.verify-changed-files.outputs.files_changed == 'false'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Contains all named features on Titan with their furthest latitude/longitude posi

Collected from the [planetarynames.wr.usgs.gov](https://planetarynames.wr.usgs.gov/SearchResults?Target=74_Titan)

Headers: ["Feature Name", "Northernmost Latitude", "Southernmost Latitude", "Easternmost Longitude", "Westernmost Longitude", "Center Latitude", "Center Longitude", "Origin of Name"]
Headers: ["Feature Name", "Northmost Latitude", "Southmost Latitude", "Eastmost Longitude", "Westmost Longitude", "Center Latitude", "Center Longitude", "Origin of Name"]

View data file: [feature_name_details.csv](https://github.com/unaschneck/pydar/blob/main/pydar/data/feature_name_details.csv)

Expand Down

0 comments on commit fb60254

Please sign in to comment.