Skip to content

Commit 069e365

Browse files
committed
Upgrade h5grove to v3.0.0rc1
1 parent b60e10b commit 069e365

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

packages/app/src/providers/h5grove/h5grove-api.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
const SUPPORTED_EXPORT_FORMATS = new Set<ExportFormat>(['npy', 'tiff']);
3535

3636
export class H5GroveApi extends DataProviderApi {
37-
/* API compatible with h5grove@2.3.0 */
37+
/* API compatible with h5grove@3.0.0rc1 */
3838
public constructor(
3939
private readonly baseURL: string,
4040
filepath: string,
@@ -46,7 +46,7 @@ export class H5GroveApi extends DataProviderApi {
4646

4747
public override async getEntity(path: string): Promise<ProvidedEntity> {
4848
try {
49-
const buffer = await this.fetcher(`${this.baseURL}/meta/`, {
49+
const buffer = await this.fetcher(`${this.baseURL}/meta`, {
5050
file: this.filepath,
5151
path,
5252
});
@@ -65,7 +65,7 @@ export class H5GroveApi extends DataProviderApi {
6565
const { dataset, selection } = storeParams;
6666
const { path, type } = dataset;
6767

68-
const url = `${this.baseURL}/data/`;
68+
const url = `${this.baseURL}/data`;
6969
const opts = { abortSignal, onProgress };
7070
const baseParams = {
7171
file: this.filepath,
@@ -109,7 +109,7 @@ export class H5GroveApi extends DataProviderApi {
109109
}
110110

111111
try {
112-
const data = await this.fetcher(`${this.baseURL}/attr/`, {
112+
const data = await this.fetcher(`${this.baseURL}/attr`, {
113113
file: this.filepath,
114114
path,
115115
});
@@ -156,12 +156,12 @@ export class H5GroveApi extends DataProviderApi {
156156
...(selection && { selection }),
157157
});
158158

159-
return new URL(`${this.baseURL || ''}/data/?${searchParams.toString()}`);
159+
return new URL(`${this.baseURL || ''}/data?${searchParams.toString()}`);
160160
}
161161

162162
public override async getSearchablePaths(path: string): Promise<string[]> {
163163
try {
164-
const buffer = await this.fetcher(`${this.baseURL}/paths/`, {
164+
const buffer = await this.fetcher(`${this.baseURL}/paths`, {
165165
file: this.filepath,
166166
path,
167167
});

packages/app/src/providers/h5grove/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export interface H5GroveTimeType extends H5GroveBaseType {
9494
export interface H5GroveStringType extends H5GroveBaseType {
9595
class: 3;
9696
cset: number;
97-
strPad?: number; // optional for backwards compatibility with h5grove <= 2.1.0
97+
strPad: number;
9898
vlen: boolean;
9999
}
100100

packages/app/src/providers/h5grove/utils.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ describe('parseDType', () => {
4141

4242
it('should convert string types', () => {
4343
expect(
44-
parseDType({ class: 3, size: 6, cset: 0, vlen: false }),
44+
parseDType({ class: 3, size: 6, cset: 0, strPad: 0, vlen: false }),
4545
).toStrictEqual(strType(H5T_CSET.ASCII, undefined, 6));
4646
expect(
47-
parseDType({ class: 3, size: 6, cset: 0, vlen: true }),
47+
parseDType({ class: 3, size: 6, cset: 0, strPad: 0, vlen: true }),
4848
).toStrictEqual(strType(H5T_CSET.ASCII));
4949
expect(
5050
parseDType({ class: 3, size: 6, cset: 1, strPad: 1, vlen: false }),
5151
).toStrictEqual(strType(H5T_CSET.UTF8, H5T_STR.NULLPAD, 6));
5252
expect(
53-
parseDType({ class: 3, size: 6, cset: 1, vlen: true }),
53+
parseDType({ class: 3, size: 6, cset: 1, strPad: 0, vlen: true }),
5454
).toStrictEqual(strType(H5T_CSET.UTF8));
5555
});
5656

support/h5grove/poetry.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

support/h5grove/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "h5grove tornado server for testing purposes"
55
authors = [{name = "ESRF"}]
66
requires-python = ">=3.12"
77
dependencies = [
8-
"h5grove[tornado] (==2.3.0)",
8+
"h5grove[tornado] (==3.0.0rc1)",
99
"typing-extensions (~=4.10)"
1010
]
1111

0 commit comments

Comments
 (0)