Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
736 commits
Select commit Hold shift + click to select a range
cb94e29
Add a linting workflow
ehrenfeu Mar 12, 2025
c8e482a
Rename workflow
ehrenfeu Mar 12, 2025
8cd64c2
Rename step, remove "src" argument
ehrenfeu Mar 12, 2025
6f40e6b
Enforce docstring summary on 1st line
ehrenfeu Mar 12, 2025
7defedc
Summary line has to end in a punctuation mark
ehrenfeu Mar 12, 2025
9361259
Require documentation for all function parameters
ehrenfeu Mar 12, 2025
918819e
Exclude interactive test scripts from linting
ehrenfeu Mar 13, 2025
9ad2b0f
Merge pull request #44 from imcf/ruff-lint
ehrenfeu Mar 14, 2025
6d7a84f
Docstring fixes
ehrenfeu Mar 14, 2025
b8ba960
Docstring fixes
ehrenfeu Mar 14, 2025
a9ab08f
Docstring fixes
ehrenfeu Mar 14, 2025
1ed0b0c
Avoid code duplication
ehrenfeu Mar 14, 2025
c0990d4
Add module docstring
ehrenfeu Mar 14, 2025
264ee75
Docstring fixes
ehrenfeu Mar 14, 2025
a5ea57e
Docstring fixes
ehrenfeu Mar 14, 2025
f704769
Add FIXME
ehrenfeu Mar 14, 2025
aeaab0d
Docstring fixes
ehrenfeu Mar 14, 2025
abe8178
Docstring fixes
ehrenfeu Mar 14, 2025
22299f1
Docstring fixes
ehrenfeu Mar 14, 2025
2214a2d
Docstring fixes
ehrenfeu Mar 14, 2025
e870bea
Add method for dataset definition for angles and illuminations
lguerard Feb 11, 2025
77138ff
Start WIP for refactor using latest BigStitcher
lguerard Feb 11, 2025
c5528dd
Add method for fusion using BDV Playground
lguerard Feb 11, 2025
e1845e3
Refactor to work with latest BigStitcher
lguerard Mar 6, 2025
9aa57db
Add method for fusion using BIOP Kheops to OME-TIFF
lguerard Mar 6, 2025
b47ab1b
Use the multi view dataset definition command instead
lguerard Mar 11, 2025
4233176
Update tests to latest modifications
lguerard Mar 11, 2025
cdbcaf4
Update method for fusion using BDV playground
lguerard Mar 11, 2025
28b319e
Add method for associating label images using 3DImageJSuite
lguerard Mar 11, 2025
aba06fa
Fix the filtering of objects to use the calibrated method
lguerard Mar 11, 2025
2c58ea9
Use the morpholibj package to 2D dilate labels
lguerard Mar 11, 2025
2ab85e9
Format imports
lguerard Mar 11, 2025
07fa81b
Add method to write results to CSV
lguerard Mar 11, 2025
1ec6f37
Add method to return the median value of a list
lguerard Mar 11, 2025
7fffba7
Add methods for 3D Maxima Finder and 3D Watershed
lguerard Mar 11, 2025
d2bfd09
Update tests to work with Multi-View dataset definition
lguerard Mar 11, 2025
44a77fe
Add processing library to do basic methods
lguerard Mar 11, 2025
af09a4b
Revert "Add processing library to do basic methods"
lguerard Mar 12, 2025
1294ede
Revert "Add method to return the median value of a list"
lguerard Mar 12, 2025
f160c59
Revert "Format imports"
lguerard Mar 12, 2025
dc87aad
Revert "Use the morpholibj package to 2D dilate labels"
lguerard Mar 12, 2025
dc3382e
Revert "Fix the filtering of objects to use the calibrated method"
lguerard Mar 12, 2025
93dadc9
Revert "Add method for associating label images using 3DImageJSuite"
lguerard Mar 12, 2025
201a6c7
Add missing check function
lguerard Mar 12, 2025
af3616a
Fix docstring to reflect real string
lguerard Mar 12, 2025
ab8e5aa
Formatting
lguerard Mar 12, 2025
5cc36d3
Fix string
lguerard Mar 12, 2025
678596e
Fix string
lguerard Mar 12, 2025
09c790c
Use same input for test to work
lguerard Mar 12, 2025
c03f792
Formatting
lguerard Mar 12, 2025
8f67cb0
Fix input for angle to only support input options
lguerard Mar 12, 2025
7b9b579
Run linting also on pull requsts
ehrenfeu Mar 17, 2025
c44aeb8
Exclude Java-related workaround from coverage
ehrenfeu Mar 17, 2025
607c29e
Add test_parse_path_with_prefix()
ehrenfeu Mar 17, 2025
7a1d8de
Add test_gen_name_from_orig()
ehrenfeu Mar 17, 2025
f0fdf76
Add test_gen_name_from_orig()
ehrenfeu Mar 17, 2025
4e99762
Merge pull request #48 from imcf/test-pathtools
ehrenfeu Mar 17, 2025
8a041de
Use `imp` instead of `imageplus`
lguerard Mar 19, 2025
309360f
Improve method name and docstring
lguerard Mar 19, 2025
170ac0c
Improve method name and docstring
lguerard Mar 19, 2025
cca38ba
Add missing import
lguerard Mar 19, 2025
e858900
Change method to use the one added to pathtools
lguerard Mar 19, 2025
b42cec3
Formatting
lguerard Mar 19, 2025
184a943
Update the formatting
lguerard Mar 19, 2025
a49dac3
Remove create_directory() for issue #43
CellKai Mar 19, 2025
cf4a344
Merge pull request #50 from CellKai/issue-43
ehrenfeu Mar 19, 2025
f072877
Merge branch 'devel' into coding-session/2025-03-11
ehrenfeu Mar 19, 2025
54ee5f9
Format docstring's Returns `dict`
ehrenfeu Mar 19, 2025
88ee3a8
Add back `create_directory` with better docstring
lguerard Mar 19, 2025
7466838
Fix linting
lguerard Mar 19, 2025
5bea0ad
Formatting
lguerard Mar 19, 2025
0e81c37
Fix linting issues
lguerard Mar 19, 2025
1b222d0
Update docstring of write_ordereddict_to_csv()
ehrenfeu Mar 19, 2025
f9375c5
Rework docstring
ehrenfeu Mar 19, 2025
e99dcdb
Update docstring of locate_latest_imaris()
ehrenfeu Mar 19, 2025
d2a4991
Improve docstring
ehrenfeu Mar 19, 2025
6eb32db
Improve docstring
ehrenfeu Mar 19, 2025
bfbe585
Shorten docstring
ehrenfeu Mar 19, 2025
18131a8
Update dependency for mocks to 0.8.0.a0
ehrenfeu Mar 20, 2025
d3b0cca
Update dependency for mocks to 0.8.0.a0
ehrenfeu Mar 20, 2025
5b53f68
Remove ipython from dev-dependencies
ehrenfeu Mar 20, 2025
f378920
Add script to parse dependencies from pyproject.toml
ehrenfeu Mar 20, 2025
b72e685
Install pre-releases of "imcf-fiji-mocks" if available
ehrenfeu Mar 20, 2025
f46758d
Merge pull request #51 from imcf/deps/mocks
ehrenfeu Mar 20, 2025
b3110ec
Merge branch 'devel' into coding-session/2025-03-11
ehrenfeu Mar 20, 2025
7c63de8
Merge branch 'devel' into laurent/devel
ehrenfeu Mar 20, 2025
69a6122
Change method name to be more descriptive
rohangirishrao Mar 20, 2025
4d4c4c8
Allow for user specified subject and message
rohangirishrao Mar 20, 2025
45622da
Change docstring to be more accurate
rohangirishrao Mar 20, 2025
b520c28
Revert "Fix linting issues"
lguerard Mar 24, 2025
2b6a8d8
Revert "Formatting"
lguerard Mar 24, 2025
82b8683
Revert "Fix linting"
lguerard Mar 24, 2025
2e9ad4a
Fix linting
lguerard Mar 19, 2025
0d5581d
Formatting
lguerard Mar 19, 2025
f5b4f86
Fix linting issues
lguerard Mar 19, 2025
ebb1413
Rename functions
lguerard Mar 24, 2025
b59b597
Change returns to use dictionaries instead
lguerard Mar 24, 2025
98b9ca8
Change input variable name
lguerard Mar 24, 2025
14d2efc
Use logging instead
lguerard Mar 24, 2025
0045e65
Format using Ruff
lguerard Mar 24, 2025
0ff3433
Add comments and notes to docstring, fix missing inputs
lguerard Mar 24, 2025
74ffe42
Change output to inform if command has failed
lguerard Mar 24, 2025
a094dc9
Change method to return faster in case of empty list
lguerard Mar 24, 2025
c8fcff3
Add missing docstring
lguerard Mar 24, 2025
41b301b
Format using Ruff
lguerard Mar 24, 2025
3876612
Shorten docstring explanation
lguerard Mar 24, 2025
72ebf11
Fix D100 error for undocumented public module
lguerard Mar 24, 2025
25ee6ed
Add module docstring for ImageJ processing utilities
lguerard Mar 24, 2025
00dc641
Move minor implementation detail into code comment
ehrenfeu Mar 25, 2025
51248a4
Docstring cleanups
ehrenfeu Mar 25, 2025
d81e682
Shorten docstring example
ehrenfeu Mar 25, 2025
6b641bb
Indent to show as a fixed-width block
ehrenfeu Mar 25, 2025
51f2cec
One example should be enough
ehrenfeu Mar 25, 2025
a65fe41
Add empty line to fix docstring rendering
ehrenfeu Mar 25, 2025
c35e312
Run black formatting (restore default line length of 88)
ehrenfeu Mar 25, 2025
caa1370
Notes section comes before Examples
ehrenfeu Mar 25, 2025
99ab0f0
Minor updates on Notes section
ehrenfeu Mar 25, 2025
07f3064
Update function details
ehrenfeu Mar 25, 2025
4333086
Place Notes section after Returns
ehrenfeu Mar 25, 2025
ec158ff
Docstring conventions
ehrenfeu Mar 25, 2025
047d913
Docstring conventions
ehrenfeu Mar 25, 2025
98cfaff
Reformat dict in Returns section
ehrenfeu Mar 25, 2025
3601c20
Merge pull request #39 from lguerard/devel
ehrenfeu Mar 25, 2025
f0a1c9c
Merge branch 'devel' into pr/laurent/coding-session/2025-03-11
ehrenfeu Mar 25, 2025
862fde7
Remove docstrings for internal globals
ehrenfeu Mar 25, 2025
0862cb2
Merge pull request #54 from imcf/issues/17
ehrenfeu Mar 25, 2025
adbce1d
Reformat for docstring line length consistency
ehrenfeu Mar 25, 2025
8157954
List fixed sets of valid values
ehrenfeu Mar 25, 2025
2cf8999
Some more docstring reworks
ehrenfeu Mar 25, 2025
d4f5d9e
Automatic formatting
ehrenfeu Mar 25, 2025
b02198e
Fix line lengths
ehrenfeu Mar 25, 2025
b170ff9
Merge pull request #55 from imcf/issues/47
ehrenfeu Mar 25, 2025
1c33512
Simplify validation and exception code logic
ehrenfeu Mar 25, 2025
7a11785
Automatic formatting
ehrenfeu Mar 25, 2025
1ea92fd
Update test to reflect recent modifications
ehrenfeu Mar 25, 2025
8cef7bf
Merge branch 'devel' into pr/laurent/coding-session/2025-03-11
ehrenfeu Mar 25, 2025
bf97721
Merge pull request #49 from lguerard/coding-session/2025-03-11
ehrenfeu Mar 26, 2025
35ee4e8
Auto formatting
ehrenfeu Mar 26, 2025
7a1b58c
Merge branch 'devel' into pr/52
ehrenfeu Mar 26, 2025
5ccdb79
Imperative mood FTW πŸ—½
ehrenfeu Mar 26, 2025
378cf4b
Be a bit more verbose in messages
ehrenfeu Mar 26, 2025
cdf7ddf
Add note on Prefs.get() call vs. dot prefix
ehrenfeu Mar 26, 2025
e14bbb3
Minor docstring modification
ehrenfeu Mar 26, 2025
2027558
Add test instructions for send_notification_email
ehrenfeu Mar 26, 2025
ec2bdd3
Merge pull request #52 from rohangirishrao/devel
ehrenfeu Mar 26, 2025
ef8e531
Rename workflow, add badge
ehrenfeu Mar 26, 2025
1c93eed
Update dependency required for apidocs generation
ehrenfeu Mar 26, 2025
17cc9d4
Automatic formatting
ehrenfeu Mar 26, 2025
b6e594b
Instructions for creating pre-releases
ehrenfeu Mar 26, 2025
5250a33
Update change log describing additions to misc
rohangirishrao Mar 27, 2025
b76d60b
Merge pull request #63 from rohangirishrao/devel
ehrenfeu Mar 27, 2025
0d02caf
Move `pad_number()` to `strtools`
lguerard Mar 27, 2025
5e8d99d
Format using Ruff
lguerard Mar 27, 2025
7b79ffc
Update poetry.lock πŸŽ­πŸ”
ehrenfeu Mar 27, 2025
ef64219
Merge branch 'devel' into pr/64
ehrenfeu Mar 27, 2025
7cc70a6
Merge pull request #64 from lguerard/issues/58
ehrenfeu Mar 27, 2025
26ea037
Rename function for background subtraction to clarify method
lguerard Mar 27, 2025
1fe1a8d
Merge pull request #65 from lguerard/issues/59
ehrenfeu Mar 27, 2025
cef4203
Update documentation for OMERO tools requirements
lguerard Mar 27, 2025
5cba026
Fix formatting of references in omerotools.py documentation
lguerard Mar 27, 2025
3e33174
Merge pull request #66 from lguerard/issues/60
ehrenfeu Mar 27, 2025
4b0b438
Add notes to calculate_mean_and_stdv for empty input handling
lguerard Mar 27, 2025
169613e
Fix indentation of function
lguerard Mar 27, 2025
0c97f2a
Dot dot
ehrenfeu Mar 27, 2025
16bed29
Merge pull request #67 from lguerard/issues/57
ehrenfeu Mar 27, 2025
b9a22c1
Change method name and update options
rohangirishrao Mar 27, 2025
5ae0b50
Merge pull request #68 from lguerard/issues/56
ehrenfeu Mar 27, 2025
66fc766
Merge pull request #69 from rohangirishrao/devel
ehrenfeu Mar 27, 2025
7c3a89a
Attempt to fix docstring rendering in pdoc
ehrenfeu Mar 28, 2025
ab410c8
Merge pull request #70 from imcf/issues/61
ehrenfeu Mar 28, 2025
69f0a60
Automatic formatting
ehrenfeu Mar 28, 2025
c9fbd77
Add missing whitespace + FQ reference
ehrenfeu Mar 28, 2025
6d74e6f
Another typo and missing whitespace
ehrenfeu Mar 28, 2025
4b73fcb
Add info about changes for BDV
lguerard Mar 31, 2025
32ee7b8
Add ImageMetadata class to store metadata
rohangirishrao Apr 3, 2025
a13dc5c
Replace dict returns with ImageMetadata class
rohangirishrao Apr 3, 2025
daa23c3
Replace dict return with StageMetadata class
rohangirishrao Apr 3, 2025
f2908fe
Add additions to imagej.bioformats
rohangirishrao Apr 3, 2025
14934a0
Add unit as attribute
rohangirishrao Apr 3, 2025
ed87e58
Remove redundant source folder parameter
rohangirishrao Apr 3, 2025
e8f1a01
Fix method for string representation
rohangirishrao Apr 3, 2025
a33b2b1
Run black formatting
rohangirishrao Apr 3, 2025
ab0e720
Fix unit retrieval, caused formatting issues
rohangirishrao Apr 3, 2025
f9b2987
Fix markdown syntax for pdoc
ehrenfeu Apr 8, 2025
d932efb
Fix line length
ehrenfeu Apr 8, 2025
37f3cd2
Markdownlint
ehrenfeu Apr 8, 2025
c76b740
Set pad option to ticked to prevent edge erosion
rohangirishrao Apr 8, 2025
2acbeec
Merge pull request #72 from lguerard/issues/34
ehrenfeu Apr 8, 2025
86aa032
Adjust basedir path
ehrenfeu Apr 8, 2025
a8aa1de
Fix variable for the path
lguerard Apr 8, 2025
d772381
Ruff formatting
lguerard Apr 8, 2025
e79d452
Remove string representation method
rohangirishrao Apr 8, 2025
ebb5e96
Fix path to work with testing
lguerard Apr 8, 2025
de365e7
Fix updated path of interactive tests
ehrenfeu Apr 8, 2025
c42af0a
Some minor updates to the TESTING document
ehrenfeu Apr 8, 2025
7048e16
Add test file for bioformats metadata retrieval
rohangirishrao Apr 8, 2025
02b89ed
Merge pull request #73 from lguerard/issues/32
ehrenfeu Apr 8, 2025
4d2b8f8
Line length fix
ehrenfeu Apr 8, 2025
d465b4b
Fix call to create LAP tracker
lguerard Apr 8, 2025
4f89cbe
Change to more recent call for creating label image
lguerard Apr 8, 2025
b3670cb
Add usage instructions
CellKai Apr 8, 2025
9fba2b6
Attempt to configure codecov reports
ehrenfeu Apr 8, 2025
43b2352
Attempt to configure codecov reports
ehrenfeu Apr 8, 2025
a70988c
Merge pull request #75 from lguerard/issues/36
ehrenfeu Apr 8, 2025
5d48698
Merge pull request #76 from CellKai/update-send-mail-test
ehrenfeu Apr 8, 2025
adf0e9d
Update Changelog.md for `project_stack` function
CellKai Apr 8, 2025
10c5517
Add missing methods to changelog and reformatting
lguerard Apr 8, 2025
570d1b6
Rename methods and fix docstrings
lguerard Apr 8, 2025
af3de72
Update testing file to use test data repository
rohangirishrao Apr 8, 2025
a41ff42
Fix path to test data
rohangirishrao Apr 8, 2025
3d08ca3
Validate and fix codecov.yml
ehrenfeu Apr 8, 2025
fcb2bc6
Attempt to configure codecov reports
ehrenfeu Apr 8, 2025
dde74d9
Validate and fix codecov.yml
ehrenfeu Apr 8, 2025
6eabd3e
Rewraps (line length)
ehrenfeu Apr 8, 2025
ef80a60
Merge pull request #78 from lguerard/issues/34
ehrenfeu Apr 8, 2025
202db67
Merge pull request #79 from lguerard/omerotools_fix
ehrenfeu Apr 8, 2025
64a1a09
Line length fixes
ehrenfeu Apr 8, 2025
dc60bd6
Merge pull request #74 from rohangirishrao/devel
ehrenfeu Apr 8, 2025
d6a600d
Use fully-qualified name so pdoc renders a link
ehrenfeu Apr 8, 2025
7de2301
Merge pull request #77 from CellKai/devel
ehrenfeu Apr 8, 2025
341567e
Add methods for `imcflibs.imagej.processing`
lguerard Apr 8, 2025
7888246
Merge pull request #80 from lguerard/issues/34
ehrenfeu Apr 8, 2025
e5db84c
Minor description changes for send_notification_email
ehrenfeu Apr 8, 2025
866f1ba
Remove leftover line
ehrenfeu Apr 8, 2025
f699d54
Update imcf-fiji-mocks dependency and lock πŸŽ­πŸ”
ehrenfeu Apr 8, 2025
6f8ca96
Add full path to BDV classes and trackmate methods
lguerard Apr 8, 2025
758d7e2
Add modification to `listdir_matching`
lguerard Apr 8, 2025
3634ffe
Add changes to `calculate_mean_and_stdv`
lguerard Apr 8, 2025
d55e777
Fix function path
ehrenfeu Apr 8, 2025
c99e01f
Newline
ehrenfeu Apr 8, 2025
df74f89
Modify description of the `regex` parameter
ehrenfeu Apr 8, 2025
627b8f9
Merge pull request #81 from lguerard/issues/34
ehrenfeu Apr 8, 2025
77760ac
Line length fixes
ehrenfeu Apr 8, 2025
61d3916
Explain new parameter for `round_decimals`
ehrenfeu Apr 8, 2025
4db8566
Remove TODO-BDV document
ehrenfeu Apr 8, 2025
0850039
Merge (and fix) duplicate entries
ehrenfeu Apr 8, 2025
9ec87c9
Minor changes to improve readability
ehrenfeu Apr 8, 2025
7e579b4
Group smaller change-collections at the bottom
ehrenfeu Apr 8, 2025
835956b
Another attempt to improve changelog readability
ehrenfeu Apr 8, 2025
438a8be
Update intro section
ehrenfeu Apr 8, 2025
059db6a
Fix changelog broken link
lguerard Apr 9, 2025
f46db33
Switch .md emphasis style to asterisks
ehrenfeu Apr 9, 2025
6148f75
Move markdownlint pragmas to start of file
ehrenfeu Apr 9, 2025
cee57bb
Reformat document for new emphasis syntax
ehrenfeu Apr 9, 2025
1bc20c0
Bump to next development cycle
ehrenfeu Apr 9, 2025
301f022
Fix fully-qualified function reference
ehrenfeu Apr 9, 2025
f35fdec
Merge branch 'devel' into broken_link
ehrenfeu Apr 9, 2025
75aed5e
Merge pull request #85 from lguerard/broken_link
ehrenfeu Apr 9, 2025
de087cd
Explain check-if-release.sh
ehrenfeu Apr 9, 2025
caf69f7
Only run "publish" workflow on (pre-) releases
ehrenfeu Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[run]
source =
src/imcflibs

