Skip to content

Commit 06a7332

Browse files
authored
Merge branch 'main' into bes/revision_history_clean_history
2 parents 57b2c5f + 7243681 commit 06a7332

File tree

171 files changed

+9284
-2323
lines changed

Some content is hidden

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

171 files changed

+9284
-2323
lines changed

.docker/server_dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ARG UV_VERSION="0.8.4"
22
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_image
33

44
FROM python:3.10 AS api
5+
ARG TARGETARCH
56
SHELL ["/bin/bash", "--login", "-c"]
67

78
# Useful for installing deps from git, preventing big downloads and bandwith quotas
@@ -12,7 +13,15 @@ RUN apt update && apt install -y gnupg curl tree mdbtools && apt clean
1213

1314
# Install MongoDB tools in the official way
1415
WORKDIR /opt
15-
RUN wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.0.deb && apt install ./mongodb-database-tools-*-100.9.0.deb
16+
17+
RUN if [ "$TARGETARCH" = "arm64" ]; then \
18+
ARCH="arm64"; \
19+
else \
20+
ARCH="x86_64"; \
21+
fi && \
22+
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-${ARCH}-100.9.0.deb && \
23+
apt update && apt install -y ./mongodb-database-tools-*-100.9.0.deb || apt --fix-broken install -y && \
24+
rm -f mongodb-database-tools-*.deb
1625

1726
COPY --from=uv_image /uv /usr/local/bin/uv
1827
ENV UV_LINK_MODE=copy \
@@ -29,6 +38,9 @@ ENV SETUPTOOLS_SCM_PRETEND_VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION}
2938
WORKDIR /app
3039
COPY ./pydatalab/pyproject.toml .
3140
COPY ./pydatalab/uv.lock .
41+
42+
# copy any plugin directory, if it exists, using a glob to prevent crashes if it doesn't
43+
COPY ./pydatalab/plugin[s] .
3244
RUN uv sync --locked --no-dev --all-extras
3345

3446
WORKDIR /app

.github/workflows/ci.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424

2525
- name: Set up Python 3.10
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: "3.10"
2929

3030
- name: Set up uv
31-
uses: astral-sh/setup-uv@v6
31+
uses: astral-sh/setup-uv@v7
3232
with:
3333
version: ${{ env.UV_VERSION }}
3434
enable-cache: true
@@ -61,13 +61,13 @@ jobs:
6161
python-version: ["3.10", "3.11"]
6262

6363
steps:
64-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v5
6565
with:
6666
# tests need an unshallowed version of the repository to check the version
6767
fetch-depth: 0
6868

6969
- name: Set up Python ${{ matrix.python-version }}
70-
uses: actions/setup-python@v5
70+
uses: actions/setup-python@v6
7171
with:
7272
python-version: ${{ matrix.python-version }}
7373

@@ -76,7 +76,7 @@ jobs:
7676
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.0.deb && sudo apt install ./mongodb-database-tools-*-100.9.0.deb
7777
7878
- name: Set up uv
79-
uses: astral-sh/setup-uv@v6
79+
uses: astral-sh/setup-uv@v7
8080
with:
8181
version: ${{ env.UV_VERSION }}
8282
working-directory: "./pydatalab"
@@ -90,7 +90,7 @@ jobs:
9090
- name: Run all tests
9191
working-directory: ./pydatalab
9292
run: |
93-
uv run pytest -rs -vvv ./tests
93+
uv run pytest -rs --cov=pydatalab --cov-report=term --cov-report=xml -vvv ./tests
9494
9595
- name: Upload coverage to Codecov
9696
if: matrix.python-version == '3.10' && github.repository == 'datalab-org/datalab'
@@ -103,10 +103,10 @@ jobs:
103103
name: Test the app build
104104
runs-on: ubuntu-latest
105105
steps:
106-
- uses: actions/checkout@v4
106+
- uses: actions/checkout@v5
107107

108108
- name: Set up Node
109-
uses: actions/setup-node@v4
109+
uses: actions/setup-node@v6
110110
env:
111111
FORCE_COLOR: 0
112112
with:
@@ -132,7 +132,7 @@ jobs:
132132
browser-backend: ["electron", "chrome"] # , "firefox"] # Temporarily disable Firefox until migration to Cypress v14 (https://github.com/datalab-org/datalab/issues/1289)
133133

