Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul with Pydantic and format version generic 0.3 / model 0.5 #521

Merged
merged 440 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
440 commits
Select commit Hold shift + click to select a range
0c6b434
Merge branch 'main' into pydantic_axes
FynnBe Oct 17, 2023
2b03c5c
refactor NonEmpty -> NotEmpty
FynnBe Oct 17, 2023
f9b3eeb
lint for py3.8
FynnBe Oct 17, 2023
e2b6a8a
update README.md
FynnBe Oct 17, 2023
ac8c64e
remove Weights.get method
FynnBe Oct 23, 2023
5482196
update howto run black
FynnBe Oct 23, 2023
45ab45d
fix test_tensor and sample_tensor get packaged
FynnBe Oct 26, 2023
4bbf828
fix weights_priority_order in get_resource_package_content
FynnBe Oct 26, 2023
03944f7
remove unused model parent with source
FynnBe Oct 26, 2023
68294cc
limit dependencies to pytorch_state_dict_weights in v0_5
FynnBe Oct 26, 2023
75807cf
add root property to ResourceDescriptionBase
FynnBe Oct 26, 2023
d401a2c
remove unused imports
FynnBe Oct 26, 2023
3a8e91c
remove unused weights attachments
FynnBe Oct 26, 2023
57f5158
improve weights_entry.authors doc string
FynnBe Oct 26, 2023
4792992
fix suffix validation for zenodo urls
FynnBe Oct 26, 2023
b82ecac
fix ChannelAxis defaults
FynnBe Oct 26, 2023
8a441de
turn original_version into Version
FynnBe Oct 26, 2023
2d5768e
fix generic channel_names in ChannelAxis
FynnBe Oct 26, 2023
37a558a
add dependencies field to tensorflow_saved_model_bundle weights
FynnBe Oct 27, 2023
47d23c9
add a todo comment
FynnBe Oct 27, 2023
4117087
ignore model parent specified as url
FynnBe Oct 27, 2023
2cfdb8c
test_output_ref_shape_too_small
FynnBe Oct 27, 2023
8f72763
Merge branch 'main' into pydantic_axes
FynnBe Oct 31, 2023
2e1584b
allow absolute file paths
FynnBe Nov 2, 2023
e12fba6
unfreeze nodes
FynnBe Nov 3, 2023
71dc65e
WIP unfreeze aftermath and update pydantic
FynnBe Nov 7, 2023
892abcf
add io functionality
FynnBe Nov 8, 2023
5fc7a8a
WIP improve io
FynnBe Nov 9, 2023
1ebfb26
update docs
FynnBe Nov 9, 2023
5b4dbfc
add CONTRIBUTING.md
FynnBe Nov 9, 2023
260cac2
remove WithGenericFormatVersion mixin
FynnBe Nov 9, 2023
7b86d31
update tests, clean up
FynnBe Nov 10, 2023
dd80f87
WIP sha256 validation in spec
FynnBe Nov 13, 2023
05f5f08
WIP handle io checks
FynnBe Nov 14, 2023
318a0e6
remove update_format
FynnBe Nov 14, 2023
d702c69
update model 0.5 architecture and dependencies fields
FynnBe Nov 14, 2023
9819f03
continue test fixes and respect perform_io_checks flag
FynnBe Nov 14, 2023
047419a
fix tests
FynnBe Nov 14, 2023
bb50768
clean up tests
FynnBe Nov 14, 2023
698aa59
use extra annotated HttpUrl
FynnBe Nov 15, 2023
c4d1f79
WIP add validation of numpy arrays
FynnBe Nov 17, 2023
8efaf8a
update io functions
FynnBe Nov 17, 2023
d37eaa9
remove step_with
FynnBe Nov 17, 2023
dc0a5a3
add Descr all over
FynnBe Nov 17, 2023
4204eff
WIP validate sample tensor
FynnBe Nov 20, 2023
2f8f911
fix caching with file extension
FynnBe Nov 20, 2023
f57765a
update deps
FynnBe Nov 20, 2023
cc4f10b
configure pytest testpaths
FynnBe Nov 20, 2023
db0f04a
add FileDescr
FynnBe Nov 20, 2023
f0ea470
WIP add_default_cover
FynnBe Nov 20, 2023
dc80b12
add common submodule
FynnBe Nov 21, 2023
0c8db38
generate default model cover images
FynnBe Nov 21, 2023
b7f6455
fix cover image generation
FynnBe Nov 21, 2023
7758645
add timestamp default and cleanup
FynnBe Nov 21, 2023
17270f4
add model demo notebook
FynnBe Nov 21, 2023
65c4165
update test_v0_5
FynnBe Nov 23, 2023
84cdc2e
add numpy load/save
FynnBe Nov 27, 2023
6e2ed71
replace KwargsNode with TypedDict
FynnBe Nov 28, 2023
1f8ad84
add get_input_test_arrays/get_outut_test_arrays
FynnBe Nov 28, 2023
c6cd1c5
Revert "replace KwargsNode with TypedDict"
FynnBe Nov 28, 2023
4157dea
absorb mode field into axes
FynnBe Dec 7, 2023
0c0b09b
clean up axis id
FynnBe Dec 7, 2023
c676f3c
add mode to axes converters
FynnBe Dec 7, 2023
42b7efc
fix axes doc string
FynnBe Dec 7, 2023
3a2167c
WIP merge TensorAxisId and SizeReference
FynnBe Jan 10, 2024
f33a54d
rename example_rdf -> example_descriptions
FynnBe Jan 10, 2024
d60742a
update zenodo links
FynnBe Jan 10, 2024
c344870
fix descr class resolution
FynnBe Jan 11, 2024
20ff009
fix _interprete_file_source ignores root
FynnBe Jan 11, 2024
a6d2249
warn on http codes 301 and 308
FynnBe Jan 11, 2024
a9a626f
improve and fix tests
FynnBe Jan 11, 2024
9c0fb39
save val context for all nodes to validate assignments
FynnBe Jan 11, 2024
1263e10
remove collection_base_content
FynnBe Jan 11, 2024
9a935ed
less original_format context use
FynnBe Jan 11, 2024
e5d3799
add github username verification
FynnBe Jan 11, 2024
f04001c
remove original_format context
FynnBe Jan 11, 2024
e75a964
cleanup
FynnBe Jan 11, 2024
553a50f
more cleanup
FynnBe Jan 12, 2024
5ea9f7e
fix and document SizeReference
FynnBe Jan 12, 2024
5d0be69
use pydantic-settings for env vars
FynnBe Jan 12, 2024
986e4be
only warn on rate limit for gh api
FynnBe Jan 12, 2024
a5816f2
fix downloads with root pathh
FynnBe Jan 12, 2024
efdf513
fix sample tensors in unet2d example
FynnBe Jan 12, 2024
27b76a1
fix model tests
FynnBe Jan 12, 2024
deb39ee
fix unet2d example
FynnBe Jan 12, 2024
bf94abe
fix v0_5 converter
FynnBe Jan 12, 2024
683d06f
fix more unet2d examples
FynnBe Jan 12, 2024
6576a8c
improve tensor validation
FynnBe Jan 12, 2024
14ce707
fix conversion of scale
FynnBe Jan 12, 2024
c2a7a01
fix tests
FynnBe Jan 12, 2024
fd7e977
simplify val context and WIP from_other_desrc
FynnBe Jan 13, 2024
333bd40
WIP improve validation context
FynnBe Jan 13, 2024
78b3399
cleanup
FynnBe Jan 24, 2024
a840831
fix static type checks
FynnBe Jan 24, 2024
0b3c3a7
fix error on import
FynnBe Jan 24, 2024
7da6df4
WIP fix tests
FynnBe Jan 25, 2024
7b0734b
WIP better val context, better file sources
FynnBe Jan 25, 2024
fe88ff2
cleanup
FynnBe Jan 26, 2024
1b8d763
WIP saver typing
FynnBe Jan 29, 2024
b729479
add assert_all_params_set_explicitly
FynnBe Jan 29, 2024
ece2d32
use assert_all_params_set_explicitly
FynnBe Jan 29, 2024
9db2c27
fix badges field in model collection entries
FynnBe Jan 29, 2024
2bc26c7
impl convert_from other node
FynnBe Jan 29, 2024
33361d8
WIP NodeWithConverters
FynnBe Feb 5, 2024
45f24d0
use TypeAliasType for YamlValue
FynnBe Feb 5, 2024
50f62ff
converter deadend
FynnBe Feb 5, 2024
ca2c2ca
use converter only as_dict
FynnBe Feb 7, 2024
0dc5e61
improve validation summary
FynnBe Feb 7, 2024
174c853
continue work on converters
FynnBe Feb 7, 2024
3063d4e
fix type annotations
FynnBe Feb 7, 2024
14aa86c
fix forward compatibility and tests
FynnBe Feb 9, 2024
7bd2c21
change bioimageio.yaml back to rdf.yaml
FynnBe Feb 9, 2024
4ba3f55
improve discovery of alternatively named rdf.yaml files
FynnBe Feb 9, 2024
44ce924
generic 0.2.4 and model 0.4.10 for version_nr
FynnBe Feb 9, 2024
479f4df
remove broken setting set_undefined_field_descriptions_from_var_docst…
FynnBe Feb 9, 2024
ae52fd9
fix fill_resource_package_content
FynnBe Feb 9, 2024
ef58af8
set package relevant descriptions explicitly (pydantic 2.7 is not yet…
FynnBe Feb 9, 2024
5e6ecb9
id_emoji and fixes to packaging logic
FynnBe Feb 9, 2024
1a44972
rewrite some warnings to not trigger them with default values during …
FynnBe Feb 9, 2024
a38ccbf
improve warnings
FynnBe Feb 11, 2024
e3bb7ff
WIP package with packaging_context
FynnBe Feb 11, 2024
e3bcaad
add NonRdfFileSource to avoid file name conflicts in packages
FynnBe Feb 11, 2024
9682ad9
pyright fixes
FynnBe Feb 11, 2024
0da5d4a
package with WrapSerializer
FynnBe Feb 12, 2024
6360b12
fix model converter
FynnBe Feb 13, 2024
2ffe16f
improve resource packaging
FynnBe Feb 13, 2024
9fc41e9
finish fix model converter
FynnBe Feb 13, 2024
9582777
fix tests
FynnBe Feb 13, 2024
60916b6
enforce channel names for ChannelAxis
FynnBe Feb 14, 2024
5336102
test that all types needed for resource creation are present
FynnBe Feb 14, 2024
1ff4d10
add uploader field
FynnBe Feb 14, 2024
315ae8a
change HttpUrl to be annotated str
FynnBe Feb 16, 2024
a2a1bc5
Field(discriminator=...) -> Discrimiator(...)
FynnBe Feb 16, 2024
94bf4a5
format_version field_validator -> model_validator
FynnBe Feb 16, 2024
c6d77d6
change order of license examples
FynnBe Feb 16, 2024
64f393f
test with generated json schema
FynnBe Feb 16, 2024
f41fa25
add vscode settings for rdf linting settings
FynnBe Feb 16, 2024
189eb8b
fix all non-collection tests
FynnBe Feb 16, 2024
f5a82b6
ignore .env files
FynnBe Feb 16, 2024
6013255
fix some collection tests
FynnBe Feb 16, 2024
98b64e7
fix merge conflicts
FynnBe Feb 16, 2024
e911cfa
remove unused dep pytest-pyodide
FynnBe Feb 16, 2024
07a1e6c
add ruff dev dep
FynnBe Feb 16, 2024
6b81d62
fix zenodo url resolve bug
FynnBe Feb 16, 2024
eb03fce
black with preview true
FynnBe Feb 16, 2024
c86e6c4
remove secrets_dir setting config to avoid warning
FynnBe Feb 16, 2024
253bdf6
only pass edited py files to ruff, black, pyright
FynnBe Feb 16, 2024
89602d8
fix ruff check in gh ci
FynnBe Feb 16, 2024
8289014
ruff before black
FynnBe Feb 16, 2024
d32218b
line length 88
FynnBe Feb 16, 2024
d9bef68
black again
FynnBe Feb 16, 2024
9f8be9b
fix ruff errors
FynnBe Feb 16, 2024
4c08f28
fix ruff errors
FynnBe Feb 16, 2024
edc36e6
remove unexpected fields
FynnBe Feb 16, 2024
00e5fbd
don't ruff check notebooks for now
FynnBe Feb 19, 2024
bde2faa
check with pyright only for py 3.8
FynnBe Feb 19, 2024
36a35a6
ignore unknown environment variables
FynnBe Feb 19, 2024
81f6981
try fixing pyright in ci
FynnBe Feb 19, 2024
5ffd604
use ruyaml instead of ruamel.yaml
FynnBe Feb 19, 2024
c27df49
add jupyter to dev deps
FynnBe Feb 19, 2024
ed30524
udpate SHA256 for previously reformatted files
FynnBe Feb 19, 2024
57c9631
add test_packaging
FynnBe Feb 19, 2024
adb33e0
fix some pyright errors that only show up in ci
FynnBe Feb 19, 2024
cfacdc2
avoid overwriting unzipped package
FynnBe Feb 19, 2024
dffa35f
InvalidaDescription -> InvalidDescr
FynnBe Feb 20, 2024
9773129
improve ValidationSummary
FynnBe Feb 20, 2024
e5ed3bd
warn about validation section in model documentation
FynnBe Feb 20, 2024
6679e92
load_array from FileSource
FynnBe Feb 20, 2024
5fcb701
repackage without other weights entries
FynnBe Feb 20, 2024
8d02f54
add env field to ValidationSummary
FynnBe Feb 20, 2024
faa6aa7
fix packaging StringNode
FynnBe Feb 20, 2024
d91dee7
fix loading model 0.3 rdfs
FynnBe Feb 20, 2024
58e18ae
ResourceDescription-> ResourceDescr
FynnBe Feb 20, 2024
0b707b8
rename validate_rdf to avoid confusion
FynnBe Feb 21, 2024
1910566
add annotations for dumping/saving InvalidDescr
FynnBe Feb 21, 2024
5a3af9a
add tests and fix file name in packaging
FynnBe Feb 23, 2024
e17b0a8
fix root context in get_resource_package_content
FynnBe Feb 23, 2024
7d1712e
Improve resource id fields
FynnBe Feb 23, 2024
539a09d
add `parent` field also for non-model descrs
FynnBe Feb 23, 2024
d8116a5
fix tests
FynnBe Feb 26, 2024
978d794
allow calling download with FileDescr
FynnBe Feb 26, 2024
c4ac217
fix tests
FynnBe Feb 26, 2024
0f9f157
transfer test_load_non_existing_rdf from core
FynnBe Feb 26, 2024
5d6e3f8
parametrized -> parameterized
FynnBe Feb 27, 2024
aa85c23
prettify formatted validation summary
FynnBe Feb 28, 2024
f4da289
ignore missing type annotations in unet2d_expand_output_shape.py
FynnBe Feb 28, 2024
daed30a
improve validate_url_ok
FynnBe Feb 28, 2024
43fb2a5
fix conversion of boolean output tensors
FynnBe Feb 28, 2024
5a95b11
fix tests
FynnBe Feb 28, 2024
a3f8048
improve docs
FynnBe Feb 28, 2024
15ffbcd
add remove_gh_prefix()
FynnBe Feb 28, 2024
3c6759c
improve validation of colab urls
FynnBe Feb 28, 2024
9d53e85
parallel pytests with pytest-xdist
FynnBe Feb 28, 2024
06b8272
validate_url_ok, let 302 pass
FynnBe Feb 28, 2024
b9714ba
add field sem_ver
FynnBe Feb 28, 2024
2c160aa
test collection also with json schema
FynnBe Feb 28, 2024
3dffcc7
add `version_nr`, remove `sem_ver`
FynnBe Feb 29, 2024
06e6b0f
nth -> n-th
FynnBe Feb 29, 2024
2cd3a6b
fix tests
FynnBe Feb 29, 2024
6ac0a36
improve ValidationSummary.format()
FynnBe Feb 29, 2024
800776c
add report_invalid_rdfs.py
FynnBe Feb 29, 2024
dadc79e
WIP start replacing Annotated types with RootModel
FynnBe Mar 1, 2024
0f078fd
WIP update load_model_and_create_your_own.ipynb
FynnBe Mar 1, 2024
e0f4d48
WIP remove cyclic imports when type checking
FynnBe Mar 3, 2024
b4a4d73
version_nr -> version_number
FynnBe Mar 4, 2024
0877fb5
unify license field
FynnBe Mar 4, 2024
0187b60
move generate_covers into model.v0_5
FynnBe Mar 4, 2024
bae1eca
WIP remove cyclic imports
FynnBe Mar 4, 2024
24f6692
remove cyclic imports
FynnBe Mar 4, 2024
f72288d
improve type consistency
FynnBe Mar 5, 2024
97465f3
skip doctest-modules due to weird errors during test collection
FynnBe Mar 5, 2024
5f65158
add more known gh users
FynnBe Mar 5, 2024
2414a10
add tests and make some validation methods private
FynnBe Mar 5, 2024
d88c0e5
WIP fix packaging serializer bug
FynnBe Mar 5, 2024
cc6af69
fix test_with_suffix
FynnBe Mar 6, 2024
5d6a796
rewrite RelativePath as RootModel
FynnBe Mar 6, 2024
bbabad4
small fixes
FynnBe Mar 6, 2024
0b105d8
start stricter type checking
FynnBe Mar 6, 2024
92ca54d
fix some tests
FynnBe Mar 6, 2024
49724f0
remove intermediate version conversion
FynnBe Mar 6, 2024
917ae3c
explicitly concatenate some strings
FynnBe Mar 6, 2024
322a46c
freeze ValidatedString child classes
FynnBe Mar 7, 2024
40f9ee3
fix some tests
FynnBe Mar 7, 2024
68d2d30
clean up validate_gh_user a bit
FynnBe Mar 7, 2024
9fd944a
fix Datetime
FynnBe Mar 7, 2024
afc7157
skip logging of warnings to console during validation_context
FynnBe Mar 7, 2024
c4253b9
add KNOWN_INVALID_GH_USERS
FynnBe Mar 7, 2024
80a65c8
add timeout
FynnBe Mar 7, 2024
992689a
fix some tests
FynnBe Mar 7, 2024
46db27f
add ModelDescr.get_tensor_sizes()
FynnBe Mar 7, 2024
09ff9de
fix user doc generation
FynnBe Mar 7, 2024
ffbcc60
fix more tests
FynnBe Mar 7, 2024
01596d0
skip io_checks in collection tests
FynnBe Mar 7, 2024
47923d4
fix tests for py3.9
FynnBe Mar 7, 2024
d7fe43f
expose RootHttpUrl
FynnBe Mar 7, 2024
3f9daf7
update conda recipe and add support for py 3.12
FynnBe Mar 8, 2024
b7fb4aa
use settings for CI and BIOIMAGEIO_USER_AGENT env vars
FynnBe Mar 8, 2024
4ba06d3
set a validation summary on init
FynnBe Mar 8, 2024
1772681
update load_model_and_create_your_own.ipynb
FynnBe Mar 8, 2024
866a9e1
fix conda recipe
FynnBe Mar 8, 2024
b80fc86
fix typing issue
FynnBe Mar 8, 2024
7d57d44
make TensorId and AxisId ValidatedStrings
FynnBe Mar 8, 2024
cba43ab
reportImplicitStringConcatenation = "error"
FynnBe Mar 8, 2024
cff5848
update report_invalid_rdfs.py
FynnBe Mar 8, 2024
2be914c
fix test_warn_long_name
FynnBe Mar 8, 2024
f0fad10
try to fix conda recipe
FynnBe Mar 8, 2024
e35c7a9
add rattler-build recipe
FynnBe Mar 8, 2024
77f48e5
build conda package with rattler-build
FynnBe Mar 8, 2024
30ed44d
try to fix mamba-build
FynnBe Mar 8, 2024
0a0c18a
do not build with rattler build for now
FynnBe Mar 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
178 changes: 91 additions & 87 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,109 @@ name: Test and Deploy bioimageio.spec

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ "**" ]
branches: ["**"]

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]

