Skip to content

Commit 9532522

Browse files
committed
Improve migration guide & update CHANGELOG
1 parent da8d7d1 commit 9532522

2 files changed

Lines changed: 44 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44

55
Features:
66

7-
- **Partitioned split structure:** The `--split` option now organizes concept files into subdirectories by ID range (1000 IDs per directory, e.g., `IDs0001xxx/`). This avoids GitHub UI limitations with large directories. The `--join` option supports both the new partitioned structure and the previous flat structure.
7+
- **Partitioned storage:** The `--split` option now organizes concept files into subdirectories by ID range (1000 IDs per directory, e.g., `IDs0001xxx/`). This avoids GitHub UI limitations with large directories. The `--join` option supports both the new partitioned structure and the previous flat structure. [#328](https://github.com/nfdi4cat/voc4cat-tool/pull/328)
8+
- **Namespace prefixes in RDF:** The `transform` command now uses namespace bindings/prefixes in output (as convert already did). [#327](https://github.com/nfdi4cat/voc4cat-tool/pull/327)
9+
- **Longturtle format:** Turtle files are now written in longturtle format everywhere (this was not the case in rc1/2). [#327](https://github.com/nfdi4cat/voc4cat-tool/pull/327)
10+
- **Improved `--prov-from-git`:** Git history evaluation now follows file moves/renames. [#329](https://github.com/nfdi4cat/voc4cat-tool/pull/329)
811

912
Changes:
1013

14+
- Improved migration guide and template update guide.
15+
1116
Fixes:
1217

18+
- Fix BASE declaration in vp4cat profile; allow `dct:provenance` with IRI value (Req. 2.2.2). [#325](https://github.com/nfdi4cat/voc4cat-tool/pull/325), [#326](https://github.com/nfdi4cat/voc4cat-tool/issues/326)
19+
- Fix reporting for `check --detect-hierarchy-redundancy`. [#323](https://github.com/nfdi4cat/voc4cat-tool/pull/323)
20+
- Fix openpyxl warning about worksheet selection.
21+
- Fix xlsx generation to mark only one sheet as selected.
22+
1323

1424
## Release 1.0.0 (RC2) (2025-12-27)
1525

docs/migration-to-v1.0.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ This guide explains how to migrate vocabularies created with voc4cat-tool v0.10.
88
- **ConceptScheme metadata**: No longer editable in xlsx; managed via `idranges.toml` and shown as read-only in xlsx.
99
- **RDF changes**: `skos:historyNote` converted to `skos:changeNote`.
1010
- **Excel template**: Dynamically generated based on config; no longer distributed as a static file.
11+
- **Partitioned file storage**: Files are stored in folders with at most 1000 entries named IDx0000xxx (for IDs 001 - 999), IDx0001xxx (for IDs 1000 - 1999), etc.
1112

1213
## Migration steps
1314

15+
Make sure you have a version 1.0.x of voc4cat-tool installed before
16+
1417
### Step 0: Upgrade to latest release of voc4cat-template
1518

1619
If you based your repository on voc4cat-template, update to its latest release first (See {ref}`keeping-in-sync-with-the-template`).
@@ -27,46 +30,61 @@ Start with the template from `src/voc4cat/templates/vocab/idranges.toml` and fil
2730

2831
The `idrange.toml` files now include a mandatory version number (`config_version = "v1.0"`) to help with future updates.
2932

30-
### Step 2: Convert RDF from 043 to v1.0
33+
### Step 2: Convert to new partitioned storage
34+
35+
To convert a 043 repository, join and split the vocabulary. The files may not change.
36+
This is important to make git detect this as file move.
37+
The files will only be unmodified, if NO config is passed (which would trigger prefix-substitution and a large diff).
38+
39+
```bash
40+
$ voc4cat transform --join --logfile outbox/voc4cat.log --outdir outbox vocabularies/
41+
$ voc4cat transform --split --logfile outbox/voc4cat.log --outdir vocabularies/ outbox/
42+
```
43+
44+
Next, delete all `0*.ttl` files in `vocabularies\your-vocab` (the files were re-created into the new folder structure).
45+
46+
Make sure that git detects the operation as pure file-moves, then commit.
47+
48+
### Step 3: Convert RDF from 043 to v1.0
3149

32-
**Step 2a** Convert RDF to new v1.0 format
50+
**Step 3a** Convert RDF to new v1.0 format
3351

34-
This requires a turtle file `vocab.ttl` containing the current version of the complete vocabulary.
52+
This requires a turtle file `vocab.ttl` (in old 043 format) containing the complete vocabulary.
3553

3654
```bash
3755
voc4cat convert --from 043 --config path/to/v1.0/idranges.toml --outdir outbox/ source/vocab.ttl
3856
```
3957

40-
In this step the ConceptScheme is also enriched with metadata from the config.
58+
In this step the ConceptScheme is also enriched with metadata from the new config.
4159

42-
**Step 2b**
60+
**Step 3b**
4361

44-
Split the v1.0 vocab.ttl from step 2a into individual version-tracked RDF files.
62+
Split the v1.0 vocab.ttl from step 3a into individual version-tracked RDF files.
4563

4664
```bash
47-
voc4cat transform --split --config path/to/v1.0/idranges.toml --logfile outbox/voc4cat.log -O vocabularies/ outbox/
65+
voc4cat transform --split --config path/to/v1.0/idranges.toml --logfile outbox/voc4cat.log --outdir vocabularies/ outbox/
4866
```
4967

5068
This command assumes that your version-tracked files are stored in the `vocabularies/` folder which is the default for `voc4cat-template`-based repositories.
5169

52-
**Step 2c**
70+
**Step 3c**
5371

54-
Add provenance info based on git history (dct:created and dct:updated) to the split RDF files from step 2b.
72+
Add provenance info based on git history (dct:created and dct:updated) to the split RDF files from Step 3b.
5573

5674
```bash
5775
voc4cat transform --prov-from-git --inplace --config path/to/v1.0/idranges.toml --logfile outbox/voc4cat.log vocabularies/
5876
```
5977

60-
**Step 2d**
78+
**Step 3d**
6179

62-
Create a provenance-enriched new "joined" vocab.ttl file from the individual RDF files from step 2c.
80+
Create a provenance-enriched new "joined" vocab.ttl file from the individual RDF files from Step 3c.
6381

6482
```bash
65-
voc4cat transform --join --config path/to/v1.0/idranges.toml --logfile outbox/voc4cat.log -O outbox/ vocabularies/
83+
voc4cat transform --join --config path/to/v1.0/idranges.toml --logfile outbox/voc4cat.log --outdir outbox/ vocabularies/
6684
```
6785

68-
(step-3-generate-v1-0-excel-template)=
69-
### Step 3: Generate v1.0 xlsx template
86+
(step-4-generate-v1-0-excel-template)=
87+
### Step 4: Generate v1.0 xlsx template
7088

7189
With voc4cat-tool 1.0.0, all required sheets in the xlsx template are dynamically generated.
7290

@@ -93,7 +111,7 @@ If you want to use an xlsx-template, the command to run is
93111
voc4cat convert --config path/to/v1.0/idranges.toml --template templates/your-template.xlsx --outdir outbox/ outbox/vocab.ttl
94112
```
95113

96-
### Step 4: Verify the output
114+
### Step 5: Verify the output
97115

98116
Check that in xlsx:
99117

0 commit comments

Comments
 (0)