Skip to content

Commit 8ab8499

Browse files
authored
Merge pull request #793 from fractal-analytics-platform/pydantic-v2-second-attempt
Fully move to Pydantic v2
2 parents ce7f897 + 2aed673 commit 8ab8499

File tree

68 files changed

+1515
-1122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1515
-1122
lines changed

.github/workflows/manifest_external_packages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,46 @@ jobs:
2323

2424
package: [skip]
2525
github_repo: [skip]
26+
github_branch: [skip]
2627
manifest_path: [skip]
2728
cmd_install: [skip]
2829
cmd_create_manifest: [skip]
30+
custom_dependencies: [skip]
2931

3032
include:
3133

3234
- package: scMultipleX
3335
github_repo: fmi-basel/gliberal-scMultipleX
36+
github_branch: main
3437
manifest_path: src/scmultiplex/__FRACTAL_MANIFEST__.json
3538
cmd_install: 'python -m pip install -e .[fractal-tasks]'
3639
cmd_create_manifest: 'python src/scmultiplex/dev/create_manifest.py'
40+
custom_dependencies: 'image_registration'
3741

3842
- package: fractal-helper-tasks
3943
github_repo: jluethi/fractal-helper-tasks
44+
github_branch: main
4045
manifest_path: src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json
4146
cmd_install: 'python -m pip install -e .'
4247
cmd_create_manifest: 'python src/fractal_helper_tasks/dev/create_manifest.py'
48+
custom_dependencies: ''
4349

4450
- package: APx_fractal_task_collection
4551
github_repo: Apricot-Therapeutics/APx_fractal_task_collection
52+
github_branch: pydantic_v2
4653
manifest_path: src/apx_fractal_task_collection/__FRACTAL_MANIFEST__.json
4754
cmd_install: 'python -m pip install -e .'
4855
cmd_create_manifest: 'python src/apx_fractal_task_collection/dev/update_manifest.py'
56+
custom_dependencies: ''
4957

5058
exclude:
5159
- package: skip
5260
github_repo: skip
61+
github_branch: skip
5362
manifest_path: skip
5463
cmd_install: skip
5564
cmd_create_manifest: skip
65+
custom_dependencies: skip
5666

5767
steps:
5868

@@ -63,6 +73,7 @@ jobs:
6373
uses: actions/checkout@v4
6474
with:
6575
repository: ${{ matrix.github_repo }}
76+
ref: ${{ matrix.github_branch }}
6677

6778
- uses: actions/setup-python@v5
6879
with:
@@ -75,11 +86,29 @@ jobs:
7586
- name: Install package
7687
run: ${{ matrix.cmd_install }}
7788

89+
- name: Get current branch of `fractal-tasks-core`
90+
uses: actions/checkout@v4
91+
with:
92+
path: fractal-tasks-core
93+
94+
- name: Install current fractal-tasks-core (this may fail)
95+
run: python -m pip install -e ./fractal-tasks-core
96+
97+
- name: Install custom additional dependencies (see issue 803)
98+
if: ${{ matrix.custom_dependencies != '' }}
99+
run: python -m pip install ${{ matrix.custom_dependencies }}
100+
78101
- name: Create manifest
79102
run: ${{ matrix.cmd_create_manifest }}
80103

104+
- name: Setup friendly diff style
105+
run: echo "*.json diff=json" >> .gitattributes && git config diff.json.textconv "jq --sort-keys '.' \$1"
106+
81107
- name: Run git diff for manifest
82108
run: git diff ${{ matrix.manifest_path }}
83109

110+
- name: Clean up before checking repo status
111+
run: rm -rf fractal-tasks-core .gitattributes
112+
84113
- name: Check repo status
85114
run: if [[ -z $(git status -s) ]]; then echo "Clean status"; else echo "Dirty status"; git status; exit 1; fi

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
**Note**: Numbers like (\#123) point to closed Pull Requests on the fractal-tasks-core repository.
22

3+
# 1.2.0 (unreleased)
4+
5+
* Core-library and tasks:
6+
* Switch all core models to Pydantic V2 (\#793).
7+
* JSON Schema generation tools:
8+
* Move JSON-Schema tools to Pydantic V2 (\#793).
9+
* Testing:
10+
* Remove dependency on `pytest-pretty` (\#793).
11+
* Update `manifest_external_packages.yml` GitHub Action so that it installs the current `fractal-tasks-core` (\#793).
12+
313
# 1.1.1
414

515
* Tasks:
6-
* Fix issue with masked ROI & relabeling in Cellpose task (\#785).
7-
* Fix issue with masking ROI label types in `masked_loading_wrapper` for Cellpose task (\#785).
16+
* Fix issue with masked ROI & relabeling in Cellpose task (\#786).
17+
* Fix issue with masking ROI label types in `masked_loading_wrapper` for Cellpose task (\#786).
818
* Enable workaround to support yx images in Cellpose task (\#789).
919
* Fix error handling in `calculate_registration_image_based` (\#799).
1020
* Fix minor issues with call-signature and type hints in `calculate_registration_image_based` (\#799).
@@ -22,8 +32,8 @@
2232
* Refactor Cellpose Task inputs: Support independent normalization of 2 input channels in the Cellpose task (\#738).
2333
* Rename `task.cellpose_transforms` into `tasks.cellpose_utils` (\#738).
2434
* Fix wrong repeated overlap checks for bounding-boxes in Cellpose task (\#778).
25-
* Fix minor MIP issues related to plate metadata and expecting acquisition metadata in all NGFF plates(\#781).
26-
* Add `chi2_shift` option to Calculate Registration (image-based) task(\#741).
35+
* Fix minor MIP issues related to plate metadata and expecting acquisition metadata in all NGFF plates (\#781).
36+
* Add `chi2_shift` option to Calculate Registration (image-based) task (\#741).
2737
* Development:
2838
* Switch to transitional pydantic.v1 imports, changes pydantic requirement to `==1.10.16` or `>=2.6.3` (\#760).
2939
* Support JSON-Schema generation for `Enum` task arguments (\#749).
@@ -35,6 +45,8 @@
3545
* Test manifest creation for three other tasks packages (\#763).
3646
* NGFF subpackage
3747
* Fix Plate model to correspond better to 0.4.0 NGFF spec: Now makes acquisition metadata optional (\#781).
48+
* Dependencies:
49+
* Add `image_registration` within `fractal-tasks` extra (\#741).
3850

3951
# 1.0.2
4052

0 commit comments

Comments
 (0)