omit =
conftest.py
tests/*
# omit anything in a venv / venv2 directory
./venv/*
./venv2/*

[report]
## NOTE: `exclude_also` is only supported for coverage 7.2 and newer, which
## won't work when testing with Python2 (coverage 5.5 is the latest one
## supporting Python2), hence we cannot use it:
; exclude_also =
; if _python_platform.python_implementation\(\) == \"Jython\":
13 changes: 13 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
coverage:
precision: 0
round: nearest
range:
- 0
- 75
# notification blocks
# https://docs.codecov.io/docs/codecovyml-reference#section-coverage-notify
# notify:
# status:
# project:
# patch:
# changes: off
176 changes: 162 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
name: build
name: 🚚🌍 Publish to πŸ”¬β˜• SciJava and πŸŽͺ PyPI

on:
push:
branches:
- master
tags:
- "*-[0-9]+.*"
pull_request:
branches:
- master

release:
types:
- published # A release, pre-release, or draft of a release was published.

workflow_dispatch:

## Do NOT run on pushes or PR's, as they won't have a 'release.properties',
## which is required by the build-tooling (see the comment at the "Inspect" /
## "check-if-release.sh" section below for details).
# push:
# pull_request:


jobs:
build:

publish-to-scijava:

name: πŸ”¬β˜• publish to SciJava

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Java

- uses: actions/checkout@v4
name: πŸ“₯ Checkout repo

- name: β˜• Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Set up CI environment

- name: πŸͺ Set up CI environment
run: .github/setup.sh
- name: Execute the build

- name: πŸ‘· Build and publish on πŸ”¬β˜• SciJava
run: .github/build.sh
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
Expand All @@ -33,3 +47,137 @@ jobs:
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}


build-via-poetry:

name: πŸ‘· build via 🎭 Poetry

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
name: πŸ“₯ Checkout repo

- name: πŸ—ƒ Cache πŸ“¦ APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: xmlstarlet
version: 1.0

- name: πŸ•΅ Inspect if this is a proper "scijava-scripts" release
run: scripts/check-if-release.sh
# This will make sure the file 'release.properties' exists, meaning
# `release-version.sh` from the 'scijava-scripts' repo has been run to
# prepare the release and modify 'pom.xml' (which is in turn
# required by the local 'scripts/run-poetry.sh' script for building the
# Python package through Poetry.

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: πŸ—ƒ Cache 🎭 Poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-2.0.1-0

# The key configuration value here is `virtualenvs-in-project: true`: this
# creates the venv as a `.venv` in your testing directory, which allows
# the next step to easily cache it.
- name: πŸ”©πŸ”§ Install 🎭 Poetry
uses: snok/install-poetry@v1
with:
version: 2.0.1
virtualenvs-create: true
virtualenvs-in-project: true

### No dependencies and project installation required, we're just packaging.
# # Cache dependencies (i.e. all the stuff in your `pyproject.toml`).
# - name: πŸ—ƒ Cache 🧾 Dependencies
# id: cache-deps
# uses: actions/cache@v4
# with:
# path: .venv
# key: pydeps-${{ hashFiles('**/poetry.lock') }}

