Skip to main content

Skyprospector by Cepro

Project description

Skypro

Skypro is a collection of simulation and reporting tools for microgrids.

Simulation CLI tool

The Skypro simulator can project microgrid behaviours, costs and revenues. This tool is run on the command line using skypro simulate. See src/skypro/commands/simulator/README.md for more information.

Reporting CLI tool

The Skypro reporting tool collates data to documents and analyse real-world performance of microgrids. This tool is run on the command line using skypro report. See src/skypro/commands/report/README.md for more information.

Reporting web app - DEPRECATED

The Skypro reporting web app makes reporting results accessible to non-cli users. It is now deprecated. This is run using Streamlit. See src/skypro/reporting_webapp/README.md for more information.

Rates and energy flows

Information about the costs and revenues associated with using power are fundamental to the codebase and a high-level understanding of how they are modelled is important for interpreting results. See src/skypro/common/rates/README.md for a background on how rates and energy flows are modelled in the codebase.

Environment configuration

Skypro uses a JSON 'environment file' to contain general directory configurations as well as secrets. By default Skypro looks for the environment file in ~/.simt/env.json, but the location can be customised with the --env command line option.

The structure of this file should be as follows:

{
    "vars": {
        "DIR_SHORTCUT_1": "/path/to/some/working/directory",
        "DIR_SHORTCUT_2": "/path/to/another/working/directory"
    },
    "flows": {
      "dbUrl": "url-with-credentials-for-the-flows-database"
    },
    "flux": {
      "dbUrl": "url-with-credentials-for-the-flux-database",
      "schema": "flux"
    },
    "rates": {
      "dbUrl": "url-with-credentials-for-the-rates-database"
    }
}

The vars section allows you to define arbitrary variables that are resolved in configuration file paths. For example, if you're configuring a simulation run and all the load profiles are in a certain directory, then you could configure a variable like "PROFILE_DIR": "~/myprofiles", and then anywhere you use $PROFILE_DIR in the configuration it will be resolved appropriately.

The flows section configures how to access the Flows database - this is only used if Skypro is configured to pull data from the Flows database (e.g., plot meter readings).

The flux section (added in v2.0.0) configures how to access the Flux database - this is used for meter readings, BESS readings, and market data. The optional schema field defaults to "flux". For legacy databases where all data is in the flows schema, set "schema": "flows".

The rates section configures how to access the Rates database - this is only used if Skypro is configured to pull data from a Rates database.

Installation

pip install --upgrade skypro

Development

Running tests

To run the tests: PYTHONPATH=src python -m unittest discover --start-directory src

Some of the tests akin to integration tests which run a whole simulation and check the results. To run an individual integration test directly: simulate --env src/tests/integration/fixtures/env.json --config src/tests/integration/fixtures/config.yaml -y --sim integrationTestPerfectHindsightLP

Publishing to PyPI

To publish a release to PyPI:

  1. Make your code changes
  2. Update the semver version number in pyproject.toml
  3. Commit to git and push
  4. Run poetry build and observe the new version number
  5. Run poetry publish to publish

If this is your first time publishing then configure your PyPI token: poetry config pypi-token.pypi pypi-YYYYYYYY using an API token from your account on pypi.org.

Publishing feature branches to Test PyPI

To publish a feature branch for testing before merging:

  1. Update version in pyproject.toml with a pre-release suffix (e.g., 2.1.0a1)
  2. Run poetry build
  3. Run poetry publish -r test-pypi to publish

Users can install test versions with:

pip install --extra-index-url https://test.pypi.org/simple/ skypro==2.1.0a1

First-time Test PyPI setup:

  1. poetry config repositories.test-pypi https://test.pypi.org/legacy/
  2. poetry config pypi-token.test-pypi pypi-YYYYYYYY using a token from test.pypi.org.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skypro-2.0.2.tar.gz (101.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skypro-2.0.2-py3-none-any.whl (138.0 kB view details)

Uploaded Python 3

File details

Details for the file skypro-2.0.2.tar.gz.

File metadata

  • Download URL: skypro-2.0.2.tar.gz
  • Upload date:
  • Size: 101.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for skypro-2.0.2.tar.gz
Algorithm Hash digest
SHA256 a3e8afda75159bd65b8983be46c57f03ae614685dcb75447154acc1cf5d0e836
MD5 d6695ecba3af8c6776c22f1e1137ec59
BLAKE2b-256 d5584af6cb1164ec48e43d662712bfe69cbd441cfaa29f3d2908ae4f568107fb

See more details on using hashes here.

File details

Details for the file skypro-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: skypro-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 138.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for skypro-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb9bc028b143a0462c93ffa83e4c1fdfa636a326c49c6c01ce4818d1bfcee5c7
MD5 75b8d9ab215d641e61ec89ad3c2c862f
BLAKE2b-256 6cec63d96d07a361443573306afc85fa1c9946083463b70ded1a7aa85381310b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page