python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- python-version: "3.8"
test-format: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
- name: Test with pytest
run: pytest tests
- name: Check passthrough models
run: python scripts/generate_passthrough_modules.py check
# todo: add mypy checks for python 3.10 when we can add KW_ONLY to dataclasses
# allowing dataclass inheritance w/o the 'missing' default value
# - name: MyPy
# if: ${{ matrix.python-version == '3.10' }}
# run: |
# mkdir -p .mypy-cache
# mypy . --install-types --non-interactive --cache-dir .mypy-cache --explicit-package-bases --check-untyped-defs
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[dev]
- name: Get Date
id: get-date
run: |
echo "week=$(/bin/date -u "+%Y-%U")" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/cache@v3
with:
path: tests/cache
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.get-date.outputs.week }}-${{ hashFiles('**/lockfiles') }}
- name: Check autogenerated imports
run: python scripts/generate_version_submodule_imports.py check
- run: black .
if: matrix.test-format
- run: ruff check **/*.py # ignore notebooks for now
if: matrix.test-format
- run: pyright --version
- run: pyright -p pyproject.toml
- run: pytest

conda-build:
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: false
environment-name: build-env
channels: conda-forge
extra-specs: |
boa
- name: linux conda build
shell: bash -l {0}
run: |
conda mambabuild -c conda-forge conda-recipe
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[dev]
- name: Generate spec docs
run: python scripts/generate_spec_documentation.py --dist dist/user_docs
- name: Generate JSON schemas
run: python scripts/generate_json_schemas.py
- name: Generate developer docs
run: pdoc -o ./dist bioimageio.spec
- name: Get branch name to deploy to
id: get_branch
shell: bash
run: |
if [[ -n '${{ github.event.pull_request.head.ref }}' ]]; then branch=gh-pages-${{ github.event.pull_request.head.ref }}; else branch=gh-pages; fi
echo "::set-output name=branch::$branch"
- name: Deploy to ${{ steps.get_branch.outputs.branch }} 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: ${{ steps.get_branch.outputs.branch }}
folder: dist

deploy:
mamba-build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install .
- name: Generate Docs
run: python scripts/generate_rdf_docs.py
- name: Generate pre-/postprocessing docs
run: python scripts/generate_processing_docs.py
- name: Generate weight formats docs
run: python scripts/generate_weight_formats_docs.py
- name: Generate JSON Schema
run: python scripts/generate_json_specs.py
- name: Generate weight formats overview
run: python scripts/generate_weight_formats_overview.py generate
- name: Get branch name to deploy to
id: get_branch
shell: bash
run: |
if [[ -n '${{ github.event.pull_request.head.ref }}' ]]; then branch=gh-pages-${{ github.event.pull_request.head.ref }}; else branch=gh-pages; fi
echo "::set-output name=branch::$branch"
- name: Deploy to ${{ steps.get_branch.outputs.branch }} 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: ${{ steps.get_branch.outputs.branch }}
folder: dist
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
environment-name: build-env
condarc: |
channels:
- conda-forge
create-args: >-
boa
- name: linux conda build
run: |
conda mambabuild -c conda-forge conda-recipe
shell: bash -l {0}

# rattler-build:
# name: Build package
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build conda package
# uses: prefix-dev/[email protected]
# with:
# recipe-path: conda-recipe/recipe.yaml
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
cache: 'pip'
- name: Install dependencies
run: |
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
__pycache__/
.vscode
tmp
.env
.vscode/launch.json
*.egg-info/
dist
build/
dist/
docs/
user_docs/
tests/cache
tests/generated_json_schemas
tmp/
output/
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"MD013": false,
"MD033": false,
"MD041": false
}
84 changes: 31 additions & 53 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,37 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.6.0
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: mypy
additional_dependencies: [types-requests]
args: [--install-types, --non-interactive, --explicit-package-bases, --check-untyped-defs]
- id: ruff
args: [--fix]
- repo: local
hooks:
- id: generate rdf docs
name: generate rdf docs
entry: python scripts/generate_rdf_docs.py
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: generate processing docs
name: generate processing docs
entry: python scripts/generate_processing_docs.py
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: generate weight formats docs
name: generate weight formats docs
entry: python scripts/generate_weight_formats_docs.py
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: generate json schemas
name: generate json schemas
entry: python scripts/generate_json_specs.py
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: generate passthrough modules
name: generate passthrough modules
entry: python scripts/generate_passthrough_modules.py generate
language: system
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: generate weight formats overview
name: generate weight formats overview
entry: python scripts/generate_weight_formats_overview.py generate
language: system
always_run: true
pass_filenames: false
- id: pyright
name: pyright
entry: pyright
language: system
always_run: true
pass_filenames: true
files: ^.*\.py$
- id: generate passthrough modules
name: generate passthrough modules
entry: python scripts/generate_version_submodule_imports.py generate
language: system
always_run: true
pass_filenames: false
- id: generate json schemas
name: generate json modules
entry: python scripts/generate_json_schemas.py
language: system
always_run: true
pass_filenames: false
- id: generate spec md docs
name: generate spec md docs
entry: python scripts/generate_spec_documentation.py
language: system
always_run: true
pass_filenames: false
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"window.title": "bioimageio.spec",
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test_*.py"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"yaml.schemas": {
"dist/bioimageio_schema_latest.json": [
"rdf.yaml",
"bioimageio.yaml",
"*.bioimageio.yaml"
],
}
}
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Thank you for considering to contribute to bioimageio.spec!

Find good first issues [here](https://github.com/bioimage-io/spec-bioimage-io/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
Open or join a discussion [here](https://github.com/bioimage-io/spec-bioimage-io/discussions).

More refined instructions on how to contribute will follow.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include bioimageio/spec/VERSION
include README.md
include LICENSE
include bioimageio/spec/static/licenses.json
include bioimageio/spec/static/spdx_licenses.json
include bioimageio/spec/static/tag_categories.json
Loading
Loading