### No poetry-dynamic-versioning here, we're using the POM instead!
# - name: 🎭 Install Poetry dynamic-versioning πŸ”Œ plugin
# run: poetry self add "poetry-dynamic-versioning[plugin]"

### No dependencies and project installation required, we're just packaging.
# # Install dependencies. `--no-root` means "install all dependencies but
# # not the project itself", which is what you want to avoid caching _your_
# # code. The `if` statement ensures this only runs on a cache miss.
# - name: 🎭 Install 🧾 Dependencies
# run: scripts/run-poetry.sh install --no-interaction --no-root
# if: steps.cache-deps.outputs.cache-hit != 'true'

# - name: 🎭 Install πŸ›– project
# run: scripts/run-poetry.sh install --no-interaction

- name: πŸŽ­πŸ‘· Build 🧱 project
run: scripts/run-poetry.sh build
env:
IGNORE_DEPS_PYTHON: true # required to build "py2.py3" wheels

- name: πŸ“€ Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/


publish-to-pypi:

name: 🚚🌍 publish to πŸŽͺ PyPI

runs-on: ubuntu-latest

needs:
- build-via-poetry

permissions:
id-token: write

environment:
name: release

steps:
- name: πŸ“₯ Retrieve release πŸ“¦ distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: πŸ₯ Publish release distributions to πŸŽͺ PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/


