Cleanup
Browse files
.github/ISSUE_TEMPLATE/bug_report.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
name: Bug report
|
| 3 |
-
about: Create a report to help us improve
|
| 4 |
-
title: ''
|
| 5 |
-
labels: bug
|
| 6 |
-
assignees: ''
|
| 7 |
-
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
**Describe the bug**
|
| 11 |
-
A clear and concise description of what the bug is.
|
| 12 |
-
|
| 13 |
-
**To Reproduce**
|
| 14 |
-
Steps to reproduce the behavior:
|
| 15 |
-
1. Go to '...'
|
| 16 |
-
2. Click on '....'
|
| 17 |
-
3. Scroll down to '....'
|
| 18 |
-
4. See error
|
| 19 |
-
|
| 20 |
-
**Expected behavior**
|
| 21 |
-
A clear and concise description of what you expected to happen.
|
| 22 |
-
|
| 23 |
-
**Screenshots**
|
| 24 |
-
If applicable, add screenshots to help explain your problem.
|
| 25 |
-
|
| 26 |
-
**Desktop (please complete the following information):**
|
| 27 |
-
- OS: [e.g. iOS]
|
| 28 |
-
- Browser [e.g. chrome, safari]
|
| 29 |
-
- Version [e.g. 22]
|
| 30 |
-
|
| 31 |
-
**Additional context**
|
| 32 |
-
Add any other context about the problem here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/ISSUE_TEMPLATE/feature_request.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
name: Feature request
|
| 3 |
-
about: Suggest an idea for this project
|
| 4 |
-
title: ''
|
| 5 |
-
labels: enhancement
|
| 6 |
-
assignees: ''
|
| 7 |
-
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
**Is your feature request related to a problem? Please describe.**
|
| 11 |
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
| 12 |
-
|
| 13 |
-
**Describe the solution you'd like**
|
| 14 |
-
A clear and concise description of what you want to happen.
|
| 15 |
-
|
| 16 |
-
**Describe alternatives you've considered**
|
| 17 |
-
A clear and concise description of any alternative solutions or features you've considered.
|
| 18 |
-
|
| 19 |
-
**Additional context**
|
| 20 |
-
Add any other context or screenshots about the feature request here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/PULL_REQUEST_TEMPLATE/submission.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
name: Submission
|
| 3 |
-
about: Submit data to the Open Reaction Database
|
| 4 |
-
title: ''
|
| 5 |
-
labels: ''
|
| 6 |
-
assignees: ''
|
| 7 |
-
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
**Describe the submission**
|
| 11 |
-
* High-level description of the data
|
| 12 |
-
* Source information (e.g. DOI)
|
| 13 |
-
* Details on how the dataset was created (e.g. web editor, template enumeration, jupyter, etc.)
|
| 14 |
-
* Details about any issues encoding the data (e.g. missing schema fields, ambiguous data, etc.)
|
| 15 |
-
|
| 16 |
-
**Attach any supporting files**
|
| 17 |
-
|
| 18 |
-
(Note: they may need to be attached as one or more .zip files)
|
| 19 |
-
* Reaction template and CSV/Excel for enumerated datasets
|
| 20 |
-
* Jupyter notebooks for programmatically defined datasets
|
| 21 |
-
|
| 22 |
-
---
|
| 23 |
-
[License](https://github.com/open-reaction-database/ord-data/blob/main/LICENSE) • [Terms of Use](https://github.com/open-reaction-database/ord-data/blob/main/CONTRIBUTING.md#terms-of-use) • [Documentation](https://docs.open-reaction-database.org/en/latest/submissions.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/submission.yml
DELETED
|
@@ -1,169 +0,0 @@
|
|
| 1 |
-
# Runs process_dataset.py on all new and changed files.
|
| 2 |
-
#
|
| 3 |
-
# Submissions from forks only trigger the "validation" step to validate the new
|
| 4 |
-
# data. After merging into a new branch in the parent repo, the workflow will
|
| 5 |
-
# run again and trigger the "update" step to add reaction IDs, etc. in
|
| 6 |
-
# preparation for merging into the "main" branch.
|
| 7 |
-
|
| 8 |
-
name: Submission
|
| 9 |
-
|
| 10 |
-
on: [pull_request, push]
|
| 11 |
-
|
| 12 |
-
env:
|
| 13 |
-
ORD_SCHEMA_TAG: v0.3.93
|
| 14 |
-
|
| 15 |
-
jobs:
|
| 16 |
-
count_reactions:
|
| 17 |
-
if: >-
|
| 18 |
-
github.event_name == 'pull_request' &&
|
| 19 |
-
! github.event.pull_request.head.repo.fork
|
| 20 |
-
runs-on: ubuntu-latest
|
| 21 |
-
steps:
|
| 22 |
-
- name: Checkout ord-data
|
| 23 |
-
uses: actions/checkout@v2
|
| 24 |
-
with:
|
| 25 |
-
ref: ${{ github.event.pull_request.head.sha }}
|
| 26 |
-
lfs: true
|
| 27 |
-
if: github.event_name == 'pull_request'
|
| 28 |
-
- name: Checkout ord-schema
|
| 29 |
-
uses: actions/checkout@v2
|
| 30 |
-
with:
|
| 31 |
-
repository: Open-Reaction-Database/ord-schema
|
| 32 |
-
ref: ${{ env.ORD_SCHEMA_TAG }}
|
| 33 |
-
path: ord-schema
|
| 34 |
-
- uses: actions/setup-python@v4
|
| 35 |
-
with:
|
| 36 |
-
python-version: '3.11'
|
| 37 |
-
- name: Install ord_schema
|
| 38 |
-
run: |
|
| 39 |
-
cd "${GITHUB_WORKSPACE}/ord-schema"
|
| 40 |
-
python -m pip install --upgrade pip
|
| 41 |
-
python -m pip install wheel
|
| 42 |
-
python -m pip install .
|
| 43 |
-
- name: Update reactions badge
|
| 44 |
-
run: |
|
| 45 |
-
cd "${GITHUB_WORKSPACE}"
|
| 46 |
-
python ord-schema/badges/reactions.py --root=data --output=badges/reactions.svg
|
| 47 |
-
git add badges/reactions.svg
|
| 48 |
-
git config user.name github-actions
|
| 49 |
-
git config user.email github-actions@github.com
|
| 50 |
-
# Fail gracefully if there is nothing to commit.
|
| 51 |
-
git commit -a -m "Update badges" || (( $? == 1 ))
|
| 52 |
-
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_HEAD_REF}"
|
| 53 |
-
|
| 54 |
-
check_file_types:
|
| 55 |
-
runs-on: ubuntu-latest
|
| 56 |
-
steps:
|
| 57 |
-
- uses: actions/checkout@v2
|
| 58 |
-
- name: Add upstream for comparisons to HEAD
|
| 59 |
-
run: |
|
| 60 |
-
cd "${GITHUB_WORKSPACE}"
|
| 61 |
-
git remote add upstream \
|
| 62 |
-
"https://github.com/Open-Reaction-Database/${GITHUB_REPOSITORY##*/}.git"
|
| 63 |
-
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
|
| 64 |
-
git fetch --no-tags --prune --depth=1 upstream \
|
| 65 |
-
+refs/heads/*:refs/remotes/upstream/*
|
| 66 |
-
- name: Check changed files (PR from fork)
|
| 67 |
-
run: |
|
| 68 |
-
cd "${GITHUB_WORKSPACE}"
|
| 69 |
-
git diff --name-only upstream/main > changed_files.txt
|
| 70 |
-
grep -vE '\.pb(txt)?(.gz)?$' changed_files.txt && \
|
| 71 |
-
echo "Error: submissions should only contain (gzipped) *.pbtxt or *.pb files" && \
|
| 72 |
-
exit 1 || true
|
| 73 |
-
if: >-
|
| 74 |
-
github.event_name == 'pull_request' &&
|
| 75 |
-
github.event.pull_request.head.repo.fork
|
| 76 |
-
|
| 77 |
-
check_target_branch:
|
| 78 |
-
runs-on: ubuntu-latest
|
| 79 |
-
steps:
|
| 80 |
-
- name: Check target branch
|
| 81 |
-
run: |
|
| 82 |
-
echo "Target branch: ${GITHUB_BASE_REF}"
|
| 83 |
-
test "${GITHUB_BASE_REF}" != "main"
|
| 84 |
-
if: >-
|
| 85 |
-
github.event_name == 'pull_request' &&
|
| 86 |
-
github.event.pull_request.head.repo.fork
|
| 87 |
-
|
| 88 |
-
process_submission:
|
| 89 |
-
runs-on: ubuntu-latest
|
| 90 |
-
steps:
|
| 91 |
-
- name: Checkout ord-data
|
| 92 |
-
uses: actions/checkout@v2
|
| 93 |
-
with:
|
| 94 |
-
lfs: true
|
| 95 |
-
if: github.event_name == 'push'
|
| 96 |
-
- name: Checkout ord-data
|
| 97 |
-
uses: actions/checkout@v2
|
| 98 |
-
with:
|
| 99 |
-
ref: ${{ github.event.pull_request.head.sha }}
|
| 100 |
-
lfs: true
|
| 101 |
-
if: github.event_name == 'pull_request'
|
| 102 |
-
- name: Add upstream for comparisons to HEAD
|
| 103 |
-
run: |
|
| 104 |
-
cd "${GITHUB_WORKSPACE}"
|
| 105 |
-
git remote add upstream \
|
| 106 |
-
"https://github.com/Open-Reaction-Database/${GITHUB_REPOSITORY##*/}.git"
|
| 107 |
-
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
|
| 108 |
-
git fetch --no-tags --prune --depth=1 upstream \
|
| 109 |
-
+refs/heads/*:refs/remotes/upstream/*
|
| 110 |
-
- name: Checkout ord-schema
|
| 111 |
-
uses: actions/checkout@v2
|
| 112 |
-
with:
|
| 113 |
-
repository: Open-Reaction-Database/ord-schema
|
| 114 |
-
ref: ${{ env.ORD_SCHEMA_TAG }}
|
| 115 |
-
path: ord-schema
|
| 116 |
-
- name: Identify changed files
|
| 117 |
-
# NOTE(kearnes): This sets the NUM_CHANGED_FILES variable.
|
| 118 |
-
run: |
|
| 119 |
-
cd "${GITHUB_WORKSPACE}"
|
| 120 |
-
git diff --name-status upstream/main > changed_files.txt
|
| 121 |
-
echo "Found $(wc -l < changed_files.txt | tr -d ' ') changed files"
|
| 122 |
-
cat changed_files.txt
|
| 123 |
-
# Use `|| (( $? == 1 ))` in case no lines match (exit code is nonzero).
|
| 124 |
-
grep -E "\.pb(txt)?(.gz)?$" changed_files.txt > changed_data_files.txt || (( $? == 1 ))
|
| 125 |
-
# Use LOCAL_NUM_CHANGED since ::set-env values are not available immediately.
|
| 126 |
-
LOCAL_NUM_CHANGED="$(wc -l < changed_data_files.txt | tr -d ' ')"
|
| 127 |
-
echo "NUM_CHANGED_FILES=${LOCAL_NUM_CHANGED}" >> $GITHUB_ENV
|
| 128 |
-
echo "Found ${LOCAL_NUM_CHANGED} changed dataset files"
|
| 129 |
-
cat changed_data_files.txt
|
| 130 |
-
- uses: actions/setup-python@v4
|
| 131 |
-
with:
|
| 132 |
-
python-version: '3.11'
|
| 133 |
-
if: env.NUM_CHANGED_FILES != '0'
|
| 134 |
-
- name: Install ord_schema
|
| 135 |
-
run: |
|
| 136 |
-
cd "${GITHUB_WORKSPACE}/ord-schema"
|
| 137 |
-
python -m pip install --upgrade pip
|
| 138 |
-
python -m pip install wheel
|
| 139 |
-
python -m pip install .
|
| 140 |
-
if: env.NUM_CHANGED_FILES != '0'
|
| 141 |
-
- name: Validate submission
|
| 142 |
-
run: |
|
| 143 |
-
cd "${GITHUB_WORKSPACE}"
|
| 144 |
-
python ./ord-schema/ord_schema/scripts/process_dataset.py \
|
| 145 |
-
--input_file=changed_data_files.txt \
|
| 146 |
-
--base=upstream/main
|
| 147 |
-
if: >-
|
| 148 |
-
env.NUM_CHANGED_FILES != '0' &&
|
| 149 |
-
! (github.event_name == 'pull_request' &&
|
| 150 |
-
! github.event.pull_request.head.repo.fork)
|
| 151 |
-
- name: Update submission
|
| 152 |
-
run: |
|
| 153 |
-
cd "${GITHUB_WORKSPACE}"
|
| 154 |
-
python ./ord-schema/ord_schema/scripts/process_dataset.py \
|
| 155 |
-
--input_file=changed_data_files.txt \
|
| 156 |
-
--update \
|
| 157 |
-
--cleanup \
|
| 158 |
-
--base=upstream/main \
|
| 159 |
-
--issue=${{ github.event.number }} \
|
| 160 |
-
--token=${{ secrets.GITHUB_TOKEN }}
|
| 161 |
-
git config user.name github-actions
|
| 162 |
-
git config user.email github-actions@github.com
|
| 163 |
-
# Fail gracefully if there is nothing to commit.
|
| 164 |
-
git commit -a -m "Update submission" || (( $? == 1 ))
|
| 165 |
-
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_HEAD_REF}"
|
| 166 |
-
if: >-
|
| 167 |
-
env.NUM_CHANGED_FILES != '0' &&
|
| 168 |
-
github.event_name == 'pull_request' &&
|
| 169 |
-
! github.event.pull_request.head.repo.fork
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/validation.yml
DELETED
|
@@ -1,61 +0,0 @@
|
|
| 1 |
-
# Runs process_dataset.py on all files in the database.
|
| 2 |
-
|
| 3 |
-
name: Validation
|
| 4 |
-
|
| 5 |
-
on:
|
| 6 |
-
push:
|
| 7 |
-
branches:
|
| 8 |
-
- main
|
| 9 |
-
pull_request:
|
| 10 |
-
paths:
|
| 11 |
-
# Runs when this file is modified in a PR.
|
| 12 |
-
- '.github/workflows/validation.yml'
|
| 13 |
-
|
| 14 |
-
env:
|
| 15 |
-
ORD_SCHEMA_TAG: v0.3.93
|
| 16 |
-
|
| 17 |
-
jobs:
|
| 18 |
-
validate_database:
|
| 19 |
-
runs-on: ubuntu-latest
|
| 20 |
-
strategy:
|
| 21 |
-
matrix:
|
| 22 |
-
filter: [
|
| 23 |
-
'data/[0-4][0-4]',
|
| 24 |
-
'data/[0-4][5-9]',
|
| 25 |
-
'data/[0-4][a-f]',
|
| 26 |
-
'data/[5-9][0-4]',
|
| 27 |
-
'data/[5-9][5-9]',
|
| 28 |
-
'data/[5-9][a-f]',
|
| 29 |
-
'data/[a-f][0-4]',
|
| 30 |
-
'data/[a-f][5-9]',
|
| 31 |
-
'data/[a-f][a-f]',
|
| 32 |
-
]
|
| 33 |
-
steps:
|
| 34 |
-
- name: Checkout ord-data
|
| 35 |
-
uses: actions/checkout@v2
|
| 36 |
-
with:
|
| 37 |
-
lfs: true
|
| 38 |
-
- name: Checkout ord-schema
|
| 39 |
-
uses: actions/checkout@v2
|
| 40 |
-
with:
|
| 41 |
-
repository: Open-Reaction-Database/ord-schema
|
| 42 |
-
ref: ${{ env.ORD_SCHEMA_TAG }}
|
| 43 |
-
path: ord-schema
|
| 44 |
-
- uses: actions/setup-python@v4
|
| 45 |
-
with:
|
| 46 |
-
python-version: '3.11'
|
| 47 |
-
- name: Install ord_schema
|
| 48 |
-
run: |
|
| 49 |
-
cd "${GITHUB_WORKSPACE}/ord-schema"
|
| 50 |
-
python -m pip install --upgrade pip
|
| 51 |
-
python -m pip install wheel
|
| 52 |
-
python -m pip install .
|
| 53 |
-
- name: Validate datasets
|
| 54 |
-
env:
|
| 55 |
-
FILTER: ${{ matrix.filter }}
|
| 56 |
-
run: |
|
| 57 |
-
cd "${GITHUB_WORKSPACE}"
|
| 58 |
-
python ./ord-schema/ord_schema/scripts/validate_dataset.py \
|
| 59 |
-
--input="data/*/*.pb*" \
|
| 60 |
-
--filter="${FILTER}" \
|
| 61 |
-
--n_jobs=4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
badges/reactions.svg
DELETED