Skip to content

Commit

Permalink
Merge branch 'DigitalSlideArchive:master' into sync-number-of-nuclei-…
Browse files Browse the repository at this point in the history
…and-features
  • Loading branch information
subinkitware authored Sep 1, 2023
2 parents 6c5c59d + c03c852 commit 93da155
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 68 deletions.
37 changes: 0 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,28 +303,6 @@ jobs:
cd ..
python3 -m pip install histomicstk --pre --find-links project/wheels --find-links https://girder.github.io/large_image_wheels
python3 -c "import histomicstk"
release:
working_directory: ~/project
docker:
- image: cimg/python:3.9
- image: docker:git
steps:
- checkout
- setup_remote_docker
- run:
name: Setup virtual environment
command: |
if [ ! -d env ]; then python -m virtualenv env || python -m venv env; fi
echo ". $CIRCLE_WORKING_DIRECTORY/env/bin/activate" >> $BASH_ENV
- run:
name: Install python packages
command: pip install setuptools_scm twine
- run:
name: Build wheels
command: ./build_wheels.sh
- run:
name: Release to PyPi
command: twine upload --verbose wheels/* dist/*
docs-deploy:
working_directory: ~/project
docker:
Expand Down Expand Up @@ -411,21 +389,6 @@ workflows:
branches:
ignore:
- gh-pages
- release:
requires:
- py37
- py38
- py39
- py310
- py311
- lint_and_docs
- wheels
- docker
filters:
tags:
only: /^v.*/
branches:
only: master
- docs-deploy:
requires:
- py37
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,18 @@ jobs:
name: docs
path: ./docs/_build
build_wheels:
name: Build wheels on ${{ matrix.buildplat[0] }} / ${{ matrix.buildplat[1] }} for ${{ matrix.python }}
name: Wheels for ${{ matrix.python }} / ${{ matrix.buildplat[0] }} / ${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
# Don't build external PRs.
if: github.repository == 'DigitalSlideArchive/HistomicsTK'
strategy:
matrix:
# See matplotlib for some of the rationale of this
buildplat:
- [ubuntu-latest, manylinux_x86_64]
- [ubuntu-latest, musllinux_x86_64]
- [macos-latest, macosx_*]
- [windows-latest, win_amd64]
- [ubuntu-latest, x86_64]
- [macos-latest, "x86_64 arm64"]
- [windows-latest, auto64]
python: ["cp37", "cp38", "cp39", "cp310", "cp311"]
exclude:
- buildplat:
- [windows-latest, win32]
fail-fast: false

steps:
Expand All @@ -87,11 +84,14 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_BUILD: ${{ matrix.python }}-*
CIBW_TEST_SKIP: "*-macosx_arm64"
CIBW_ARCHS: ${{ matrix.buildplat[1] }}
MACOSX_DEPLOYMENT_TARGET: "10.12"

- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
# name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
path: ./wheelhouse/*.whl
make_sdist:
name: Make SDist
Expand All @@ -104,7 +104,7 @@ jobs:
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
name: sdist
# name: sdist
path: dist/*.tar.gz

# Still on Circle-CI
Expand All @@ -128,6 +128,8 @@ jobs:
steps:
- uses: actions/download-artifact@v3
with:
# name: artifact
name: artifact
path: dist
- name: List dist directory
run: ls dist
- uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ cython_debug/
.idea/

.vscode
*.sw[po]

# temporary downloaded data when doing unit testing locally
tests/externaldata/
20 changes: 1 addition & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import importlib
import os
import sys

from setuptools import find_packages
Expand All @@ -19,26 +18,9 @@
readme = readme_file.read()


def prerelease_local_scheme(version):
"""
Return local scheme version unless building on master in CircleCI.
This function returns the local scheme version number
(e.g. 0.0.0.dev<N>+g<HASH>) unless building on CircleCI for a
pre-release in which case it ignores the hash and produces a
PEP440 compliant pre-release version number (e.g. 0.0.0.dev<N>).
"""
from setuptools_scm.version import get_local_node_and_date

if os.getenv('CIRCLE_BRANCH') in {'master'} or os.getenv('CI_BRANCH') in {'master'}:
return ''
else:
return get_local_node_and_date(version)


setup(
name='histomicstk',
use_scm_version={'local_scheme': prerelease_local_scheme,
use_scm_version={'local_scheme': 'no-local-version',
'fallback_version': '0.0.0'},
description='A Python toolkit for Histopathology Image Analysis',
long_description=readme,
Expand Down

0 comments on commit 93da155

Please sign in to comment.