-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from AgPipeline/develop
Fixing up Actions for new ubuntu version
- Loading branch information
Showing
10 changed files
with
364 additions
and
27 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
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,36 @@ | ||
%appinstall canopycover | ||
# Download canopycover code. In the future use pip/conda install. | ||
wget -O canopycover.tar.gz https://github.com/AgPipeline/transformer-canopycover/archive/v1.8.tar.gz | ||
tar xvf canopycover.tar.gz | ||
mv transformer-canopycover-1.8 src | ||
echo "Removing unneeded files" | ||
rm -rf --verbose src/test_data src/tests src/.github canopycover.tar.gz | ||
|
||
# Install Makeflow and other dependencies | ||
python3.8 -m venv --system-site-packages .venv | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir pip | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" | ||
|
||
# Add example Docker command to SCIF app help section | ||
if [ -n $DOCKER_IMAGE ]; then | ||
echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run canopycover\n" >> "${PWD}/scif/runscript.help" | ||
fi | ||
|
||
# Generate remainder of SCIF app help section by running main script | ||
.venv/bin/python3 src/canopycover.py --help >> "${PWD}/scif/runscript.help" | ||
|
||
%apprun canopycover | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--jx-args="/scif/apps/src/canopy_cover_files.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/canopycover_workflow.jx" | ||
|
||
%apphelp canopycover | ||
This app provides an entrypoint to the canopycover tool |
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,29 @@ | ||
%appinstall git_rgb_plot | ||
# Install Makeflow and other dependencies | ||
python3.8 -m venv --system-site-packages .venv | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir pip | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir opencv-contrib-python-headless agpypeline | ||
|
||
# Add example Docker command to SCIF app help section | ||
if [ -n $DOCKER_IMAGE ]; then | ||
echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run git\n" >> "${PWD}/scif/runscript.help" | ||
fi | ||
|
||
# Generate remainder of SCIF app help section by running main script | ||
.venv/bin/python3 /scif/apps/src/git_algo_rgb_plot.py --help >> "${PWD}/scif/runscript.help" | ||
|
||
%apprun git_rgb_plot | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--jx-args="/scif/apps/src/git_rgb_plot_files.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/git_rgb_plot_workflow.jx" | ||
|
||
%apphelp git_rgb_plot | ||
This app provides an entrypoint to the git tool |
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,43 @@ | ||
%appinstall greenness-indices | ||
# Install Makeflow and other dependencies | ||
python3.8 -m venv --system-site-packages .venv | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir pip | ||
|
||
# Download plot-base-rgb code | ||
wget -O plot_base_rgb.tar.gz https://github.com/AgPipeline/plot-base-rgb/archive/v1.10.tar.gz | ||
tar xvf plot_base_rgb.tar.gz | ||
mv plot-base-rgb-1.10 src | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" | ||
|
||
# Download greenness-indices code. In the future use pip/conda install. | ||
wget -O greenness_indices.tar.gz https://github.com/AgPipeline/transformer-rgb-indices/archive/v1.4.tar.gz | ||
tar xvf greenness_indices.tar.gz | ||
cp -r transformer-rgb-indices-1.4/* src/ | ||
rm -r transformer-rgb-indices-1.4 | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir -r "${PWD}/src/requirements.txt" | ||
echo "Removing unneeded files" | ||
rm -rf --verbose src/test_data src/tests src/.github plot_base_rgb.tar.gz greenness_indices.tar.gz | ||
|
||
# Add example Docker command to SCIF app help section | ||
if [ -n $DOCKER_IMAGE ]; then | ||
echo "\n\nExample Docker command: docker run $DOCKER_IMAGE run greenness-indices\n" >> "${PWD}/scif/runscript.help" | ||
fi | ||
|
||
# Generate remainder of SCIF app help section by running main script | ||
.venv/bin/python3 src/transformer.py --help >> "${PWD}/scif/runscript.help" | ||
|
||
%apprun greenness-indices | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--jx-args="/scif/apps/src/greenness-indices_files.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/greenness-indices_workflow.jx" | ||
|
||
%apphelp greenness-indices | ||
This app provides an entrypoint to the greenness-indices tool |
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,116 @@ | ||
|
||
%appinstall betydb2geojson | ||
# Install dependencies | ||
python3.8 -m venv --system-site-packages .venv | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir pip | ||
.venv/bin/python3 -m pip install --upgrade --no-cache-dir requests pygdal==3.4.1.* | ||
|
||
%apprun betydb2geojson | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/betydb2geojson_workflow.jx" | ||
|
||
%apphelp betydb2geojson | ||
This app provides a conversion from BETYdb site data to GeoJSON plot geometries. | ||
|
||
Expected keys in the "jx-args.json" file: | ||
BETYDB_URL - the value is the URL of the BETYdb instance to get plot geometries from | ||
PLOT_SHAPEFILE - the path to save the GeoJSON to | ||
|
||
Sample command: | ||
scif run betydb2geojson | ||
|
||
See also: | ||
https://github.com/AgPipeline/drone-makeflow/blob/master/README.md | ||
|
||
%appinstall shp2geojson | ||
# Install dependencies | ||
|
||
%apprun shp2geojson | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/shp2geojson_workflow.jx" | ||
|
||
%apphelp shp2geojson | ||
This app provides a conversion from a shapefile to GeoJSON plot geometries. | ||
|
||
Expected keys in the "jx-args.json" file: | ||
PLOT_GEOMETRY_FILE - the path to the shapefile to convert to GeoJSON | ||
PLOT_SHAPEFILE - the path to save the GeoJSON to | ||
|
||
Sample command: | ||
scif run shp2geojson | ||
|
||
See also: | ||
https://github.com/AgPipeline/drone-makeflow/blob/master/README.md | ||
|
||
%appinstall merge_csv | ||
# Install dependencies | ||
|
||
%apprun merge_csv | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/merge_csv_workflow.jx" | ||
|
||
%apphelp merge_csv | ||
This app searches folders for CSV files and merges them by file name into the output folder | ||
|
||
Expected keys in the "jx-args.json" file: | ||
MERGECSV_SOURCE - the folder path to look for CSV file | ||
MERGECSV_TARGET - the folder path to save the merged CSV files to | ||
MERGECSV_OPTIONS - options for processing CSV files; set to "--help" to display all available options without processing files | ||
|
||
Sample command: | ||
scif run merge_csv | ||
|
||
See also: | ||
https://github.com/AgPipeline/drone-makeflow/blob/master/README.md | ||
|
||
%appinstall find_files2json | ||
# Install dependencies | ||
|
||
%apprun find_files2json | ||
/cctools/bin/makeflow \ | ||
--jx \ | ||
--jx-args="/scif/apps/src/jx-args.json" \ | ||
--log-verbose \ | ||
--retry-count=1 \ | ||
--change-directory="${SCIF_APPDATA}" \ | ||
--makeflow-log="${SCIF_APPDATA}/workflow.jx.makeflowlog" \ | ||
--batch-log="${SCIF_APPDATA}/workflow.jx.batchlog" \ | ||
${1} \ | ||
"/scif/apps/src/find_files2json_workflow.jx" | ||
|
||
%apphelp find_files2json | ||
This app searches folders for files and writes out a JSON file intended to be used as input to a workflow. | ||
The search assumes the wanted files are located in subfolders off the FILES2JSON_SEARCH_FOLDER. | ||
If no files matching the search name are found then no JSON file is saved. | ||
|
||
Expected keys in the "jx-args.json" file: | ||
FILES2JSON_SEARCH_NAME - the name of the files to locate | ||
FILES2JSON_SEARCH_FOLDER - the path to the folder to search within | ||
FILES2JSON_JSON_FILE - the path to the JSON file to write found files to | ||
|
||
Sample command: | ||
scif run find_files2json |
Oops, something went wrong.