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.7.6.tar.gz (60.2 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.7.6-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_csle_cyborg-0.7.6.tar.gz
  • Upload date:
  • Size: 60.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for gym_csle_cyborg-0.7.6.tar.gz
Algorithm Hash digest
SHA256 89186dcf92b9dac2abdae1e1cb206143e0e95875f8123db4848a390a698033d0
MD5 8c514d0ec5f09d138b62747b5bf76190
BLAKE2b-256 a1116b80b9ac51afacc096665cc38c9fd0bc01ee646cfb50b73b2faf40cd1378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gym_csle_cyborg-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 37f22e15a2aa9a4bae828fd73927c9494bcf0a78862b45f4a603169d8acdf19a
MD5 ceabef815fc18b24fa405c46341c6543
BLAKE2b-256 0cb0db8fdfbb60a954f9657d933378c3e9d991659c3d32f2d3d4f40deb159c97

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

0.8.6

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

This release

0.7.6 This release

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