Skip to content

Commit

Permalink
full path on submit job for cron
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Mar 20, 2020
1 parent 3790d11 commit 2d4b2b7
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 38 deletions.
Binary file added Zooniverse/.DS_Store
Binary file not shown.
Empty file added Zooniverse/__init__.py
Empty file.
Binary file added Zooniverse/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added Zooniverse/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added Zooniverse/__pycache__/tile_raster.cpython-36.pyc
Binary file not shown.
Binary file added Zooniverse/__pycache__/tile_raster.cpython-37.pyc
Binary file not shown.
14 changes: 14 additions & 0 deletions Zooniverse/cron.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Cron job for weekly runs on the HiPerGator
# This is currently running under ethanwhite's account on daemon2
# To recreate copy, paste, and modify this text into the editor resulting
# from `crontab -e`
# WEECOLOGYDEPLOYGITHUBPAT needs to be replaced with the appropriate GITHUB
# Personal Access Token
# cron jobs on HiPerGator run from a blank environment so we need to set both
# basic environmental variables (HOME and PATH) and also the GitHub tokens
# because they are not loaded into the cronjob environment

HOME=/home/b.weinstein/
PATH=/opt/slurm/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/home/b.weinstein/bin
[email protected]
15 15 * * * sbatch ${HOME}/EvergladesWadingBird/Zooniverse/submit_job.sbatch >> ${HOME}/logs/cron.log 2>&1
2 changes: 1 addition & 1 deletion Zooniverse/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def main(path, everglades_watch, save_dir="/orange/ewhite/everglades/Zooniverse/
assert os.path.exists(saved_file)
uploaded = uploaded.path.append(pd.Series({"path":saved_file}),ignore_index=True)
except Exception as e:
print("{} failed with exception".format(path))
print("{} failed with exception {e}".format(path, e))

#Overwrite uploaded manifest
uploaded.to_csv("uploaded.csv")
2 changes: 1 addition & 1 deletion Zooniverse/submit_job.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ source activate everglades
rclone sync everglades:"WadingBird2020Deliverables" /orange/ewhite/everglades/WadingBirds2020/

#Upload
python manifest.py
python /home/b.weinstein/EvergladesWadingBird/Zooniverse/manifest.py
Binary file added Zooniverse/tests/output/SOAP_046_0.tif
Binary file not shown.
Binary file added Zooniverse/tests/output/SOAP_046_1.tif
Binary file not shown.
Binary file added Zooniverse/tests/output/SOAP_046_2.tif
Binary file not shown.
Binary file added Zooniverse/tests/output/SOAP_046_3.tif
Binary file not shown.
17 changes: 17 additions & 0 deletions Zooniverse/tests/submit_test.sbatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#test connect in sbatch
#!/bin/bash
#SBATCH --job-name=Everglades_rclone # Job name
#SBATCH --mail-type=END # Mail events
#SBATCH [email protected] # Where to send mail
#SBATCH --account=ewhite
#SBATCH --nodes=1 # Number of MPI ranks
#SBATCH --cpus-per-task=1
#SBATCH --mem=10GB
#SBATCH --time=72:00:00 #Time limit hrs:min:sec
#SBATCH --output=/home/b.weinstein/logs/rclone_%j.out # Standard output and error log
#SBATCH --error=/home/b.weinstein/logs/rclone_%j.err

#comet debug

#Sync data
python tests/test_connect.py
52 changes: 16 additions & 36 deletions Zooniverse/zooniverse.wpu
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
[user attributes]
debug.exceptions-ignored = {loc('../../../miniconda3/envs/crowns/lib/python3.7/site-packages/_pytest/config/__init__.py'): {1130: True}}
guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'windows': [{'name': 'P17d1M9PDrDDNBOIKLr7d7agln'\
'JSlCRG',
'windows': [{'name': 'LfPD5D2a8ynAK2sybEe3c4A0IQ'\
'zTXQPX',
'size-state': '',
'type': 'dock',
'view': {'area': 'tall',
Expand Down Expand Up @@ -149,42 +149,22 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'wide',
1,
{})],
'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('manifest.py'),
{'attrib-starts': [],
'first-line': 0L,
'folded-linenos': [],
'sel-line': 3L,
'sel-line-start': 48L,
'selection_end': 68L,
'selection_start': 48L,
'zoom': 0L},
1584653319.210618]],
1),
'current-loc': loc('submit_job.sbatch'),
'primary_view_state': {'editor_states': ({'bookmarks': ([],
0),
'current-loc': loc('manifest.py'),
'editor-state-list': [(loc('manifest.py'),
{'attrib-starts': [],
'first-line': 0L,
'first-line': 113L,
'folded-linenos': [],
'sel-line': 3L,
'sel-line-start': 48L,
'selection_end': 68L,
'selection_start': 48L,
'zoom': 0L}),
(loc('submit_job.sbatch'),
{'attrib-starts': [],
'first-line': 0L,
'folded-linenos': [],
'sel-line': 10L,
'sel-line-start': 451L,
'selection_end': 469L,
'selection_start': 469L,
'sel-line': 121L,
'sel-line-start': 3768L,
'selection_end': 3803L,
'selection_start': 3803L,
'zoom': 0L})],
'has-focus': True,
'locked': False},
[loc('manifest.py'),
loc('submit_job.sbatch')]),
'open_files': [u'manifest.py',
u'submit_job.sbatch']},
[loc('manifest.py')]),
'open_files': [u'manifest.py']},
'saved_notebook_display': None,
'split_percents': {0: 0.5},
'splits': 2,
Expand All @@ -195,12 +175,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'splits': 2,
'tab_location': 'left',
'user_data': {}},
'window-alloc': (0,
'window-alloc': (20,
23,
1418,
1414,
877)}]}
guimgr.recent-documents = [loc('submit_job.sbatch'),
loc('manifest.py')]
guimgr.recent-documents = [loc('manifest.py'),
loc('submit_job.sbatch')]
guimgr.visual-state = {loc('upload.sh'): {'attrib-starts': [],
'first-line': 0L,
'folded-linenos': [],
Expand Down

0 comments on commit 2d4b2b7

Please sign in to comment.