Skip to content

Commit 8e6426d

Browse files
committed
Merge branch 'main' into develop
2 parents e35c371 + 9402c9e commit 8e6426d

File tree

4 files changed

+108
-39
lines changed

4 files changed

+108
-39
lines changed

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,50 @@
11

2+
## releasing 1.2.1 (2025-11-28)
3+
### Overview
4+
Updated output formats of the experimental `mmif describe` command
5+
6+
### Changes
7+
* `mmif describe` command
8+
* simplified output JSON format of single-mmif input (`mmif.utils.workflow_helper.describe_single_mmif`)
9+
* more informative output from multi-mmif input (`mmif.utils.workflow_helper.describe_mmif_collection`)
10+
11+
> [!NOTE]
12+
> `mmif describe` (and the underlying `mmif.utils.workflow_helper`) is still experimental and subject to change in future releases without notice. Backward compatibility is not guaranteed.
13+
14+
## releasing 1.2.0 (2025-11-20)
15+
### Overview
16+
This version is minor release with addition of a new cli (`describe`), lots of in-line documentation updates, and deprecation of some "getter" methods
17+
18+
### Additions
19+
* `mmif describe` command to summarize views and annotations of a give MMIF file (https://github.com/clamsproject/mmif-python/pull/339).
20+
21+
### Changes
22+
* "list-like" objects in MMIF (`DataList`, `DocumentsList`, `ViewsList`, `AnnotationsList`) - `get()` method is now deprecated (https://github.com/clamsproject/mmif-python/issues/295). Use their parent containers' `get` methods
23+
```
24+
mmif.views.get(some_view_id) # will show deprecation warning as of 1.1.3 (note that there's no 1.1.3, we moved from 1.1.2 to 1.2.0)
25+
# instead use
26+
mmif.get(some_view_id)
27+
# same for view.annotations.get(ann_id) ==> view.get(ann_id)
28+
```
29+
* comparing two Mmif objects no longer depends on buggy `deepdiff` library, and handled more robustly (https://github.com/clamsproject/mmif-python/issues/311)
30+
* many outdated documentation updates
31+
32+
33+
## releasing 1.1.2 (2025-07-28)
34+
### Overview
35+
Patch release with a hotfix of a bug.
36+
37+
### Changes
38+
* Fixed bug with handling "list of ID" props in 1.0.x MMIF.
39+
40+
## releasing 1.1.1 (2025-07-26)
41+
### Overview
42+
Patch release to support installation on python 3.12 and newer (fixes https://github.com/clamsproject/mmif-python/issues/314).
43+
44+
### Additions
45+
- `setup.py` is now compatible with the latest setuptools (80) .
46+
- [Since python 3.12 no longer ship `setuptools` as a part of standard installation](https://docs.python.org/3/whatsnew/3.12.html#ensurepip), added setuptools as a `dev` dependency.
47+
248
## releasing 1.1.0 (2025-07-23)
349
### Overview
450
This is a minor version release, but it includes several significant changes and improvements across the codebase.

documentation/cli.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ The CLI is installed as ``mmif`` shell command. To see the available commands, r
1111
1212
mmif --help
1313
14-
.. contents::
15-
:local:
16-
:backlinks: none
17-
1814
The following documentation is automatically generated from the CLI help messages.
1915

2016
.. include:: cli_help.rst

documentation/target-versions.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
"``mmif-python`` version","Target MMIF Specification"
2+
1.2.0,"1.1.0"
3+
1.1.2,"1.1.0"
4+
1.1.1,"1.1.0"
25
1.1.0,"1.1.0"
36
1.0.19,"1.0.5"
47
1.0.18,"1.0.5"

mmif/utils/workflow_helper.py

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,32 @@ def describe_single_mmif(mmif_file: Union[str, Path]) -> dict:
181181
182182
The output format is a dictionary with the following keys:
183183
184-
* ``workflowId``: A unique identifier for the workflow, based on the
185-
sequence of app executions (app, version, parameter hashes). App
186-
executions with errors are excluded from this identifier. App
187-
executions with warnings are still considered successful for the purpose of this identifier.
188-
* ``stats``:
189-
* ``appCount``: Total number of identified app executions.
190-
* ``errorViews``: A list of view IDs that reported errors.
191-
* ``warningViews``: A list of view IDs that reported warnings.
192-
* ``emptyViews``: A list of view IDs that contain no annotations.
193-
* ``annotationCountByType``: A dictionary mapping each annotation
194-
type to its count, plus a ``total`` key for the sum of all
195-
annotations across all app executions.
196-
* ``apps``: A list of objects, where each object represents one app
197-
execution. It includes metadata, profiling, and aggregated statistics
198-
for all views generated by that execution. A special entry for views
199-
that could not be assigned to an execution will be at the end of the list.
184+
* ``workflowId``
185+
A unique identifier for the workflow, based on the
186+
sequence of app executions (app, version, parameter hashes). App
187+
executions with errors are excluded from this identifier. App
188+
executions with warnings are still considered successful for the purpose
189+
of this identifier.
190+
* ``stats``
191+
A dictionary with the following keys:
192+
193+
``appCount``
194+
Total number of identified app executions.
195+
``errorViews``
196+
A list of view IDs that reported errors.
197+
``warningViews``
198+
A list of view IDs that reported warnings.
199+
``emptyViews``
200+
A list of view IDs that contain no annotations.
201+
``annotationCountByType``
202+
A dictionary mapping each annotation type to its count, plus a
203+
``total`` key for the sum of all annotations across all app
204+
executions.
205+
* ``apps``
206+
A list of objects, where each object represents one app
207+
execution. It includes metadata, profiling, and aggregated statistics
208+
for all views generated by that execution. A special entry for views
209+
that could not be assigned to an execution will be at the end of the list.
200210
201211
---
202212
The docstring above is used to generate help messages for the CLI command.
@@ -311,24 +321,38 @@ def describe_mmif_collection(mmif_dir: Union[str, Path]) -> dict:
311321
312322
The output format is a dictionary with the following keys:
313323
314-
* ``mmifCountByStatus``: A dictionary summarizing the processing status of
315-
all MMIF files in the collection. It includes:
316-
* ``total``: Total number of MMIF files found.
317-
* ``successful``: Number of MMIF files processed without errors (may contain warnings).
318-
* ``withErrors``: Number of MMIF files containing app executions that reported errors.
319-
* ``withWarnings``: Number of MMIF files containing app executions that reported warnings.
320-
* ``invalid``: Number of files that failed to be parsed as valid MMIF.
321-
* ``workflows``: A list of "workflow" objects found in the "successful" MMIF files (files with errors
322-
are excluded), where each object contains:
323-
* ``workflowId``: The unique identifier for the workflow.
324-
* ``apps``: A list of app objects, each with ``app`` (name+ver identifier),
325-
``appConfiguration``, and ``appProfiling`` statistics (avg, min, max, stdev running times)
326-
aggregated per workflow.
327-
* ``mmifs``: A list of MMIF file basenames belonging to this workflow.
328-
* ``mmifCount``: The number of MMIF files in this workflow.
329-
* ``annotationCountByType``: A dictionary aggregating annotation counts
330-
across the entire collection. It includes a ``total`` key for the grand
331-
total, plus integer counts for each individual annotation type.
324+
* ``mmifCountByStatus``
325+
A dictionary summarizing the processing status of all MMIF files in the
326+
collection. It includes:
327+
328+
``total``
329+
Total number of MMIF files found.
330+
``successful``
331+
Number of MMIF files processed without errors (may contain warnings).
332+
``withErrors``
333+
Number of MMIF files containing app executions that reported errors.
334+
``withWarnings``
335+
Number of MMIF files containing app executions that reported warnings.
336+
``invalid``
337+
Number of files that failed to be parsed as valid MMIF.
338+
* ``workflows``
339+
A list of "workflow" objects found in the "successful" MMIF files (files
340+
with errors are excluded), where each object contains:
341+
342+
``workflowId``
343+
The unique identifier for the workflow.
344+
``apps``
345+
A list of app objects, each with ``app`` (name+ver identifier),
346+
``appConfiguration``, and ``appProfiling`` statistics (avg, min, max,
347+
stdev running times) aggregated per workflow.
348+
``mmifs``
349+
A list of MMIF file basenames belonging to this workflow.
350+
``mmifCount``
351+
The number of MMIF files in this workflow.
352+
* ``annotationCountByType``
353+
A dictionary aggregating annotation counts across the entire collection.
354+
It includes a ``total`` key for the grand total, plus integer counts for
355+
each individual annotation type.
332356
333357
---
334358
The docstring above is used to generate help messages for the CLI command.
@@ -439,4 +463,4 @@ def describe_mmif_collection(mmif_dir: Union[str, Path]) -> dict:
439463
'mmifCountByStatus': dict(status_summary),
440464
'workflows': final_workflows_list,
441465
'annotationCountByType': final_annotation_counts
442-
}
466+
}

0 commit comments

Comments
 (0)