From eaf012fae233acc55cf788e12e0c41b060a9e950 Mon Sep 17 00:00:00 2001 From: abdullah-cognite <100700755+abdullah-cognite@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:06:40 +0100 Subject: [PATCH 1/2] Add instructions to README --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7accb3de..8187ac9b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,44 @@ Cognite Simulator Integration Utils [![codecov](https://codecov.io/gh/cognitedata/dotnet-simulator-utils/branch/main/graph/badge.svg?token=sr1aNhkc1e)](https://codecov.io/gh/cognitedata/dotnet-simulator-utils) [![Nuget](https://img.shields.io/nuget/vpre/Cognite.Simulator.Extensions)](https://www.nuget.org/packages/Cognite.Simulator.Extensions/) -Utilities for developing simulator integrations within CDF +Utilities for developing simulator integrations within CDF. This contains extendable common utilities that can be used by simulator connectors to interact with CDF APIs and the simulator. + +# Getting started + +To build a new connector based upon these utilities, just add a reference to this library in your project's csproj file: + +`` (Locks to version 1.0.0-alpha-021) + +[Latest version can be obtained from Nuget](https://www.nuget.org/packages/Cognite.Simulator.Utils/) + +# For local development + +Clone this repo locally then add a reference to a local version of this repository to your `csproj` file: + +```` + + + +```` + +After this run `dotnet build` in your project folder. Next start extending existing utilities in your project. [Use the DWSIM project as an example](https://github.com/cognitedata/dwsim-connector-dotnet). + +# Running Tests + +Create an `.envrc` file containing the CDF connection credentials. The file's format should be : + +```` +export COGNITE_HOST="" #Example: https://westeurope-1.cognitedata.com +export COGNITE_PROJECT="" #Example: cognite-simulator-integration +export AZURE_TENANT="" +export AZURE_CLIENT_ID="" +export AZURE_CLIENT_SECRET="" + +```` + +Then run a `source .envrc` to load the environment variables into your current terminal session + +Finally, run `dotnet test` # Code of Conduct From 160f3aef6157bcbf758fc701c4735e7d6fb42556 Mon Sep 17 00:00:00 2001 From: abdullah-cognite <100700755+abdullah-cognite@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:55:49 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8187ac9b..8b8ed3a2 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Utilities for developing simulator integrations within CDF. This contains extend To build a new connector based upon these utilities, just add a reference to this library in your project's csproj file: -`` (Locks to version 1.0.0-alpha-021) +`dotnet add package Cognite.Simulator.Utils` [Latest version can be obtained from Nuget](https://www.nuget.org/packages/Cognite.Simulator.Utils/)