-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
52 create separate tabs for reco and full outputs (#53)
* Create separate directories for RECO and FULL in workflow * Use an argument instead of explicitly calling RECO or FULL * Delete file that will be unused going forward * Update and rename campaigns.html to campaigns_reco.html Create layout for reconstructed files * Create layout for full simulation summary list * Update and rename campaigns.md to campaigns_reco.md * Create campaigns_full.md * Add both reco and full to campaigns menu
- Loading branch information
Showing
9 changed files
with
72 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,23 +17,35 @@ jobs: | |
shell: bash | ||
run: | | ||
if [ -d ./docs/RECO ]; then rm -rf ./docs/RECO; fi | ||
if [ -d ./docs/FULL ]; then rm -rf ./docs/FULL; fi | ||
mc config host add S3 ${S3_HOST} ${S3_ACCESS_KEY} ${S3_SECRET_KEY} | ||
chmod +x ./docs/_data/list_S3.sh | ||
./docs/_data/list_S3.sh > ./docs/_data/s3_content.yml | ||
./docs/_data/list_S3.sh RECO > ./docs/_data/reco_content.yml | ||
./docs/_data/list_S3.sh FULL > ./docs/_data/full_content.yml | ||
env: | ||
S3_HOST: ${{secrets.S3_HOST}} | ||
S3_ACCESS_KEY: ${{secrets.S3_ACCESS_KEY}} | ||
S3_SECRET_KEY: ${{secrets.S3_SECRET_KEY}} | ||
- name: Upload s3_content | ||
- name: Upload reco_content | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: s3_content | ||
path: ./docs/_data/s3_content.yml | ||
name: reco_content | ||
path: ./docs/_data/reco_content.yml | ||
- name: Upload full_content | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: full_content | ||
path: ./docs/_data/full_content.yml | ||
- name: Upload RECO | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RECO | ||
path: ./docs/RECO/ | ||
- name: Upload FULL | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: FULL | ||
path: ./docs/FULL/ | ||
|
||
commit_data: | ||
needs: update_data | ||
|
@@ -44,24 +56,37 @@ jobs: | |
- name: Remove old s3_content | ||
shell: bash | ||
run: | | ||
rm ./docs/_data/s3_content.yml | ||
if [ -f ./docs/_data/reco_content.yml ]; then rm -f ./docs/_data/reco_content.yml; fi | ||
if [ -f ./docs/_data/full_content.yml ]; then rm -f ./docs/_data/full_content.yml; fi | ||
if [ -d ./docs/RECO ]; then rm -rf ./docs/RECO; fi | ||
if [ -d ./docs/FULL ]; then rm -rf ./docs/FULL; fi | ||
mkdir ./docs/RECO/ | ||
- name: Download s3_content | ||
mkdir ./docs/FULL/ | ||
- name: Download reco_content | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: s3_content | ||
name: reco_content | ||
path: ./docs/_data/ | ||
- name: Download full_content | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: full_content | ||
path: ./docs/_data/ | ||
- name: Download RECO | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: RECO | ||
path: ./docs/RECO/ | ||
- name: Download FULL | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: FULL | ||
path: ./docs/FULL/ | ||
- name: Commit updates | ||
shell: bash | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add ./docs/ | ||
git commit -m "Update list in s3_content.yml and RECO/ directory" || echo "No changes to commit" | ||
git commit -m "Update summary lists in RECO and FULL directory" || echo "No changes to commit" | ||
git push origin main |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
--- | ||
title: campaigns_full | ||
description: campaigns_full | ||
name: campaigns_full | ||
layout: campaigns_full | ||
--- | ||
|
||
{% include layouts/title.md %} |
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,8 @@ | ||
--- | ||
title: campaigns_reco | ||
description: campaigns_reco | ||
name: campaigns_reco | ||
layout: campaigns_reco | ||
--- | ||
|
||
{% include layouts/title.md %} |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# List all objects in the S3 RECO directory | ||
OBJECTS=$(mc ls S3/eictest/EPIC/RECO) | ||
# List all objects in the RECO or FULL directory | ||
OBJECTS=$(mc ls S3/eictest/EPIC/$1) | ||
|
||
# Iterate over the objects: print their names and create folders in the repository containing index.md | ||
while IFS= read -r object; do | ||
name_only=$(echo "$object" | sed -n 's/^\[[^][]*][[:blank:]]*[^[:blank:]]*[[:blank:]]*\(.*\)$/\1/p') # extracts the folder name from mc ls | ||
mkdir -p ./docs/RECO/"${name_only}" | ||
touch ./docs/RECO/"${name_only}"index.md | ||
echo '```' > ./docs/RECO/"${name_only}"index.md | ||
mc tree --files S3/eictest/EPIC/RECO/"${name_only}" | sed 's/.*\.root$//g' | uniq -c | sed 's/.*1 //' >> ./docs/RECO/"${name_only}"index.md # contructs tree diagram with count of files in each directory | ||
echo '```' >> ./docs/RECO/"${name_only}"index.md | ||
echo -e "- text: "$name_only"\n url: "/epic-prod/RECO/$name_only"" | ||
mkdir -p ./docs/$1/"${name_only}" | ||
touch ./docs/$1/"${name_only}"index.md | ||
echo '```' > ./docs/$1/"${name_only}"index.md | ||
mc tree --files S3/eictest/EPIC/$1/"${name_only}" | sed 's/.*\.root$//g' | uniq -c | sed 's/.*1 //' >> ./docs/$1/"${name_only}"index.md # contructs tree diagram with count of files in each directory | ||
echo '```' >> ./docs/$1/"${name_only}"index.md | ||
echo -e "- text: "$name_only"\n url: "/epic-prod/$1/$name_only"" | ||
done <<< "$OBJECTS" |
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 was deleted.
Oops, something went wrong.
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,8 @@ | ||
--- | ||
layout: default | ||
--- | ||
<ul> | ||
{% for line in site.data.reco_content %} | ||
<li><a href="{{ line.url }}">{{ line.text }}</a></li> | ||
{% endfor %} | ||
</ul> |