Skip to content

Commit f265841

Browse files
committed
chore: bump version to v1.0.0-beta.2
1 parent b451be1 commit f265841

File tree

6 files changed

+98
-33
lines changed

6 files changed

+98
-33
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
id-token: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: 'Checkout'
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: 'recursive'
19+
20+
- name: 'Set up Node'
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20.x"
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.10"
29+
30+
- name: 'Install hatch'
31+
run: pip install hatch
32+
33+
- name: "Build source distribution"
34+
run: |
35+
hatch build -t sdist
36+
37+
- name: "Build wheel distribution"
38+
run: |
39+
hatch build -t wheel
40+
41+
- name: Publish package
42+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## Unreleased
3+
## v1.0.0.beta2
44

55
- Improved visibility of highlighted spans and layout of boxes with mixed inset/outset nesting
66
- Improved autocompletion experience for table suggestion inputs

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
![Tests](https://img.shields.io/github/actions/workflow/status/percevalw/metanno/tests.yml?branch=main&label=tests&style=flat-square)
2-
[![Documentation](https://img.shields.io/github/actions/workflow/status/percevalw/metanno/docs.yml?branch=main&label=docs&style=flat-square)](https://percevalw.github.io/metanno/latest/)
3-
[![PyPI](https://img.shields.io/pypi/v/metanno?color=blue&style=flat-square)](https://pypi.org/project/metanno/)
4-
51
<h1 align="center">
62
<img alt="Metanno" width="250" src="https://raw.githubusercontent.com/percevalw/metanno/main/docs/assets/images/logo.png" />
73
</h1>
84

5+
![Tests](https://img.shields.io/github/actions/workflow/status/percevalw/metanno/tests.yml?branch=main&label=tests&style=flat-square)
6+
[![Documentation](https://img.shields.io/github/actions/workflow/status/percevalw/metanno/docs.yml?branch=main&label=docs&style=flat-square)](https://percevalw.github.io/metanno/latest/)
7+
[![PyPI](https://img.shields.io/pypi/v/metanno?color=blue&style=flat-square)](https://pypi.org/project/metanno/)
98
[![DOI](https://zenodo.org/badge/244972164.svg)](https://zenodo.org/doi/10.5281/zenodo.10689826)
109

1110
--------------------------------------------------------------------------------
@@ -44,7 +43,7 @@ Develop and test in a notebook. If you prefer, you can also run it as a standalo
4443
### Easy setup
4544

4645
```bash { data-md-color-scheme="slate" }
47-
pip install metanno
46+
pip install metanno==1.0.0-beta.2
4847
```
4948

5049
To use it with Jupyter, if you install the library in a custom environment (conda, venv, or other),

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Develop and test in a notebook. If you prefer, you can also run it as a standalo
3636
### Easy setup
3737

3838
```bash { data-md-color-scheme="slate" }
39-
pip install metanno
39+
pip install metanno==1.0.0-beta.2
4040
```
4141

4242
To use it with Jupyter, if you install the library in a custom environment (conda, venv, or other),

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A simple pip installation should be enough to install Metanno *both* as a standalone web app framework and as a JupyterLab extension:
66

77
```bash { data-md-color-scheme="slate" }
8-
pip install metanno
8+
pip install metanno==1.0.0-beta.2
99
```
1010

1111
To use it with Jupyter, if you install the library in a custom environment (conda, venv, or other),

pret/ui/metanno/__init__.py

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pret.render import stub_component
55
from pret.marshal import js, make_stub_js_module, marshal_as
66

7-
__version__ = "1.0.0-beta.1"
7+
__version__ = "1.0.0-beta.2"
88
_py_package_name = "metanno"
99
_js_package_name = "metanno"
1010
_js_global_name = "Metanno"
@@ -54,6 +54,7 @@ def AnnotatedImage(*children, annotations: Any, annotation_styles: Any, image: s
5454
Examples
5555
--------
5656
57+
<!-- blacken-docs:off -->
5758
```python { .render-with-pret style="height: 300px" }
5859
from pret import component, create_store, use_store_snapshot, use_event_callback
5960
from pret.ui.metanno import AnnotatedImage
@@ -122,6 +123,7 @@ def on_click(shape_idx, modkeys):
122123
123124
MyImage()
124125
```
126+
<!-- blacken-docs:on -->
125127
126128
Parameters
127129
----------
@@ -230,7 +232,7 @@ def Table(
230232
231233
Examples
232234
--------
233-
235+
<!-- blacken-docs:off -->
234236
```python { .render-with-pret style="min-height: 300px" }
235237
from pret import component, create_store, use_store_snapshot, use_event_callback
236238
from pret.ui.metanno import Table
@@ -277,6 +279,7 @@ def on_cell_change(row_idx, col, new_value):
277279
278280
MyTable()
279281
```
282+
<!-- blacken-docs:on -->
280283
281284
Parameters
282285
----------
@@ -392,7 +395,13 @@ def AnnotatedText(
392395
--------
393396
394397
```python { .render-with-pret }
395-
from pret import component, create_store, use_store_snapshot, use_event_callback, use_state
398+
from pret import (
399+
component,
400+
create_store,
401+
use_store_snapshot,
402+
use_event_callback,
403+
use_state,
404+
)
396405
from pret.ui.metanno import AnnotatedText
397406
from pret.ui.joy import Button, Box
398407
@@ -402,20 +411,27 @@ def AnnotatedText(
402411
)
403412
404413
# One span covering the word “Metanno”
405-
spans = create_store([{
406-
"id": f"span-0-7",
407-
"begin": 0,
408-
"end": 7,
409-
"label": "OBJ",
410-
"highlighted": False,
411-
}])
412-
413-
txt_annotation_styles = create_store({
414-
"OBJ": {
415-
"color": "red",
416-
"shape": "underline",
414+
spans = create_store(
415+
[
416+
{
417+
"id": f"span-0-7",
418+
"begin": 0,
419+
"end": 7,
420+
"label": "OBJ",
421+
"highlighted": False,
422+
}
423+
]
424+
)
425+
426+
txt_annotation_styles = create_store(
427+
{
428+
"OBJ": {
429+
"color": "red",
430+
"shape": "underline",
431+
}
417432
}
418-
})
433+
)
434+
419435
420436
@component
421437
def MyText():
@@ -425,14 +441,16 @@ def MyText():
425441
@use_event_callback
426442
def handle_select(ranges, modkeys):
427443
for sp in ranges:
428-
spans.extend([
429-
{
430-
"id": f"span-{sp['begin']}-{sp['end']}",
431-
"begin": sp["begin"],
432-
"end": sp["end"],
433-
"label": "OBJ",
434-
}
435-
])
444+
spans.extend(
445+
[
446+
{
447+
"id": f"span-{sp['begin']}-{sp['end']}",
448+
"begin": sp["begin"],
449+
"end": sp["end"],
450+
"label": "OBJ",
451+
}
452+
]
453+
)
436454
437455
def on_mouse_enter_span(span_id, modkeys):
438456
for i, sp in enumerate(spans):
@@ -461,9 +479,15 @@ def on_span_style_change():
461479
on_mouse_leave_span=on_mouse_leave_span,
462480
style={"gridColumn": "1 / -1"},
463481
),
464-
sx={"p": 1, "display": "grid", "gridTemplateColumns": "repeat(2, auto)", "gap": 1},
482+
sx={
483+
"p": 1,
484+
"display": "grid",
485+
"gridTemplateColumns": "repeat(2, auto)",
486+
"gap": 1,
487+
},
465488
)
466489
490+
467491
MyText()
468492
```
469493

0 commit comments

Comments
 (0)