From 69f493e149607d65ede9d131f2e1066b1db79c6c Mon Sep 17 00:00:00 2001 From: erik-whiting Date: Sat, 29 Jul 2023 00:42:41 -0500 Subject: [PATCH 01/14] Add linter step in CI --- .github/workflows/obo-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/obo-test.yml b/.github/workflows/obo-test.yml index 15edf2cbb..9428f5d85 100644 --- a/.github/workflows/obo-test.yml +++ b/.github/workflows/obo-test.yml @@ -20,6 +20,9 @@ jobs: - name: Install requirements run: | python3 -m pip install -r requirements.txt + - name: Run linter + run: | + tox -e lint - name: Run tests run: | make test \ No newline at end of file From a8db378c8f16839a273591a8ba3809ce0ac6c5de Mon Sep 17 00:00:00 2001 From: Erik Whiting Date: Mon, 31 Jul 2023 16:55:25 -0500 Subject: [PATCH 02/14] Use EndBug/add-and-commit@v9 --- .github/workflows/obo-test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/obo-test.yml b/.github/workflows/obo-test.yml index 9428f5d85..7e5c5373f 100644 --- a/.github/workflows/obo-test.yml +++ b/.github/workflows/obo-test.yml @@ -23,6 +23,11 @@ jobs: - name: Run linter run: | tox -e lint + - name: Commit linter changes + uses: EndBug/add-and-commit@v9 + with: + message: 'Apply linter changes' + add: '.' - name: Run tests run: | make test \ No newline at end of file From b296cb6feefc8ce0185b4442b9e04b6266bb5fbe Mon Sep 17 00:00:00 2001 From: Erik Whiting Date: Mon, 31 Jul 2023 17:05:01 -0500 Subject: [PATCH 03/14] Add linter workflow --- .github/workflows/lint-code.yml | 26 ++++++++++++++++++++++++++ .github/workflows/obo-test.yml | 8 -------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/lint-code.yml diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml new file mode 100644 index 000000000..a28dba410 --- /dev/null +++ b/.github/workflows/lint-code.yml @@ -0,0 +1,26 @@ +name: Run and Apply Linter +on: + workflow_dispatch: + pull_request: + branches: [ master ] +jobs: + run-and-apply: + runs-on: ubuntu-latest + steps: + - name: Checkout main branch + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install "tox<4.0.0" + - name: Permission workaround + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Run linter + run: tox -e lint + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + message: 'Commit automated linter changes' + add: '.' diff --git a/.github/workflows/obo-test.yml b/.github/workflows/obo-test.yml index 7e5c5373f..15edf2cbb 100644 --- a/.github/workflows/obo-test.yml +++ b/.github/workflows/obo-test.yml @@ -20,14 +20,6 @@ jobs: - name: Install requirements run: | python3 -m pip install -r requirements.txt - - name: Run linter - run: | - tox -e lint - - name: Commit linter changes - uses: EndBug/add-and-commit@v9 - with: - message: 'Apply linter changes' - add: '.' - name: Run tests run: | make test \ No newline at end of file From 41d26899b97d608d60d612aa4cd066cae1059186 Mon Sep 17 00:00:00 2001 From: erik-whiting Date: Mon, 31 Jul 2023 22:13:36 +0000 Subject: [PATCH 04/14] Commit automated linter changes --- _data/operations.yml | 20 ++++++++++---------- tests/test_roles.py | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index 85bed0952..5bb39d549 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -10,16 +10,6 @@ members: name: Alan Ruttenberg orcid: 0000-0002-1604-3078 wikidata: Q30508557 -- affiliation: - name: National Institutes of Health (NIH) - ror: 01cwqze88 - country: USA - github: LK112019 - groups: - - outreach - name: Leila Kiani - orcid: 0009-0009-6722-6147 - wikidata: Q118105252 - affiliation: name: University at Buffalo, Buffalo, NY ror: 01y64my43 @@ -197,6 +187,16 @@ members: name: Jim Balhoff orcid: 0000-0002-8688-6599 wikidata: Q37649212 +- affiliation: + name: National Institutes of Health (NIH) + ror: 01cwqze88 + country: USA + github: LK112019 + groups: + - outreach + name: Leila Kiani + orcid: 0009-0009-6722-6147 + wikidata: Q118105252 - affiliation: name: University of Maryland School of Medicine, Baltimore, MD ror: 01r0c1p88 diff --git a/tests/test_roles.py b/tests/test_roles.py index 33de47d3e..8004af32d 100644 --- a/tests/test_roles.py +++ b/tests/test_roles.py @@ -32,9 +32,9 @@ class Role(BaseModel): name: str description: str open: Optional[bool] = None - commitment: Optional[str] = None # can later be required - requirements: Optional[List[str]] = None # can later be required - responsibilities: Optional[List[str]] = None # can later be required + commitment: Optional[str] = None # can later be required + requirements: Optional[List[str]] = None # can later be required + responsibilities: Optional[List[str]] = None # can later be required people: List[Person] From e7efafbcbfe8f5a7179f739696c594892a49d04a Mon Sep 17 00:00:00 2001 From: jsstevenson Date: Tue, 23 Jul 2024 15:38:35 +0000 Subject: [PATCH 05/14] Commit automated linter changes --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index c2fe51e86..688a23ea6 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,6 +176,16 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -372,13 +382,3 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 From 4ff22836d241a313bf4a1feb1d8b542e853b9bab Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Tue, 23 Jul 2024 14:24:44 -0400 Subject: [PATCH 06/14] test commit --- .github/workflows/{lint-code.yml => format.yml} | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename .github/workflows/{lint-code.yml => format.yml} (67%) diff --git a/.github/workflows/lint-code.yml b/.github/workflows/format.yml similarity index 67% rename from .github/workflows/lint-code.yml rename to .github/workflows/format.yml index a28dba410..fe1d247b1 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ -name: Run and Apply Linter +name: Autoformat code and metadata on: workflow_dispatch: pull_request: @@ -8,19 +8,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - name: Install dependencies - run: | - pip install --upgrade pip setuptools wheel - pip install "tox<4.0.0" + run: pip install --upgrade pip setuptools wheel "tox<4.0.0" - name: Permission workaround run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Run linter + - name: Run formatter run: tox -e lint - name: Commit changes uses: EndBug/add-and-commit@v9 with: - message: 'Commit automated linter changes' + message: 'Commit automated formatter changes' add: '.' From c4e9b660ae99c36f99648e649e18bb2dd880d405 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Tue, 30 Jul 2024 16:08:50 -0400 Subject: [PATCH 07/14] revert? testing... --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index 688a23ea6..c2fe51e86 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,16 +176,6 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -382,3 +372,13 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 From 18f7d2d4f14567326e6617e581bf182f38f467c5 Mon Sep 17 00:00:00 2001 From: jsstevenson Date: Tue, 30 Jul 2024 20:09:29 +0000 Subject: [PATCH 08/14] Commit automated formatter changes --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index c2fe51e86..688a23ea6 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,6 +176,16 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -372,13 +382,3 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 From b3117bffc6a709d03d531a91129ac6e8ff4ca60b Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Sat, 3 Aug 2024 16:19:53 -0400 Subject: [PATCH 09/14] append test to end of format workflow --- .github/workflows/format.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index fe1d247b1..190b7688d 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -22,3 +22,12 @@ jobs: with: message: 'Commit automated formatter changes' add: '.' + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install test requirements + run: | + python3 -m pip install -r requirements.txt + - name: Run tests + run: | + make test From b1b35a7b5bbdf16de77fdf36701b932d94ec2ea4 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Sat, 3 Aug 2024 16:20:39 -0400 Subject: [PATCH 10/14] revert auto format to see how tests are handled --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index 688a23ea6..c2fe51e86 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,16 +176,6 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -382,3 +372,13 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 From 63762ff65fe4e9ee8db399a4b9d9af3e461c3d24 Mon Sep 17 00:00:00 2001 From: jsstevenson Date: Sat, 3 Aug 2024 20:21:24 +0000 Subject: [PATCH 11/14] Commit automated formatter changes --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index c2fe51e86..688a23ea6 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,6 +176,16 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -372,13 +382,3 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 From 44a0cf5d6387df75017c25df9ee43ea9d2e9055c Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Sat, 3 Aug 2024 16:25:51 -0400 Subject: [PATCH 12/14] submit commit from github-actions bot for clarity --- .github/workflows/format.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 190b7688d..fe9360410 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -17,11 +17,15 @@ jobs: run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Run formatter run: tox -e lint - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - message: 'Commit automated formatter changes' - add: '.' + - name: Commit all changes + run: | + if [[ `git status --porcelain` ]]; then + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Apply code formatting" + git push + fi - uses: actions/setup-python@v5 with: python-version: '3.9' From 7ba5ce7f884fdb7b873f4a8649f238f727ec163e Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Sat, 3 Aug 2024 16:26:30 -0400 Subject: [PATCH 13/14] test commit --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index 688a23ea6..c2fe51e86 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,16 +176,6 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -382,3 +372,13 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 From 3b12edc8c19a9ff5d6bd1837e03a999db01b31c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 3 Aug 2024 20:27:00 +0000 Subject: [PATCH 14/14] Apply code formatting --- _data/operations.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_data/operations.yml b/_data/operations.yml index c2fe51e86..688a23ea6 100644 --- a/_data/operations.yml +++ b/_data/operations.yml @@ -176,6 +176,16 @@ members: name: James Stevenson orcid: 0000-0002-2568-6163 wikidata: Q125208044 +- affiliation: + name: SciBite + ror: 055j8ya05 + country: UK + github: janelomax + groups: + - outreach + name: Jane Lomax + orcid: 0000-0001-8865-4321 + wikidata: Q20746117 - affiliation: name: University of Pennsylvania, Philadelphia, PA ror: 00b30xv10 @@ -372,13 +382,3 @@ members: name: Vinícius de Souza orcid: 0000-0003-3961-0247 wikidata: Q125502774 -- affiliation: - name: SciBite - ror: 055j8ya05 - country: UK - github: janelomax - groups: - - outreach - name: Jane Lomax - orcid: 0000-0001-8865-4321 - wikidata: Q20746117