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

feat: complete rewrite, using xsdata instead of xmlschema #176

Merged
merged 20 commits into from
Jul 6, 2023
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
25 changes: 0 additions & 25 deletions .github/scripts/download_aics_test_data.py

This file was deleted.

20 changes: 9 additions & 11 deletions .github/workflows/build.yml → .github/workflows/built_branch.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: build branch
name: update built branch

on:
push:
branches:
- "main"
schedule:
# <minute [0,59]> <hour [0,23]> <day of the month [1,31]> <month of the year [1,12]> <day of the week [0,6]>
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
# Run every Monday at 18:00:00 UTC (Monday at 10:00:00 PST)
- cron: '0 18 * * 1'

jobs:
build:
Expand All @@ -17,24 +12,27 @@ jobs:
- name: Checkout built branch
uses: actions/checkout@v3
with:
ref: 'built'
ref: "built"
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.x"

- name: Clone main
run: git clone https://github.com/tlambert03/ome-types
- name: Build
run: |
python -m pip install --upgrade pip
pip install build
python -m pip install --upgrade pip build
python -m build ome-types --wheel
rm -rf ome_types
unzip ome-types/dist/ome_types-*

- name: Commit
if: github.event_name == 'push'
run: |
git config user.name "Talley Lambert"
git config user.email "talley.lambert@gmail.com"
git add ome_types
git commit -m 'Commit from GitHub Actions (build.yml)'
git commit -m 'Commit from GitHub Actions (built_branch.yml)'
git push --set-upstream origin built
44 changes: 0 additions & 44 deletions .github/workflows/release.yml

This file was deleted.

89 changes: 72 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ on:
push:
branches:
- "main"
- "v2"
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- "main"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check_manifest:
Expand All @@ -28,16 +33,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ["3.8", "3.9", "3.10", "3.11"]
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- platform: ubuntu-latest
python-version: '3.7'
- platform: macos-latest
python-version: '3.11'
- platform: ubuntu-latest
python-version: '3.11'
# skipping windows 3.11 until lxml has wheels
- python-version: "3.7"
platform: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -47,10 +47,65 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
pip install -e .[autogen]
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
python -m pip install -U pip
python -m pip install .[test,dev]
- name: Test
run: pytest --cov --cov-report=xml

- name: retest withou lxml or xmlschema
if: matrix.platform == 'ubuntu-latest'
run: |
pip uninstall -y lxml xmlschema
pytest --cov --cov-report=xml --cov-append

- uses: codecov/codecov-action@v2

test-types:
name: Typesafety
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install pytest pytest-mypy-plugins
python -m pip install .

- name: Test
run: pytest typesafety -v

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [test, check_manifest]
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Build
run: |
pip install -U pip build
python -m build .

- name: Publish PyPI Package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TWINE_API_KEY }}

- name: Create Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: "dist/*"
50 changes: 0 additions & 50 deletions .github/workflows/test_aics.yml

This file was deleted.

Loading