Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e89c3b6

Browse files
yibeichanpre-commit-ci[bot]
andauthoredJun 21, 2024··
[ENH] release prep (#45)
* rename branch to main, add release yml * set ga to fetch and update release version for context url * low GA checking frequency * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * comment out breakpoint() * rename files, refactor code * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 239efcc commit e89c3b6

File tree

5 files changed

+50
-23
lines changed

5 files changed

+50
-23
lines changed
 

‎.github/workflows/pythonpackage.yml ‎.github/workflows/package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [macos-latest, ubuntu-latest]
19-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
19+
python-version: ["3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v4

‎.github/workflows/pythonpublish.yml ‎.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- name: Set up Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v4
1919
with:
2020
python-version: '3.x'
2121
- name: Install dependencies

‎.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Auto-release on PR merge
2+
3+
on:
4+
# ATM, this is the closest trigger to a PR merging
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
AUTO_VERSION: v11.0.5
11+
12+
jobs:
13+
auto-release:
14+
runs-on: ubuntu-latest
15+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Prepare repository
20+
# Fetch full git history and tags
21+
run: git fetch --unshallow --tags
22+
23+
- name: Unset header
24+
# checkout@v2 adds a header that makes branch protection report errors
25+
# because the Github action bot is not a collaborator on the repo
26+
run: git config --local --unset http.https://github.com/.extraheader
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.11"
32+
33+
- name: Download auto
34+
run: |
35+
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
36+
wget -O- "$auto_download_url" | gunzip > ~/auto
37+
chmod a+x ~/auto
38+
39+
- name: Create release
40+
run: |
41+
~/auto shipit -vv
42+
env:
43+
GH_TOKEN: ${{ secrets.AUTO_ORG_TOKEN }}

‎reproschema/jsonldutils.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@
66
from pyld import jsonld
77

88
from .context_url import CONTEXTFILE_URL
9-
from .models import (
10-
Activity,
11-
Item,
12-
Protocol,
13-
Response,
14-
ResponseActivity,
15-
ResponseOption,
16-
identify_model_class,
17-
)
9+
from .models import identify_model_class
1810
from .utils import fixing_old_schema, lgr, start_server, stop_server
1911

2012

‎reproschema/reproschema2redcap.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@
44
import requests
55

66
from .context_url import CONTEXTFILE_URL
7-
from .jsonldutils import _is_file, _is_url, load_file
8-
from .models import (
9-
Activity,
10-
Item,
11-
Protocol,
12-
Response,
13-
ResponseActivity,
14-
ResponseOption,
15-
write_obj_jsonld,
16-
)
17-
from .utils import fixing_old_schema, start_server, stop_server
7+
from .jsonldutils import _is_url, load_file
8+
from .models import Activity, Item, Protocol, ResponseOption
9+
from .utils import start_server, stop_server
1810

1911

2012
def fetch_choices_from_url(url):

0 commit comments

Comments
 (0)
Please sign in to comment.