From 2819ed4f50e87c4342dfb9610e2daa91b5808e42 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 09:06:04 +0100 Subject: [PATCH 01/12] add tox.ini --- tox.ini | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..8241b691 --- /dev/null +++ b/tox.ini @@ -0,0 +1,29 @@ +# For more information about tox, see https://tox.readthedocs.io/en/latest/ +[tox] +envlist = py{37,38,39}-{linux,macos,windows} + +[gh-actions] +python = + 3.7: py37 + 3.8: py38 + 3.9: py39 + +[gh-actions:env] +PLATFORM = + ubuntu-latest: linux + macos-latest: macos + windows-latest: windows + +[testenv] +platform = + macos: darwin + linux: linux + windows: win32 +passenv = + CI + GITHUB_ACTIONS + NUMPY_EXPERIMENTAL_ARRAY_FUNCTION +deps = + pytest # https://docs.pytest.org/en/latest/contents.html + pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ +commands = pytest -v --color=yes --cov=napari_arboretum --cov-report=xml From 7db37bfe9e94254ae862204805a4be20f2ee3140 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 09:06:21 +0100 Subject: [PATCH 02/12] update test workflow --- .github/workflows/build.yml | 49 +++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0ee73c0..1e43dd08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,22 +4,35 @@ on: jobs: build: - runs-on: ubuntu-latest + name: ${{ matrix.platform }} py${{ matrix.python-version }} + runs-on: ${{ matrix.platform }} + strategy: + matrix: + platform: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.7, 3.8, 3.9] + steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} - - name: - Install dependencies - run: | - python -m pip install --upgrade pip - - name: Test with pytest - run: | - pip install --upgrade --upgrade-strategy eager -r requirements.txt -e . - pip install pytest - pytest + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + # note: if you need dependencies from conda, considering using + # setup-miniconda: https://github.com/conda-incubator/setup-miniconda + # and + # tox-conda: https://github.com/tox-dev/tox-conda + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools tox tox-gh-actions + + # this runs the platform-specific tests declared in tox.ini + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} + + - name: Coverage + uses: codecov/codecov-action@v2 From 8a8864892dc8c469795f54a620a890be59ebe8bd Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 09:08:40 +0100 Subject: [PATCH 03/12] update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8241b691..dc6bf632 100644 --- a/tox.ini +++ b/tox.ini @@ -26,4 +26,4 @@ passenv = deps = pytest # https://docs.pytest.org/en/latest/contents.html pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ -commands = pytest -v --color=yes --cov=napari_arboretum --cov-report=xml +commands = pytest -v --color=yes --cov=btrack --cov-report=xml From 9adcb96786d7c0f9d9cfd26cf0c176da6d2330fb Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:30:52 +0100 Subject: [PATCH 04/12] update manifest --- .gitignore | 1 + MANIFEST.in | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 25880b97..e97d7909 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ bworker.py *.o *.pyc .vscode +.tox diff --git a/MANIFEST.in b/MANIFEST.in index e69de29b..a85f283a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include requirements*.txt +include btrack/VERSION.txt +include btrack/libs/libtracker* From 93d067a6b0666553cf9cc3bba2281f413cdba4d3 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:31:42 +0100 Subject: [PATCH 05/12] update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e97d7909..dac809ce 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ bworker.py *.pyc .vscode .tox +.coverage +coverage.xml From e5c4abf1a0c0937aaba18cf44867608a624e4217 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:32:19 +0100 Subject: [PATCH 06/12] update setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c9fbdc9e..edd81030 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def get_version(): author_email="a.lowe@ucl.ac.uk", url="https://github.com/quantumjot/BayesianTracker", packages=find_packages(), - package_data={"btrack": ["libs/libtracker*", "VERSION.txt"]}, + # package_data={"btrack": ["libs/libtracker*", "VERSION.txt"]}, install_requires=get_install_required(), extras_require={"docs": get_install_required("docs")}, python_requires=">=3.6", From ccf325911aa38bfe444ca214120119517e57d298 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:36:10 +0100 Subject: [PATCH 07/12] update setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index edd81030..c9fbdc9e 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def get_version(): author_email="a.lowe@ucl.ac.uk", url="https://github.com/quantumjot/BayesianTracker", packages=find_packages(), - # package_data={"btrack": ["libs/libtracker*", "VERSION.txt"]}, + package_data={"btrack": ["libs/libtracker*", "VERSION.txt"]}, install_requires=get_install_required(), extras_require={"docs": get_install_required("docs")}, python_requires=">=3.6", From 3cd42f54355dc1843a3f21c608b1e77e793d9d8f Mon Sep 17 00:00:00 2001 From: Alan R Lowe Date: Wed, 6 Apr 2022 10:51:55 +0100 Subject: [PATCH 08/12] Update .github/workflows/build.yml Co-authored-by: Patrick Roddy --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e43dd08..25eeecca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,4 +35,4 @@ jobs: PLATFORM: ${{ matrix.platform }} - name: Coverage - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 From 3a12282dfcdd953e076a50f19ef3dcf58e6d5f64 Mon Sep 17 00:00:00 2001 From: Alan R Lowe Date: Wed, 6 Apr 2022 10:52:07 +0100 Subject: [PATCH 09/12] Update .github/workflows/build.yml Co-authored-by: Patrick Roddy --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25eeecca..b3e6ee16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} From d80f2815b488bbf41729667fff9eeba2f776ce58 Mon Sep 17 00:00:00 2001 From: Alan R Lowe Date: Wed, 6 Apr 2022 10:52:11 +0100 Subject: [PATCH 10/12] Update .github/workflows/build.yml Co-authored-by: Patrick Roddy --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3e6ee16..173c8bab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: python-version: [3.7, 3.8, 3.9] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 From 62acbb7e778f9cc7b639f6c742aaff2ffc81a253 Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:57:48 +0100 Subject: [PATCH 11/12] revert codecov to v2 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 173c8bab..2114ab25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,4 +35,4 @@ jobs: PLATFORM: ${{ matrix.platform }} - name: Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v2 From 72327c3b6d6d388ef83ead7502016727ea9a9a8d Mon Sep 17 00:00:00 2001 From: quantumjot Date: Wed, 6 Apr 2022 10:57:59 +0100 Subject: [PATCH 12/12] change win32 to windows --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index dc6bf632..4be984f4 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ PLATFORM = platform = macos: darwin linux: linux - windows: win32 + windows: windows passenv = CI GITHUB_ACTIONS