From 106f08bf1424f348e472c4a7bcd3adf06f4e9705 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 13 Oct 2022 13:49:27 -0400 Subject: [PATCH 1/5] Add asdf-unit-schemas to pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index b1d25746c..4d65489bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ classifiers = [ dependencies = [ 'asdf-standard >=1.0.1', 'asdf-transform-schemas >=0.2.2', + 'asdf-unit-schmas >= 0.1.0', 'importlib_resources >=3; python_version <"3.9"', 'importlib-metadata >=3; python_version <"3.10"', 'jmespath >=0.6.2', From 1490c9d58d08710343242f508d2a2563c9d30406 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 13 Oct 2022 13:52:30 -0400 Subject: [PATCH 2/5] Update basic tests --- .github/workflows/downstream.yml | 5 +++++ requirements-dev.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index cfa4068c3..abf378b4d 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -97,6 +97,11 @@ jobs: ref: main install_command: pip install -e .[test] test_command: pytest + - package_name: asdf-unit-schemas + repository: asdf-format/asdf-unit-schemas + ref: main + install_command: pip install -e .[test] + test_command: pytest - package_name: asdf-coordinates-schemas repository: asdf-format/asdf-coordinates-schemas ref: main diff --git a/requirements-dev.txt b/requirements-dev.txt index 6bf003eaf..245fe409c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,7 @@ git+https://github.com/astropy/asdf-astropy git+https://github.com/asdf-format/asdf-coordinates-schemas git+https://github.com/asdf-format/asdf-standard git+https://github.com/asdf-format/asdf-transform-schemas +git+https://github.com/asdf-format/asdf-unit-schemas.git git+https://github.com/asdf-format/asdf-wcs-schemas git+https://github.com/astropy/astropy git+https://github.com/spacetelescope/gwcs From 2e06bb9155f4a52e20cea51c35be4829206d2bbb Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 13 Oct 2022 14:00:19 -0400 Subject: [PATCH 3/5] Add new test matrix for schema dependencies --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da15d1c00..b22b984ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: coverage: codecov test: - needs: [core, asdf-standard] + needs: [core, asdf-schemas] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: cache-path: ~/.cache/pip @@ -61,7 +61,7 @@ jobs: - windows: py39 dev: - needs: [core, asdf-standard] + needs: [core, asdf-schemas] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: cache-path: ~/.cache/pip @@ -78,7 +78,7 @@ jobs: python-version: 3.11.0-rc.2 compatibility: - needs: [core, asdf-standard] + needs: [core, asdf-schemas] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: cache-path: ~/.cache/pip @@ -106,31 +106,50 @@ jobs: - linux: prerelease - linux: packaged - asdf-standard: - name: Run asdf-standard tests + asdf-schemas: + name: ${{ matrix.name }} runs-on: ubuntu-latest + strategy: + matrix: + include: + - package_name: asdf-standard + repository: asdf-format/asdf-standard + ref: master + install_command: pip install -e .[test] + test_command: pytest + - package_name: asdf-transform-schemas + repository: asdf-format/asdf-transform-schemas + ref: master + install_command: pip install -e .[test] + test_command: pytest + - package_name: asdf-unit-schemas + repository: asdf-format/asdf-unit-schemas + ref: main + install_command: pip install -e .[test] + test_command: pytest steps: - name: Checkout asdf uses: actions/checkout@v2 with: fetch-depth: 0 + submodules: true path: asdf - - name: Checkout asdf-standard + - name: Checkout ${{ matrix.package_name }} uses: actions/checkout@v2 with: fetch-depth: 0 - repository: asdf-format/asdf-standard - ref: master - path: asdf-standard + repository: ${{ matrix.repository }} + ref: ${{ matrix.ref }} + path: target - name: Set up Python 3.9 uses: actions/setup-python@v2 with: python-version: 3.9 - name: Install asdf run: cd asdf && pip install . - - name: Install asdf-standard - run: cd asdf-standard && pip install -e .[test] + - name: Install remaining ${{ matrix.package_name }} dependencies + run: cd target && ${{ matrix.install_command }} - name: Pip Freeze run: pip freeze - - name: Run asdf-standard tests - run: cd asdf-standard && pytest + - name: Run ${{ matrix.package_name}} tests + run: cd target && ${{ matrix.test_command }} From 139ef00ad86f4a51c52f338bfb789a8b2d0c6f49 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 13 Oct 2022 14:05:08 -0400 Subject: [PATCH 4/5] Fix typos --- .github/workflows/ci.yml | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b22b984ee..5846a9e7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,9 +107,10 @@ jobs: - linux: packaged asdf-schemas: - name: ${{ matrix.name }} + name: ${{ matrix.package_name }}@${{ matrix.ref }} unit tests runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - package_name: asdf-standard diff --git a/pyproject.toml b/pyproject.toml index 4d65489bd..00587b436 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ dependencies = [ 'asdf-standard >=1.0.1', 'asdf-transform-schemas >=0.2.2', - 'asdf-unit-schmas >= 0.1.0', + 'asdf-unit-schemas >= 0.1.0', 'importlib_resources >=3; python_version <"3.9"', 'importlib-metadata >=3; python_version <"3.10"', 'jmespath >=0.6.2', From 52201fb408065b44e25351c8aa6f0de44cd86731 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 13 Oct 2022 14:16:38 -0400 Subject: [PATCH 5/5] Update changes --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index d86740d63..0fa879919 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ - Unpin ``jsonschema`` version and fix ``jsonschema`` deprecation warnings. [#1185] - Replace ``pkg_resources`` with ``importlib.metadata``. [#1199] - Fix default validation for jsonschema 4.10+ [#1203] +- Add ``asdf-unit-schemas`` as a dependency, for backwards compatibility. [#1210] 2.13.0 (2022-08-19) -------------------