Skip to content

Commit

Permalink
Include SDK, move to src layout (#21)
Browse files Browse the repository at this point in the history
* include sdk and move to src

* don't download sdk on CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add sdk files

* update pre-commit

* update build

* skip full read on cibuildwheel

* add linux

* remove download script

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tlambert03 and pre-commit-ci[bot] committed Nov 10, 2021
1 parent 174a2b7 commit 5e51447
Show file tree
Hide file tree
Showing 55 changed files with 1,930 additions and 775 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Download Samples
run: |
python scripts/download_samples.py
python scripts/download_sdk.py
env:
DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
python -m pip install --upgrade pip
pip install dropbox
python scripts/download_samples.py
python scripts/download_sdk.py
env:
DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}

Expand Down
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
.eggs/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -104,13 +104,15 @@ ENV/
# IDE settings
.vscode/

nd2/_nd2file.c
nd2/_nd2file_legacy.c
nd2/_version.py
sdk
sdk_legacy/*
tests/data
wheelhouse
nd2/_sdk/picture.c
nd2/_sdk/v9.c
nd2/_sdk/latest.c
src/nd2/_nd2file.c
src/nd2/_nd2file_legacy.c
src/nd2/_version.py
src/nd2/_sdk/picture.c
src/nd2/_sdk/v9.c
src/nd2/_sdk/latest.c

# allow these
!src/sdk/**/*.so
!src/sdk/**/*.a
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: src/sdk
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand All @@ -6,7 +7,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.18.0
rev: v1.19.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/PyCQA/flake8
Expand All @@ -20,11 +21,11 @@ repos:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
rev: 5.10.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 21.10b0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
Expand Down
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ND2 SDK shared libraries are included in the built (wheel) distributions by
permission of Laboratory Imaging, Inc.
ND2 SDK libraries are distributed by permission of Mirek Svoboda,
Laboratory Imaging, Inc. (see LICENSE file in sdk folder)
https://www.lim.cz/
https://www.nd2sdk.com


BSD License
The remainder of the code is distributed under the following BSD License

Copyright (c) 2021, Talley Lambert
All rights reserved.
Expand Down
10 changes: 4 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
include nd2/py.typed
recursive-include nd2 *.pyi
include src/nd2/py.typed
recursive-include src/nd2 *.pyi

graft sdk/latest/*/lib
graft sdk/v9/*/lib
graft sdk/latest/*/include
graft sdk/v9/*/include
graft src/sdk/*/lib
graft src/sdk/*/include

exclude .pre-commit-config.yaml .coveragerc
recursive-exclude tests *
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ build:
clean:
rm -rf build dist wheelhouse
rm -rf htmlcov .coverage .hypothesis
rm -f nd2/*.so
rm -f nd2/_*.c
rm -f nd2/_sdk/*.so
rm -f nd2/_sdk/*.c
rm -f src/nd2/*.so
rm -f src/nd2/_*.c
rm -f src/nd2/_sdk/*.so
rm -f src/nd2/_sdk/*.c
rm -f src/nd2/_sdk/*.cpp

clobber:
make clean
rm -rf sdk .mypy_cache
rm -rf .mypy_cache

rebuild:
make clean
Expand Down
33 changes: 0 additions & 33 deletions nd2/_sdk/picture.pxd

This file was deleted.

46 changes: 0 additions & 46 deletions nd2/_sdk/picture.pyx

This file was deleted.

Loading

0 comments on commit 5e51447

Please sign in to comment.