134134
steps:
135-
- uses: actions/checkout@v4
135+
- uses: actions/checkout@v5
136136

137137
- name: Set up Docker Buildx
138138
uses: docker/setup-buildx-action@v3
@@ -168,7 +168,14 @@ jobs:
168168
- name: Start services
169169
run: |
170170
# Launch production container profiles and wait for them to come up
171-
docker compose up database api app --no-build --force-recreate -d --wait
171+
if ! docker compose up database api app --no-build --force-recreate -d --wait; then
172+
echo "=== Docker compose startup failed ==="
173+
echo "=== Container logs: ==="
174+
docker compose logs database api app
175+
echo "=== Container status: ==="
176+
docker compose ps database api app
177+
exit 1
178+
fi
172179
173180
- name: Run end-to-end tests
174181
uses: cypress-io/github-action@v6

.github/workflows/dependable-bot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
with:
2222
# Make sure to pull all tags so the version is set correctly
2323
fetch-tags: true
2424
fetch-depth: 0
2525

2626
- name: Set up Python 3.10
27-
uses: actions/setup-python@v5
27+
uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.10"
3030

3131
- name: Set up uv
32-
uses: astral-sh/setup-uv@v6
32+
uses: astral-sh/setup-uv@v7
3333
with:
3434
version: ${{ env.UV_VERSION }}
3535
working-directory: "./pydatalab"

.github/workflows/license-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
with:
1818
submodules: true
1919
fetch-depth: 0
2020
ref: ${{ env.PUBLISH_UPDATE_BRANCH }}
2121

2222
- name: Set up Python 3.11
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@v6
2424
with:
2525
python-version: '3.11'
2626

2727
- name: Set up uv
28-
uses: astral-sh/setup-uv@v6
28+
uses: astral-sh/setup-uv@v7
2929
with:
3030
version: ${{ env.UV_VERSION }}
3131
working-directory: "./pydatalab"

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
steps:
2525

2626
- name: Checkout repository
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828
with:
2929
submodules: true
3030
fetch-depth: 0
3131
ref: ${{ env.PUBLISH_UPDATE_BRANCH }}
3232

3333
- name: Set up Python 3.11
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@v6
3535
with:
3636
python-version: '3.11'
3737

@@ -61,7 +61,7 @@ jobs:
6161
steps:
6262

6363
- name: Checkout repository
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@v5
6565
with:
6666
submodules: true
6767
fetch-depth: 0

.github/workflows/yarn-upgrade-bot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818

1919
- name: Set up Node
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@v6
2121
env:
2222
FORCE_COLOR: 0
2323
with:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ci:
1313

1414
repos:
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v5.0.0
16+
rev: v6.0.0
1717
hooks:
1818
- id: trailing-whitespace
1919
exclude: (pydatalab/example_data/)|(.*.snap)
@@ -29,7 +29,7 @@ repos:
2929
- id: mixed-line-ending
3030

3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.12.7
32+
rev: v0.14.7
3333
hooks:
3434
- id: ruff
3535
args: [--fix]
@@ -57,13 +57,13 @@ repos:
5757
args: [--fix]
5858

5959
- repo: https://github.com/asottile/pyupgrade
60-
rev: v3.20.0
60+
rev: v3.21.2
6161
hooks:
6262
- id: pyupgrade
6363
args: [--py310-plus]
6464

6565
- repo: https://github.com/pre-commit/mirrors-mypy
66-
rev: v1.17.1
66+
rev: v1.19.0
6767
hooks:
6868
- id: mypy
6969
additional_dependencies:

CHANGELOG.md

Lines changed: 96 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,97 @@
11
# Changelog
22

