Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release prep #45

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Auto-release on PR merge

on:
# ATM, this is the closest trigger to a PR merging
push:
branches:
- main

env:
AUTO_VERSION: v11.0.5

jobs:
auto-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3

- name: Prepare repository
# Fetch full git history and tags
run: git fetch --unshallow --tags

- name: Unset header
# checkout@v2 adds a header that makes branch protection report errors
# because the Github action bot is not a collaborator on the repo
run: git config --local --unset http.https://github.com/.extraheader

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Download auto
run: |
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')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto

- name: Create release
run: |
~/auto shipit -vv
env:
GH_TOKEN: ${{ secrets.AUTO_ORG_TOKEN }}
10 changes: 1 addition & 9 deletions reproschema/jsonldutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@
from pyld import jsonld

from .context_url import CONTEXTFILE_URL
from .models import (
Activity,
Item,
Protocol,
Response,
ResponseActivity,
ResponseOption,
identify_model_class,
)
from .models import identify_model_class
from .utils import fixing_old_schema, lgr, start_server, stop_server


Expand Down
14 changes: 3 additions & 11 deletions reproschema/reproschema2redcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@
import requests

from .context_url import CONTEXTFILE_URL
from .jsonldutils import _is_file, _is_url, load_file
from .models import (
Activity,
Item,
Protocol,
Response,
ResponseActivity,
ResponseOption,
write_obj_jsonld,
)
from .utils import fixing_old_schema, start_server, stop_server
from .jsonldutils import _is_url, load_file
from .models import Activity, Item, Protocol, ResponseOption
from .utils import start_server, stop_server


def fetch_choices_from_url(url):
Expand Down