Skip to main content

gym-csle-cyborg

An OpenAI gym reinforcement learning environment API for the CybORG environment

PyPI version PyPI - Downloads

Requirements

  • Python 3.8+
  • csle-base
  • csle-common
  • csle-attacker
  • csle-defender
  • csle-collector
  • gymnasium for specifying the RL environment API

Development Requirements

  • Python 3.8+
  • flake8 (for linting)
  • flake8-rst-docstrings (for linting docstrings)
  • tox (for automated testing)
  • pytest (for unit tests)
  • pytest-cov (for unit test coverage)
  • pytest-mock (for mocking tests)
  • pytest-grpc (for grpc tests)
  • mypy (for static typing)
  • mypy-extensions (for static typing)
  • mypy-protobuf (for static typing)
  • types-PyYaml (for static typing)
  • types-paramiko (for static typing)
  • types-protobuf (for static typing)
  • types-requests (for static typing)
  • types-urllib3 (for static typing)
  • sphinx (for API documentation)
  • sphinxcontrib-napoleon (for API documentation)
  • sphinx-rtd-theme (for API documentation)

Installation

# install from pip
pip install gym-csle-cyborg==<version>
# local install from source
$ pip install -e gym-csle-cyborg
# or (equivalently):
make install
# force upgrade deps
$ pip install -e gym-csle-cyborg --upgrade
# git clone and install from source
git clone https://github.com/Limmen/csle
cd csle/simulation-system/libs/gym-csle-cyborg
pip3 install -e .
# Install development dependencies
$ pip install -r requirements_dev.txt

Development tools

Install all development tools at once:

make install_dev

or

pip install -r requirements_dev.txt

API documentation

This section contains instructions for generating API documentation using sphinx.

Latest Documentation

The latest documentation is available at https://limmen.dev/csle/docs/gym-csle-cyborg

Generate API Documentation

First make sure that the CSLE_HOME environment variable is set:

echo $CSLE_HOME

Then generate the documentation with the commands:

cd docs
sphinx-apidoc -f -o source/ ../src/gym_csle_cyborg/
make html

To update the official documentation at https://limmen.dev/csle, copy the generated HTML files to the documentation folder:

cp -r build/html ../../../../docs/_docs/gym-csle-cyborg

To run all documentation commands at once, use the command:

make docs

Static code analysis

To run the Python linter, execute the following command:

flake8 .
# or (equivalently):
make lint

To run the mypy type checker, execute the following command:

mypy .
# or (equivalently):
make types

Unit tests

To run the unit tests, execute the following command:

pytest
# or (equivalently):
make unit_tests

To run tests of a specific test suite, execute the following command:

pytest -k "ClassName"

To generate a coverage report, execute the following command:

pytest --cov=gym_csle_cyborg

Run tests and code analysis in different python environments

To run tests and code analysis in different python environemnts, execute the following command:

tox
# or (equivalently):
make tests

Create a new release and publish to PyPi

First build the package by executing:

python3 -m build
# or (equivalently)
make build

After running the command above, the built package is available at ./dist.

Push the built package to PyPi by running:

python3 -m twine upload dist/*
# or (equivalently)
make push

To run all commands for the release at once, execute:

make release

Author & Maintainer

Kim Hammar kimham@kth.se

Copyright and license

LICENSE

Creative Commons

(C) 2020-2025, Kim Hammar

Download files

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

Source Distribution

gym_csle_cyborg-0.8.6.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

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

gym_csle_cyborg-0.8.6-py3-none-any.whl (52.6 kB view details)

Uploaded Python 3

File details

Details for the file gym_csle_cyborg-0.8.6.tar.gz.

File metadata

  • Download URL: gym_csle_cyborg-0.8.6.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for gym_csle_cyborg-0.8.6.tar.gz
Algorithm Hash digest
SHA256 fb5b507ac470910dea46eeb4636bcb9593554181b0dbf778b6f4a432f668b23a
MD5 676341e5c4364945cb0ca2aaaad80878
BLAKE2b-256 b46929e79b7657e13c2cdb4fdaba912b94366238484c2cf7eee24966427d623a

See more details on using hashes here.

File details

Details for the file gym_csle_cyborg-0.8.6-py3-none-any.whl.

File metadata

File hashes

Hashes for gym_csle_cyborg-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1fcbd9bcd706e87f4ad5605611c9f35cb3f895bb68ca0801f4f67e1552d929a9
MD5 3cf4261af05c6ef22926ac0635a1da64
BLAKE2b-256 10b9c85b4cb7e7079ef117d313e0f2112e97031e69ae8ee35e82a6f3930a8e8d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.10.0

2 files

0.9.46

2 files

0.9.45

2 files

0.9.44

2 files

0.9.43

2 files

0.9.42

2 files

0.9.41

2 files

0.9.40

2 files

0.9.39

2 files

0.9.38

2 files

0.9.37

2 files

0.9.36

2 files

0.9.35

2 files

0.9.34

2 files

0.9.33

2 files

0.9.32

2 files

0.9.31

2 files

0.9.30

2 files

0.9.29

2 files

0.9.28

2 files

0.9.27

2 files

0.9.26

2 files

0.9.25

2 files

0.9.24

2 files

0.9.23

2 files

0.9.22

2 files

0.9.21

2 files

0.9.20

2 files

0.9.19

2 files

0.9.18

2 files

0.9.17

2 files

0.9.16

2 files

0.9.15

2 files

0.9.14

2 files

0.9.13

2 files

0.9.12

2 files

0.9.11

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.7

2 files

This release

0.8.6 This release

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.14

2 files

0.4.13

2 files

0.4.12

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page