3+
## v0.6.7 (December 2025)
4+
5+
Another patch release with several UI usability improvements, with highlights including:
6+
7+
- Migration from TinyMCE to TipTap for all free text editors, which features mermaid diagram editing, cross-referencing and markdown support.
8+
- QR codes can now be generated for samples that give public access to sample data to those that scan them.
9+
- Multiple electrochemical cycling files can now be plotted alongside one another in "comparison mode" for the echem block.
10+
- Clicking on the sample table will now open in the current tab by default, with modified click opening in a new tab.
11+
- The media data block now supports SVG files for vector graphics and plots.
12+
- Rule-based chemical formula formatting has been expanded to cover more cases.
13+
- Admins can now assign managers to users through the UI alone, and will now receive email notifications when a user registers, plus users can now verify their contact email addresses via magic links.
14+
- Email authentication no longer requires a global allow list of domains.
15+
16+
### What's Changed
17+
18+
* Migrate from TinyMCE to TipTap by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1349
19+
* Fix modal scrolling for large content by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1446
20+
* Add client-side auth helper for that delays requests until authorised by @ml-evs in https://github.com/datalab-org/datalab/pull/1449
21+
* Add persistent per-item access tokens that can be used in QR codes by @ml-evs in https://github.com/datalab-org/datalab/pull/1220
22+
* Switch access token generating scheme to `secrets.token_urlsafe(16)` by @ml-evs in https://github.com/datalab-org/datalab/pull/1452
23+
* Add support for sanitized SVGs in media block by @ml-evs in https://github.com/datalab-org/datalab/pull/1464
24+
* Reset DataTable page on refresh by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1460
25+
* Enhanced chemical formula formatting by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1445
26+
* Add minimum resizable column width based on header content by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1444
27+
* Added manager to the admin dashboard by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1352
28+
* Unify tooltip styling and add block version display by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1454
29+
* Improvements to email-based authentication and notifications by @ml-evs in https://github.com/datalab-org/datalab/pull/1457
30+
* Add comparison mode for the echem block by @be-smith in https://github.com/datalab-org/datalab/pull/1353
31+
* Allow normal click to open items in same tab from table by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1468
32+
33+
34+
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.6...v0.6.7
35+
36+
## v0.6.6 (November 2025)
37+
38+
This patch release includes several quality-of-life changes (asynchronous loading of item relationships, filtering by date in the sample table, chemical formula formatting, block plotting improvements), as well as new block options (*in situ* XRD, extensions to FTIR to Shimazdu output files), in preparation for the upcoming 0.7.0 release.
39+
40+
### What's Changed
41+
42+
* Make relationship graph loading asynchronous by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1388
43+
* Add *in situ* XRD block that can handle temperature and electrochemical data by @be-smith in https://github.com/datalab-org/datalab/pull/1287
44+
* Log more informative block errors by @jdbocarsly in https://github.com/datalab-org/datalab/pull/1393
45+
* Server Dockerfile fixes for `arm64` architecture by @DianaAliabieva in https://github.com/datalab-org/datalab/pull/1407
46+
* Clear items before inserting example data to avoid regex search matching a random ID by @ml-evs in https://github.com/datalab-org/datalab/pull/1416
47+
* Add Cypress e2e tests with authenticated user login via magic links by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1379
48+
* Minor improvements to the XRD-insitu block front end by @be-smith in https://github.com/datalab-org/datalab/pull/1412
49+
* Added .csv option to echem block and bumped navani version number by @be-smith in https://github.com/datalab-org/datalab/pull/1397
50+
* Fix dialog boxes font consistency by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1428
51+
* Add calendar date filtering to Datatable by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1422
52+
* Improving formatting of valid chemical formulae by @ml-evs in https://github.com/datalab-org/datalab/pull/1121
53+
* Truncate dialog message when deleting many samples by @ml-evs in https://github.com/datalab-org/datalab/pull/1425
54+
* Constrain which block fields can be set from web requests and saved in db by @ml-evs in https://github.com/datalab-org/datalab/pull/1421
55+
* Update funding/contributor information in README.md by @ml-evs in https://github.com/datalab-org/datalab/pull/1438
56+
* Add Shimazdu file loader for FTIR block by @be-smith in https://github.com/datalab-org/datalab/pull/1413
57+
* Block plotting improvements: ability to hide points, larger plots, external legends by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1263
58+
59+
60+
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.5...v0.6.6
61+
62+
## v0.6.5 (October 2025)
63+
64+
This patch releases includes several quality-of-life improvements and bug fixes,
65+
including improvements to full-text search, file permissions and the
66+
item relationship graph.
67+
68+
### What's Changed
69+
70+
* Improve regex item search: implict word boundaries, chaining and literal matches by @ml-evs in https://github.com/datalab-org/datalab/pull/1338
71+
* Adjust file permissions so block permission gives equivalent access by @ml-evs in https://github.com/datalab-org/datalab/pull/1376
72+
* Remove name reset in CreateItemModal by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1369
73+
* Item graph display too many items by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1367
74+
* Allow item creation endpoints to use `PUT` by @ml-evs in https://github.com/datalab-org/datalab/pull/1387
75+
* Adding file-size in the filelist by @DianaAliabieva in https://github.com/datalab-org/datalab/pull/1380
76+
* Add support for PSTrace EIS output txt files by @ml-evs in https://github.com/datalab-org/datalab/pull/1383
77+
* Fix collection creation modal error display for duplicate IDs by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1382
78+
79+
### New Contributors
80+
81+
* @DianaAliabieva made their first contribution in https://github.com/datalab-org/datalab/pull/1380
82+
83+
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.4...v0.6.5
84+
385
## v0.6.4 (September 2025)
486