trigger-foreign-workflows:

name: πŸš€ Dispatch foreign workflows

strategy:
matrix:
repo: ['imcf/imcf.github.io']

runs-on: ubuntu-latest

needs:
- publish-to-pypi

steps:
- name: 🏹 Fire event on `${{ matrix.repo }}`
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DISPATCH_DEPLOY_PAGES }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ matrix.repo }}/dispatches \
-d '{"event_type":"dispatch-event"}'
25 changes: 25 additions & 0 deletions .github/workflows/dispatch-deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: πŸš€ Dispatch foreign workflows

on:
workflow_dispatch:

jobs:

trigger-event:

strategy:
matrix:
repo: ['imcf/imcf.github.io']

runs-on: ubuntu-latest

steps:
- name: 🏹 Fire event on `${{ matrix.repo }}`
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DISPATCH_DEPLOY_PAGES }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ matrix.repo }}/dispatches \
-d '{"event_type":"dispatch-event"}'
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: πŸ”Ž Code Linting ⚑

on:
push:
pull_request:
workflow_dispatch:

jobs:

lint:
name: Ruff βš‘πŸ•΅

runs-on: ubuntu-latest

steps:

- name: πŸ“₯ Checkout repo
uses: actions/checkout@v4

- name: Run Ruff checks ⚑
uses: astral-sh/ruff-action@v3
with:
args: check
107 changes: 107 additions & 0 deletions .github/workflows/pytest-poetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## action file inspired by https://jacobian.org/til/github-actions-poetry/

