Skip to content

Commit 12b7729

Browse files
authored
Merge pull request #1131 from semanticarts/migrationREADME-updates
Fix minor nits in migration README
2 parents 1533a66 + 285c410 commit 12b7729

File tree

3 files changed

+58
-44
lines changed

3 files changed

+58
-44
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
*_webDownload/
33
.DS_Store
44
*.orig
5+
**/*venv
56
catalog-v001.xml

bundle.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ actions:
290290
target: "{output}/migration/v13.0/"
291291
includes:
292292
- "*.md"
293+
- action: "move"
294+
message: "Patching documentation links in gist 13.0 HTML migration documentation."
295+
source: "{output}/migration/v13.0/"
296+
target: "{output}/migration/v13.0/"
297+
includes:
298+
- "*.html"
299+
# Replaces ./*.md local links with ./*.html
300+
replace:
301+
from: "(?:docs|documentation)/(.*)\\.md"
302+
to: "../../documentation/\\g<1>.html"
293303
- action: "move"
294304
message: "Patching local links in gist 13.0 HTML migration documentation."
295305
source: "{output}/migration/v13.0/"
@@ -298,5 +308,6 @@ actions:
298308
- "*.html"
299309
# Replaces ./*.md local links with ./*.html
300310
replace:
301-
from: "./(.*)\\.md"
302-
to: "./\\g<1>.html"
311+
from: "\\./(\\w*)\\.md"
312+
to: "\\g<1>.html"
313+

migration/v13.0/README.md

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This file gives a quick overview of using the migration utilities provided
44
by the gist team to help migrate from the previous version of gist.
55

6-
> See also additional documentation in the file `../../docs/MajorVersionMigration.md`.
6+
> See also additional documentation in the [Major Version Migration](../../docs/MajorVersionMigration.md).
77
88
## Important Remarks
99

@@ -23,26 +23,23 @@ All of our migration tools are SPARQL queries.
2323

2424
The following directory structure holds the migration scripts:
2525

26-
```
27-
.
28-
└── queries/
29-
30-
├── action/
31-
│ ├── default/
32-
│ │ └── *.rq
33-
│ └── ngraphs/
34-
│ └── *.rq
35-
36-
├── report/
37-
│ ├── default/
38-
│ │ └── *.rq
39-
│ └── ngraphs/
40-
│ └── *.rq
41-
42-
└── uom_queries/
43-
└── *.rq
44-
45-
```
26+
.
27+
└── queries/
28+
29+
├── action/
30+
│ ├── default/
31+
│ │ └── *.rq
32+
│ └── ngraphs/
33+
│ └── *.rq
34+
35+
├── report/
36+
│ ├── default/
37+
│ │ └── *.rq
38+
│ └── ngraphs/
39+
│ └── *.rq
40+
41+
└── uom_queries/
42+
└── *.rq
4643

4744
The `./queries/` directory contains the following directories:
4845

@@ -66,42 +63,47 @@ The action and report directories each contain the following two directories:
6663

6764
These migration scripts are meant to be run using the open source `onto_tool`
6865
program. Information about onto_tool and how to install it, is available at
69-
[github](https://github.com/semanticarts/ontology-toolkit).
66+
[PyPi](https://pypi.org/project/onto-tool).
7067

7168
## Run on local files
7269

7370
> Note: A known limitation of `onto_tool` is that it does not support named graphs when run against local files. It does support named graphs when run against a SPARQL endpoint.
7471
75-
1. Starting in this directory, put source data files in the `./input/` directory (the sample data can be removed). See the onto_tool documentation for which file formats are supported.
72+
1. Starting in this directory, either place source data files in the `./input/` directory or point the script at the location of your data via `-v input` flag (see example below). See the onto_tool documentation for which file formats are supported.
7673

77-
> The `migrate_local.yaml` file currently looks in the `./input/` directory for `*.owl` and `*.ttl` files. If other formats are supported and you plan to use them, you will need to update the yaml.
74+
> * The `migrate_local.yaml` file currently looks in the input directory for `*.owl` and `*.ttl` files. If other formats are supported and you plan to use them, you will need to update the yaml.
75+
> * The script will only transform RDF data files at the top level of the input directory, and will not recursively descend into sub-directories. Invoke the script multiple times with different directories specified via the `-v input` flag as needed.
7876
79-
2. Execute the following command:
77+
2. Execute the following command for the default `./input` director:
8078

8179
```shell
8280
onto_tool bundle migrate_local.yaml
8381
```
8482

85-
3. `onto_tool` will output to STDOUT, you should see something like the following (this is the output from the sample data included in the `./input/` directory):
83+
or with a custom input directory:
8684

85+
```shell
86+
onto_tool bundle -v input <directory of RDF data> migrate_local.yaml
8787
```
88-
INFO:root:Rename properties in named graphs.
89-
INFO:root:Replace address classes in named graphs.
90-
INFO:root:Replace properties with inverses in named graphs.
91-
INFO:root:Use new gist:offers property in named graphs (script 1).
92-
INFO:root:Use new gist:offers property in named graphs (script 2).
93-
INFO:root:Rename properties in named graphs.
94-
INFO:root:Replace address classes in named graphs.
95-
INFO:root:Replace properties with inverses in named graphs.
96-
INFO:root:Use new gist:offers property in named graphs (script 1).
97-
INFO:root:Use new gist:offers property in named graphs (script 2).
98-
INFO:root:Check the named graphs for other items that should be reviewed.
99-
INFO:root:Check named graphs for other items that should be reviewed.
100-
```
10188

102-
- Output files will be created in the `./output/` directory.
89+
3. `onto_tool` will output to STDOUT, you should see something like the following:
90+
91+
INFO:root:Rename properties in named graphs.
92+
INFO:root:Replace address classes in named graphs.
93+
INFO:root:Replace properties with inverses in named graphs.
94+
INFO:root:Use new gist:offers property in named graphs (script 1).
95+
INFO:root:Use new gist:offers property in named graphs (script 2).
96+
INFO:root:Rename properties in named graphs.
97+
INFO:root:Replace address classes in named graphs.
98+
INFO:root:Replace properties with inverses in named graphs.
99+
INFO:root:Use new gist:offers property in named graphs (script 1).
100+
INFO:root:Use new gist:offers property in named graphs (script 2).
101+
INFO:root:Check the named graphs for other items that should be reviewed.
102+
INFO:root:Check named graphs for other items that should be reviewed.
103+
104+
- Output files will be created in the `./output/` directory. The location can be overriden by specifying `-v output <existing directory for output>`.
103105

104-
- Report files will be created in the `./reports/` directory.
106+
- Report files will be created in the `./reports/` directory. The location can be overriden by specifying `-v report <existing directory for report>`.
105107

106108
## Run Against SPARQL Endpoint
107109

@@ -124,7 +126,7 @@ onto_tool bundle -v user <USER> -v password <PWD>
124126
- replaceAddressClasses replaces `gist:EmailAddress` with `gist:ElectronicAddress`
125127
- replaceAddressClasses replaces `gist:StreetAddress` with `gist:PhysicalAddress`
126128

127-
The different types and uses of addresses can be modeled as categories; see [the address migration documentation(AddressMigration.md) as well as the [full documentation of the new address model](/docs/model_documentation/AddressGuidance.md).
129+
The different types and uses of addresses can be modeled as categories; see [the address migration documentation](./AddressMigration.md) as well as the [full documentation of the new address model](../../docs/models/AddressGuidance.md).
128130

129131
- replacePropertiesWithInverses replaces `gist:hasPart` with `gist:isPartOf`
130132
- useOffersProperty (scripts 1 and 2) replaces `gist:hasPart` with `gist:offers` in the context of an offer

0 commit comments

Comments
 (0)