Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to README #98

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

`dotnet add package Cognite.Simulator.Utils`

[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:

````
<ItemGroup>
<ProjectReference Include="../../dotnet-simulator-utils/Cognite.Simulator.Utils/Cognite.Simulator.Utils.csproj" />
</ItemGroup>
````

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).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make dwsim connector a public repo?


# 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

Expand Down
Loading