Skip to content

Commit

Permalink
Merge pull request #84 from Erotemic/dev/2.3.2
Browse files Browse the repository at this point in the history
Dev/2.3.2
  • Loading branch information
Erotemic authored Feb 1, 2024
2 parents 769c260 + 229bdc9 commit 220ed1a
Show file tree
Hide file tree
Showing 29 changed files with 1,129 additions and 397 deletions.
107 changes: 69 additions & 38 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Based on ~/code/xcookie/xcookie/rc/tests.yml.in
# Now based on ~/code/xcookie/xcookie/builders/github_actions.py
# See: https://github.com/Erotemic/xcookie

name: PurePyCI

Expand All @@ -12,14 +13,19 @@ on:

jobs:
lint_job:
##
# Run quick linting and typing checks.
# To disable all linting add "linter=false" to the xcookie config.
# To disable type checks add "notypes" to the xcookie tags.
##
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.10 for linting
uses: actions/setup-python@v4.5.0
uses: actions/checkout@v4
- name: Set up Python 3.11 for linting
uses: actions/setup-python@v4.7.1
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |-
python -m pip install --upgrade pip
Expand All @@ -29,34 +35,39 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 ./ibeis --count --select=E9,F63,F7,F82 --show-source --statistics
build_purepy_wheels:
##
# Download and test the pure-python wheels that were build in the
# build_purepy_wheels and test them in this independent environment.
##
name: ${{ matrix.python-version }} on ${{ matrix.os }}, arch=${{ matrix.arch }} with ${{ matrix.install-extras }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- '3.10'
- '3.11'
arch:
- auto
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux' && matrix.arch != 'auto'
with:
platforms: all
- name: Setup Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
- name: Build pure wheel
shell: bash
run: |-
python -m pip install pip -U
python -m pip install setuptools>=0.8 build
python -m pip install setuptools>=0.8 wheel build twine
python -m build --wheel --outdir wheelhouse
python -m twine check ./wheelhouse/ibeis*.whl
- name: Show built files
shell: bash
run: ls -la wheelhouse
Expand All @@ -71,42 +82,65 @@ jobs:
needs:
- build_purepy_wheels
strategy:
fail-fast: false
matrix:
# Xcookie generates an explicit list of environments that will be used
# for testing instead of using the more concise matrix notation.
include:
- python-version: '3.7'
install-extras: tests-strict,runtime-strict,headless-strict
os: ubuntu-latest
arch: auto
- python-version: '3.8'
install-extras: tests-strict,runtime-strict,headless-strict
os: ubuntu-latest
arch: auto
- python-version: '3.9'
install-extras: tests-strict,runtime-strict,headless-strict
os: ubuntu-latest
arch: auto
- python-version: '3.10'
install-extras: tests-strict,runtime-strict,headless-strict
os: ubuntu-latest
arch: auto
- python-version: '3.11'
install-extras: tests-strict,runtime-strict,headless-strict
os: ubuntu-latest
install-extras: tests-strict,runtime-strict,optional-strict,headless-strict
arch: auto
- python-version: '3.7'
install-extras: tests-strict,runtime-strict,optional-strict,headless-strict
os: ubuntu-latest
arch: auto
- python-version: '3.7'
install-extras: tests,optional,headless
os: ubuntu-latest
arch: auto
- python-version: '3.8'
os: ubuntu-latest
install-extras: tests,optional,headless
os: ubuntu-latest
arch: auto
- python-version: '3.9'
os: ubuntu-latest
install-extras: tests,optional,headless
os: ubuntu-latest
arch: auto
- python-version: '3.10'
install-extras: tests,optional,headless
os: ubuntu-latest
arch: auto
- python-version: '3.11'
install-extras: tests,optional,headless
os: ubuntu-latest
arch: auto
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux' && matrix.arch != 'auto'
with:
platforms: all
- name: Setup Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v3
Expand All @@ -120,39 +154,36 @@ jobs:
INSTALL_EXTRAS: ${{ matrix.install-extras }}
run: |-
echo "Finding the path to the wheel"
ls -al wheelhouse
ls wheelhouse || echo "wheelhouse does not exist"
echo "Installing helpers"
pip install setuptools>=0.8 setuptools_scm wheel build -U
pip install tomli pkginfo
pip install pip setuptools>=0.8 build -U
pip install delorean
export MOD_NAME=ibeis
echo "MOD_NAME=$MOD_NAME"
export WHEEL_FPATH=$(python -c "import pathlib; print(str(sorted(pathlib.Path('wheelhouse').glob('$MOD_NAME*.whl'))[-1]).replace(chr(92), chr(47)))")
echo "WHEEL_FPATH=$WHEEL_FPATH"
export WHEEL_FPATH=$(python -c "import pathlib; print(str(sorted(pathlib.Path('wheelhouse').glob('ibeis*.whl'))[-1]).replace(chr(92), chr(47)))")
export MOD_VERSION=$(python -c "from pkginfo import Wheel; print(Wheel('$WHEEL_FPATH').version)")
echo "MOD_VERSION=$MOD_VERSION"
echo "Install the wheel (ensureing we are using the version we just built)"
# NOTE: THE VERSION MUST BE NEWER THAN AN EXISTING PYPI VERSION OR THIS MAY FAIL
pip install --prefer-binary "$MOD_NAME[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse
pip install --prefer-binary "ibeis[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse
echo "Install finished."
- name: Test wheel ${{ matrix.install-extras }}
shell: bash
env:
CI_PYTHON_VERSION: py${{ matrix.python-version }}
run: |-
echo "Creating test standing"
WORKSPACE_DNAME="testdir_${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
echo "Creating test sandbox directory"
export WORKSPACE_DNAME="testdir_${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
echo "WORKSPACE_DNAME=$WORKSPACE_DNAME"
mkdir -p $WORKSPACE_DNAME
echo "cd-ing into the workspace"
cd $WORKSPACE_DNAME
pwd
ls -al
pip freeze
ls -altr
# Get the path to the installed package and run the tests
MOD_DPATH=$(python -c "import ibeis, os; print(os.path.dirname(ibeis.__file__))")
echo "MOD_DPATH = $MOD_DPATH"
echo "running the pytest command inside the workspace"
export MOD_DPATH=$(python -c "import ibeis, os; print(os.path.dirname(ibeis.__file__))")
echo "
---
MOD_DPATH = $MOD_DPATH
---
running the pytest command inside the workspace
---
"
mkdir -p "ci_ibeis_workdir"
echo "About to reset workdirs"
python -m ibeis --set-workdir="$(readlink -f ci_ibeis_workdir)" --nogui
Expand All @@ -168,7 +199,7 @@ jobs:
- test_purepy_wheels
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
name: Download wheels and sdist
with:
Expand All @@ -180,7 +211,7 @@ jobs:
- name: Sign and Publish
env:
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_USERNAME: ${{ secrets.TEST_TWINE_USERNAME }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_TWINE_PASSWORD }}
CI_SECRET: ${{ secrets.CI_SECRET }}
run: |-
Expand Down Expand Up @@ -211,7 +242,7 @@ jobs:
- test_purepy_wheels
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
name: Download wheels and sdist
with:
Expand All @@ -223,7 +254,7 @@ jobs:
- name: Sign and Publish
env:
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
CI_SECRET: ${{ secrets.CI_SECRET }}
run: |-
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@

# Required
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.11"
sphinx:
configuration: docs/source/conf.py
formats: all
python:
version: 3.7
install:
- requirements: requirements/headless.txt
- requirements: requirements/docs.txt
Expand Down
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ We are currently working on porting this changelog to the specifications in
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Version 2.3.1] - Released 2023-01-29

### [Version 2.3.2] - Released 2024-02-01

### Fixed:
* Removed codecov from test requirements
* Fixed pandas 2.0 issue.
* Fixed ubelt.Cacher issue.
* Minor compatibility tweaks.
* Replaced `utool.grab_test_imgpath` with `kwimage.grab_test_image_fpath` in tests.


## [Version 2.3.1] - Released 2023-02-06

### Changed
* Ported some utool code to ibeis.util for more direct coupling with this
Expand All @@ -17,7 +28,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
* Fixed 3.11 change with random.Random

### Changed
* Added 3.11 support
* We have real passing CI now! WOO!
* Unofficial 3.11 support (should work, but was having issues on CI)
* Added loose / strict dependency versioning


Expand Down
Loading

0 comments on commit 220ed1a

Please sign in to comment.