587
This patch release simply fixes a few UI bugs introduced in v0.6.3 (and earlier).
688
It also signifies the adoption of the Contributor Covenant Code of Conduct (v2).
789

890
### What's Changed
991

10-
* Broken admin dashboard UI for user management by @ml-evs in #1361
11-
* Inability to insert new items created via copying into a collection by @BenjaminCharmes in #1356
12-
* Long message dialog box formatting by @BenjaminCharmes in #1346
92+
* Broken admin dashboard UI for user management by @ml-evs in https://github.com/datalab-org/datalab/pull/1361
93+
* Inability to insert new items created via copying into a collection by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1356
94+
* Long message dialog box formatting by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1346
1395

1496
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.3...v0.6.4
1597

@@ -22,25 +104,25 @@ This patch release primarily improves block serialization performance and extens
22104
23105
### What's Changed
24106

25-
* Major refactoring of block life cycle, with better possibilities for validation of block data before and after saving by @ml-evs in #1311
26-
* Replace browser-native dialogs with custom datalab dialog service by @BenjaminCharmes in #1212
27-
* Resolve CVEs on mermaid.js and cross-spawn by @dependabot[bot] in #1317
28-
* Hardened `SECRET_KEY` configuration by @ml-evs in #1324
29-
* Improve performance and memory utilisation when serialising blocks by @ml-evs in #1329
30-
* Improve performance of XRD block file reader by @ml-evs in #1331
31-
* Enable electrochemistry block to read multiple files and stitch them together by @be-smith in #1307
32-
* Fix issue with chat block rendering introduced in v0.6.2 by @ml-evs in #1340.
33-
* Fix case sensitivity of TIF file handling in media block by @ml-evs in #1326.
107+
* Major refactoring of block life cycle, with better possibilities for validation of block data before and after saving by @ml-evs in https://github.com/datalab-org/datalab/pull/1311
108+
* Replace browser-native dialogs with custom datalab dialog service by @BenjaminCharmes in https://github.com/datalab-org/datalab/pull/1212
109+
* Resolve CVEs on mermaid.js and cross-spawn by @dependabot[bot] in https://github.com/datalab-org/datalab/pull/1317
110+
* Hardened `SECRET_KEY` configuration by @ml-evs in https://github.com/datalab-org/datalab/pull/1324
111+
* Improve performance and memory utilisation when serialising blocks by @ml-evs in https://github.com/datalab-org/datalab/pull/1329
112+
* Improve performance of XRD block file reader by @ml-evs in https://github.com/datalab-org/datalab/pull/1331
113+
* Enable electrochemistry block to read multiple files and stitch them together by @be-smith in https://github.com/datalab-org/datalab/pull/1307
114+
* Fix issue with chat block rendering introduced in v0.6.2 by @ml-evs in https://github.com/datalab-org/datalab/pull/1340.
115+
* Fix case sensitivity of TIF file handling in media block by @ml-evs in https://github.com/datalab-org/datalab/pull/1326.
34116

35117
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.2...v0.6.3
36118

37119
## v0.6.2 (August 2025)
38120

39-
This patch release adds a hotfix for broken media blocks when encoding TIF files (#1318).
121+
This patch release adds a hotfix for broken media blocks when encoding TIF files (https://github.com/datalab-org/datalab/pull/1318).
40122

41123
#### What's Changed
42124

43-
* Fix serialisation of block data with nested file IDs in data model by @ml-evs in #1319
125+
* Fix serialisation of block data with nested file IDs in data model by @ml-evs in https://github.com/datalab-org/datalab/pull/1319
44126

45127
**Full Changelog**: https://github.com/datalab-org/datalab/compare/v0.6.1...v0.6.2
46128

0 commit comments

Comments
 (0)