name: πŸ§ͺ pytest (via 🎭 Poetry)

on:
push:
branches:
- master
tags:
- run-pytest*
- py3-pytest*
- "*-[0-9]+.*"
pull_request:
branches:
- master
- devel

jobs:
pytest-poetry:
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:

- uses: actions/checkout@v4
name: πŸ“₯ Checkout repo

- name: πŸ—ƒ Cache πŸ“¦ APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: xmlstarlet
version: 1.0

# If you wanted to use multiple Python versions, you'd have specify a
# matrix in the job and reference the matrix python version here.
- name: 🐍 Set up Python
uses: actions/setup-python@v5.4.0
with:
python-version: "3.10"

# Cache the installation of Poetry itself, e.g. the next step. This
# prevents the workflow from installing Poetry every time, which can be
# slow. Note the use of the Poetry version number in the cache key, and
# the "-0" suffix: this allows you to invalidate the cache manually
# if/when you want to upgrade Poetry, or if something goes wrong (could be
# done mildly cleaner by using an environment variable).
- name: πŸ—ƒ Cache 🎭 Poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.8.2-0

# Install Poetry. You could do this manually, or there are several actions
# that do this. `snok/install-poetry` seems to be minimal yet complete,
# and really just calls out to Poetry's default install script, which
# feels correct. I pin the Poetry version here because Poetry does
# occasionally change APIs between versions and I don't want my actions to
# break if it does.
#
# The key configuration value here is `virtualenvs-in-project: true`: this
# creates the venv as a `.venv` in your testing directory, which allows
# the next step to easily cache it.
- name: πŸ”©πŸ”§ Install 🎭 Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`).
# Note the cache key: if you're using multiple Python versions, or
# multiple OSes, you'd need to include them in the cache key. I'm not, so
# it can be simple and just depend on the poetry.lock.
- name: πŸ—ƒ Cache 🧾 Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

### No poetry-dynamic-versioning here, we're using the POM instead!
# - name: 🎭 Install Poetry dynamic-versioning πŸ”Œ plugin
# run: poetry self add "poetry-dynamic-versioning[plugin]"

# Install dependencies. `--no-root` means "install all dependencies but
# not the project itself", which is what you want to avoid caching _your_
# code. The `if` statement ensures this only runs on a cache miss.
- name: 🎭 Install 🧾 Dependencies
run: scripts/run-poetry.sh install --no-interaction --no-root --verbose
if: steps.cache-deps.outputs.cache-hit != 'true'

# Now install _your_ project. This isn't necessary for many types of
# projects -- particularly things like Django apps don't need this. But
# it's a good idea since it fully-exercises the pyproject.toml and makes
# that if you add things like console-scripts at some point that they'll
# be installed and working.
- name: 🎭 Install πŸ›– project
run: scripts/run-poetry.sh install --no-interaction --verbose

# And finally run the tests.
- name: πŸ§ͺ🎭 Run Tests
run: scripts/run-poetry.sh run pytest --color=yes --cov --cov-report=xml -vv

- name: πŸ“€ Upload πŸ“Š coverage reports to β˜‚ Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading
Loading