generated from DCMLab/annotation_workflow_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
608 additions
and
73 deletions.
There are no files selected for viewing
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,46 @@ | ||
name: check_labels | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
perform_check: | ||
if: github.event.pusher.name != 'ms3-bot' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
with: | ||
path: main | ||
token: ${{ secrets.MS3_BOT_TOKEN }} | ||
- uses: lots0logs/[email protected] | ||
id: modified | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Display changed files | ||
continue-on-error: true | ||
run: | | ||
echo "${{ steps.modified.outputs.modified }}" | ||
echo "${{ join(steps.modified.outputs.modified) }}" | ||
cat ${HOME}/files_modified.json | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Clone ms3 | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: johentsch/ms3 | ||
ref: workflow | ||
path: ./ms3 | ||
- name: Install ms3 | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e ms3 | ||
- name: Run ms3 check | ||
working-directory: ./main | ||
run: | | ||
ms3 check -f ${HOME}/files_modified.json --assertion |
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,66 @@ | ||
name: label_comparison | ||
|
||
on: pull_request | ||
|
||
|
||
jobs: | ||
compare: | ||
if: github.actor != 'ms3-bot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Output context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
- name: Checkout PR | ||
uses: actions/checkout@v2 | ||
with: | ||
path: main | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
token: ${{ secrets.MS3_BOT_TOKEN }} | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Clone ms3 | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: johentsch/ms3 | ||
ref: workflow | ||
path: ./ms3 | ||
- name: Install ms3 | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e ./ms3 | ||
- uses: lots0logs/[email protected] | ||
id: modified | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Display changed files | ||
continue-on-error: true | ||
run: cat ${HOME}/files_modified.json | ||
- name: Run ms3 compare | ||
working-directory: ./main | ||
run: | | ||
ms3 compare -f ${HOME}/files_modified.json | ||
- name: Generate modulation plans | ||
working-directory: ./main | ||
continue-on-error: true | ||
run: | | ||
python -m pip install plotly | ||
python .github/workflows/gantt.py -f ${HOME}/files_modified.json | ||
- name: Commit comparison files | ||
working-directory: ./main | ||
continue-on-error: true | ||
run: | | ||
git config --global user.name "ms3-bot" | ||
git config --global user.email [email protected] | ||
git config --global user.token ${{ secrets.MS3_BOT_TOKEN }} | ||
git add -A | ||
git commit -m "Added comparison files for review" | ||
- name: Push files | ||
working-directory: ./main | ||
continue-on-error: true | ||
run: | | ||
git push |
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,92 @@ | ||
name: ms3_extract | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
extract: | ||
if: github.event.pusher.name != 'ms3-bot' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
path: main | ||
token: ${{ secrets.MS3_BOT_TOKEN }} | ||
- name: Pull current workflow | ||
working-directory: ./main | ||
run: | | ||
wget https://github.com/DCMLab/annotation_workflow_template/archive/refs/heads/main.zip | ||
unzip main.zip | ||
cp -r annotation_workflow_template-main/.github . | ||
rm -r annotation_workflow_template-main/ | ||
rm main.zip | ||
- name: Configure git and push updated workflow | ||
working-directory: ./main | ||
continue-on-error: true | ||
run: | | ||
git config --global user.name "ms3-bot" | ||
git config --global user.email [email protected] | ||
git config --global user.token ${{ secrets.MS3_BOT_TOKEN }} | ||
git add -A | ||
git commit -m "Current version of workflows" | ||
git push | ||
- name: Clone ms3 | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: johentsch/ms3 | ||
ref: workflow | ||
path: ./ms3 | ||
- name: Install ms3 | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e ./ms3 | ||
- uses: lots0logs/[email protected] | ||
id: modified | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Display changed and added files | ||
continue-on-error: true | ||
run: | | ||
cat ${HOME}/files_modified.json | ||
cat ${HOME}/files_added.json | ||
- name: Run ms3 extract | ||
working-directory: ./main | ||
run: | | ||
ms3 extract -f ${HOME}/files_modified.json -M -N -X -D | ||
ms3 extract -f ${HOME}/files_added.json -M -N -X -D | ||
- name: Push files | ||
working-directory: ./main | ||
continue-on-error: true | ||
run: | | ||
git add -A | ||
git commit -m "Automatically added TSV files from parse with ms3" | ||
git push | ||
- name: Clone corpusstats | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: DCMLab/corpus_statistics_generator | ||
path: ./corpusstats | ||
ref: main | ||
token: ${{ secrets.MS3_BOT_MAINTENANCE }} | ||
- name: Install corpusstats | ||
run: python -m pip install -e ./corpusstats | ||
- name: Generate GitHub pages | ||
working-directory: ./main | ||
run: | | ||
python .github/workflows/update_pages.py -g ${{ github.repository }} -t ${{ secrets.MS3_BOT_MAINTENANCE }} -d tonicizations -o ../public | ||
- name: Display generated files | ||
working-directory: ./public | ||
run: ls | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
enable_jekyll: true |
Oops, something went wrong.