Giter VIP home page Giter VIP logo

power-ops-sdk's Introduction

Welcome to PowerOps SDK

release Documentation Status Github PyPI Downloads GitHub Code style: black Ruff mypy

What is it?

The PowerOps SDK is a domain-specific SDK for interacting with Cognite Data Fusion (CDF) for the power operations' domain.

Main Features

  • cognite.powerops.client.PowerOpsClient used to interact with CDF in a domain-specific language.
  • Resource Sync, resync, used to sync configuration files with CDF through the CLI tool powerops.

Installation

pip install cognite-power-ops

Configuration

Configuration of the PowerOpsClient and resync is done through settings files.

Settings Files

The settings file are in .toml format. By default, the SDK will look for two settings files:

  1. settings.toml in the current directory.
  2. .secrets.toml in the current directory.

The motivation for splitting them is to avoid checking in secrets into Git.

Example of settings files:

settings.toml:

[cognite]
  login_flow = "interactive"
  project = "<cdf-project>"
  tenant_id = "<tenant-id>"
  cdf_cluster = "<cdf-cluster>"
  client_id = "<client-id>"

[powerops]
  read_dataset = "uc:000:powerops"
  write_dataset = "uc:000:powerops"
  monitor_dataset = "uc:po:monitoring"
  cogshop_version = ""

.secrets.toml

[cognite]
  client_secret = "<client-secret>"

Note: You can configure which settings files to use by setting the environment variable SETTINGS__FILES to a semicolon-separated list of file names.

import os

os.environ["SETTINGS_FILES"] = ".my_settings.toml;.secrets.my_secrets.toml"

Usage

Run Resync

See available commands:

$ powerops --help

Example of showing planned changes:

$ powerops plan tests/data/demo Dayahead

PowerOpsClient

from cognite.powerops.client import PowerOpsClient

client = PowerOpsClient.from_settings()

client.shop.runs.trigger()

For more examples, see the examples section of the documentation.

power-ops-sdk's People

Contributors

doctrino avatar juliamg avatar renovate[bot] avatar haukb avatar nodegard avatar frnhr avatar cpnat avatar ddonukis avatar katrilh avatar eriklien avatar emiliedahl avatar thomaszengaffinenmorris avatar dependabot[bot] avatar

Stargazers

Soumik Mukherjee avatar  avatar  avatar  avatar  avatar

Watchers

Louis Salin avatar Robert Collins avatar Pratuat Amatya avatar Aleksandrs Livincovs avatar Ilya petin avatar Øystein Hagen Pettersen avatar Sergei avatar Eirik L. Vullum avatar Daniel Priori avatar David Liu avatar Vibha Srinivasan avatar Robert Lombardo avatar Jacek Lakomiec avatar Paniz Parastar avatar Alireza Kandeh avatar Rogerio Saboia Júnior avatar Per Magne Florvaag avatar QuocViet Le avatar Priyanka Perera avatar Cecilie Uppard avatar Shehan Neomal Mark Fonseka avatar Waqas Javed avatar  avatar

power-ops-sdk's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-python v5
  • actions/checkout v4
  • actions/setup-python v5
  • codecov/codecov-action v4
  • actions/checkout v4
  • actions/setup-python v5
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-python v5
  • codecov/codecov-action v4
.github/workflows/resync-apply.yaml
  • actions/checkout v4
  • actions/setup-python v5
.github/workflows/resync-plan.yaml
  • actions/checkout v4
  • actions/setup-python v5
pep621
pyproject.toml
poetry
pyproject.toml
pre-commit
.pre-commit-config.yaml
  • python-poetry/poetry 1.8.3
  • codespell-project/codespell v2.3.0
  • charliermarsh/ruff-pre-commit v0.6.0
  • pre-commit/pre-commit-hooks v4.6.0
  • google/yamlfmt v0.13.0

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (local>cognitedata/renovate-config)

Typo in warning messages from WatercourseConfig

System information:

  • cognite-powerops Version: [0.8.0]

Describe the bug
In WatercourseConfig the functions "reservoir_display_name" and "reservoir_ordering_key" prints out warnings with "No ordering key for plant:".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.