Skip to content

Commit 7739f4d

Browse files
committed
Updated snippet runners to find new data directory and updated README.md's for SENZING_PATH
1 parent 84c116d commit 7739f4d

File tree

6 files changed

+603
-324
lines changed

6 files changed

+603
-324
lines changed

csharp/README.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@ Before attempting to build the snippets you will need to make the make the
99
`Senzing.Sdk.[version].nupkg` file available to the `dotnet` executable so
1010
it can be used as a dependency. This is done via these [instructions](https://github.com/senzing-garage/sz-sdk-csharp/blob/main/README.md#Usage).
1111

12+
Further, you will need to set environment variables so the Senzing installation can be located:
13+
14+
- Linux:
15+
16+
```console
17+
export SENZING_PATH=/opt/senzing/
18+
export LD_LIBRARY_PATH=$SENZING_PATH/er/lib:$LD_LIBRARY_PATH
19+
```
20+
21+
- macOS:
22+
23+
```console
24+
export SENZING_PATH=$HOME/senzing
25+
export DYLD_LIBRARY_PATH=$SENZING_PATH/er/lib:$SENZING_PATH/er/lib/macos:$DYLD_LIBRARY_PATH
26+
```
27+
28+
- Windows:
29+
30+
```console
31+
set SENZING_PATH=%USERPROFILE%\senzing
32+
set Path=%SENZING_PATH%\er\lib;%Path%
33+
```
34+
1235
## Building
1336

1437
The C# snippets can built using the `dotnet build [project-name]` command under each directory. They can be run using `dotnet run --project [project-name]` command. Attempting to run a snippet will also trigger building it.
@@ -23,22 +46,21 @@ You may run any individual Snippet class directly providing you have a Senzing r
2346

2447
1. Run a snippet that takes no command-line arguments.
2548

26-
```[shell]
49+
```console
2750
cd snippets
2851
dotnet run --project loading/LoadRecords
2952
```
3053

3154
2. Run a snippet and override the input file using command-line arguments
3255

33-
```[shell]
56+
```console
3457
dotnet run --project loading/LoadRecordsViaLoop ../../resources/data/load-500-with-errors.jsonl
3558
```
3659

3760
### Run via Runner
3861

3962
The `SnippetRunner` project will run one or more snippets for you and create a temporary Senzing repository to run then against. This can be executed using:
40-
41-
```[shell]
63+
```console
4264
cd runner
4365
dotnet run --project SnippetRunner
4466
```
@@ -47,42 +69,42 @@ The `SnippetRunner` project will run one or more snippets for you and create a t
4769

4870
1. Execute all code snippets:
4971

50-
```[shell]
72+
```console
5173
cd runner
5274
dotnet run --project SnippetRunner all
5375
```
5476

5577
2. Execute all code snippets in a group:
5678

57-
```[shell]
79+
```console
5880
cd runner
5981
dotnet run --project SnippetRunner loading
6082
```
6183

6284
3. Execute all code snippets from multiple groups:
6385

64-
```[shell]
86+
```console
6587
cd runner
6688
dotnet run --project SnippetRunner loading redo
6789
```
6890

6991
4. Execute specific code snippets:
7092

71-
```[shell]
93+
```console
7294
cd runner
7395
dotnet run --project SnippetRunner loading.LoadViaLoop loading.LoadViaQueue
7496
```
7597

7698
5. Mix and match packages with individual snippets:
7799

78-
```[shell]
100+
```console
79101
cd runner
80102
dotnet run --project SnippetRunner redo loading.LoadViaLoop
81103
```
82104

83105
6. Generate a help message by specifying no arguments:
84106

85-
```[shell]
107+
```console
86108
cd runner
87109
dotnet run --project SnippetRunner
88110

0 commit comments

Comments
 (0)