From 2d1a1e6db7db02dffe410c92626349c243892f25 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Mon, 17 Jul 2023 19:28:43 +0100 Subject: [PATCH 1/2] #1631 - Added the DEFCON 703 header to all possible files --- docs/_templates/custom-class-template.rst | 4 ++++ docs/_templates/custom-module-template.rst | 4 ++++ docs/api.rst | 4 ++++ docs/conf.py | 1 + docs/index.rst | 4 ++++ docs/source/about.rst | 6 +++++- docs/source/config.rst | 4 ++++ docs/source/custom_agent.rst | 6 +++++- docs/source/dependencies.rst | 4 ++++ docs/source/getting_started.rst | 4 ++++ docs/source/glossary.rst | 4 ++++ docs/source/migration_1.2_-_2.0.rst | 4 ++++ docs/source/primaite_session.rst | 7 ++++++- src/primaite/agents/__init__.py | 1 + src/primaite/agents/agent_abc.py | 1 + src/primaite/agents/hardcoded_abc.py | 1 + src/primaite/agents/hardcoded_acl.py | 1 + src/primaite/agents/hardcoded_node.py | 1 + src/primaite/agents/rllib.py | 1 + src/primaite/agents/sb3.py | 1 + src/primaite/agents/simple.py | 1 + src/primaite/agents/utils.py | 1 + src/primaite/common/custom_typing.py | 1 + src/primaite/config/__init__.py | 1 + src/primaite/data_viz/__init__.py | 1 + src/primaite/data_viz/session_plots.py | 1 + src/primaite/environment/observations.py | 1 + src/primaite/notebooks/__init__.py | 3 ++- src/primaite/pol/__init__.py | 2 +- src/primaite/primaite_session.py | 1 + src/primaite/setup/__init__.py | 2 +- src/primaite/setup/reset_example_configs.py | 1 + src/primaite/transactions/__init__.py | 2 +- src/primaite/utils/__init__.py | 1 + src/primaite/utils/session_metadata_parser.py | 1 + src/primaite/utils/session_output_reader.py | 1 + src/primaite/utils/session_output_writer.py | 1 + tests/config/legacy_conversion/legacy_training_config.yaml | 1 + tests/config/legacy_conversion/new_training_config.yaml | 1 + tests/config/obs_tests/laydown.yaml | 1 + .../config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml | 1 + tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml | 1 + tests/config/obs_tests/main_config_NODE_STATUSES.yaml | 1 + tests/config/obs_tests/main_config_without_obs.yaml | 1 + tests/config/one_node_states_on_off_lay_down_config.yaml | 1 + tests/config/one_node_states_on_off_main_config.yaml | 1 + tests/config/ppo_not_seeded_training_config.yaml | 1 + tests/config/ppo_seeded_training_config.yaml | 1 + ...single_action_space_fixed_blue_actions_main_config.yaml | 1 + tests/config/single_action_space_lay_down_config.yaml | 1 + tests/config/single_action_space_main_config.yaml | 1 + tests/config/test_random_red_main_config.yaml | 1 + tests/config/train_episode_step.yaml | 1 + tests/config/training_config_main_rllib.yaml | 1 + tests/mock_and_patch/__init__.py | 1 + tests/mock_and_patch/get_session_path_mock.py | 1 + tests/test_active_node.py | 1 + tests/test_observation_space.py | 1 + tests/test_primaite_session.py | 1 + tests/test_red_random_agent_behaviour.py | 1 + tests/test_resetting_node.py | 1 + tests/test_reward.py | 1 + tests/test_rllib_agent.py | 1 + tests/test_seeding_and_deterministic_session.py | 1 + tests/test_service_node.py | 1 + tests/test_session_loading.py | 1 + tests/test_single_action_space.py | 1 + tests/test_train_eval_episode_steps.py | 1 + 68 files changed, 109 insertions(+), 7 deletions(-) diff --git a/docs/_templates/custom-class-template.rst b/docs/_templates/custom-class-template.rst index 8a539bc9..b3f43787 100644 --- a/docs/_templates/custom-class-template.rst +++ b/docs/_templates/custom-class-template.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates. .. diff --git a/docs/_templates/custom-module-template.rst b/docs/_templates/custom-module-template.rst index e6ecabd1..689d0d13 100644 --- a/docs/_templates/custom-module-template.rst +++ b/docs/_templates/custom-module-template.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates. .. diff --git a/docs/api.rst b/docs/api.rst index df2bc193..d3db0a9c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. DO NOT DELETE THIS FILE! It contains the all-important `.. autosummary::` directive with `:recursive:` option, without which API documentation wouldn't get extracted from docstrings by the `sphinx.ext.autosummary` engine. It is hidden diff --git a/docs/conf.py b/docs/conf.py index 51b745cf..b14e5937 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: diff --git a/docs/index.rst b/docs/index.rst index cba573d6..5ba94976 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Welcome to PrimAITE's documentation ==================================== diff --git a/docs/source/about.rst b/docs/source/about.rst index a7135fc0..e237da41 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -1,4 +1,8 @@ -.. _about: +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + +.. _about: About PrimAITE ============== diff --git a/docs/source/config.rst b/docs/source/config.rst index af590a24..fa173772 100644 --- a/docs/source/config.rst +++ b/docs/source/config.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. _config: The Config Files Explained diff --git a/docs/source/custom_agent.rst b/docs/source/custom_agent.rst index b4552d64..7d426856 100644 --- a/docs/source/custom_agent.rst +++ b/docs/source/custom_agent.rst @@ -1,4 +1,8 @@ -Custom Agents +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + +Custom Agents ============= diff --git a/docs/source/dependencies.rst b/docs/source/dependencies.rst index bbca3fce..fda95267 100644 --- a/docs/source/dependencies.rst +++ b/docs/source/dependencies.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. role:: raw-html(raw) :format: html diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index e0254cdb..bb2b4bde 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. _getting-started: Getting Started diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst index 58b4cd5e..6748c415 100644 --- a/docs/source/glossary.rst +++ b/docs/source/glossary.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Glossary ============= diff --git a/docs/source/migration_1.2_-_2.0.rst b/docs/source/migration_1.2_-_2.0.rst index 2adf9656..072bdaa6 100644 --- a/docs/source/migration_1.2_-_2.0.rst +++ b/docs/source/migration_1.2_-_2.0.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + v1.2 to v2.0 Migration guide ============================ diff --git a/docs/source/primaite_session.rst b/docs/source/primaite_session.rst index bfb66332..3569b29b 100644 --- a/docs/source/primaite_session.rst +++ b/docs/source/primaite_session.rst @@ -1,3 +1,7 @@ +.. only:: comment + + Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + .. _run a primaite session: Run a PrimAITE Session @@ -44,7 +48,8 @@ For example, when running a session at 17:30:00 on 31st January 2023, the sessio ``~/primaite/sessions/2023-01-31/2023-01-31_17-30-00/``. Loading a session -------- +----------------- + A previous session can be loaded by providing the **directory** of the previous session to either the ``primaite session`` command from the cli (See :func:`primaite.cli.session`), or by calling :func:`primaite.main.run` with session_path. diff --git a/src/primaite/agents/__init__.py b/src/primaite/agents/__init__.py index 89580145..71f63d3a 100644 --- a/src/primaite/agents/__init__.py +++ b/src/primaite/agents/__init__.py @@ -1 +1,2 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Common interface between RL agents from different libraries and PrimAITE.""" diff --git a/src/primaite/agents/agent_abc.py b/src/primaite/agents/agent_abc.py index 515adfd0..fd9fbe9c 100644 --- a/src/primaite/agents/agent_abc.py +++ b/src/primaite/agents/agent_abc.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/hardcoded_abc.py b/src/primaite/agents/hardcoded_abc.py index cfee3e16..d900bc97 100644 --- a/src/primaite/agents/hardcoded_abc.py +++ b/src/primaite/agents/hardcoded_abc.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import time from abc import abstractmethod from pathlib import Path diff --git a/src/primaite/agents/hardcoded_acl.py b/src/primaite/agents/hardcoded_acl.py index e08a1d6d..4ed81693 100644 --- a/src/primaite/agents/hardcoded_acl.py +++ b/src/primaite/agents/hardcoded_acl.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from typing import Any, Dict, List, Union import numpy as np diff --git a/src/primaite/agents/hardcoded_node.py b/src/primaite/agents/hardcoded_node.py index 113f622a..6857b251 100644 --- a/src/primaite/agents/hardcoded_node.py +++ b/src/primaite/agents/hardcoded_node.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import numpy as np from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC diff --git a/src/primaite/agents/rllib.py b/src/primaite/agents/rllib.py index 1707cb81..4bc8e4af 100644 --- a/src/primaite/agents/rllib.py +++ b/src/primaite/agents/rllib.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/sb3.py b/src/primaite/agents/sb3.py index 862a0116..9bd895a4 100644 --- a/src/primaite/agents/sb3.py +++ b/src/primaite/agents/sb3.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/simple.py b/src/primaite/agents/simple.py index f81163ea..ec965a26 100644 --- a/src/primaite/agents/simple.py +++ b/src/primaite/agents/simple.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC from primaite.agents.utils import get_new_action, transform_action_acl_enum, transform_action_node_enum diff --git a/src/primaite/agents/utils.py b/src/primaite/agents/utils.py index 8858fa6a..85ba6f83 100644 --- a/src/primaite/agents/utils.py +++ b/src/primaite/agents/utils.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from typing import Dict, List, Union import numpy as np diff --git a/src/primaite/common/custom_typing.py b/src/primaite/common/custom_typing.py index 37b10efe..6a6f1408 100644 --- a/src/primaite/common/custom_typing.py +++ b/src/primaite/common/custom_typing.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from typing import Type, Union from primaite.nodes.active_node import ActiveNode diff --git a/src/primaite/config/__init__.py b/src/primaite/config/__init__.py index 03ed4cf1..5e9211be 100644 --- a/src/primaite/config/__init__.py +++ b/src/primaite/config/__init__.py @@ -1 +1,2 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Configuration parameters for running experiments.""" diff --git a/src/primaite/data_viz/__init__.py b/src/primaite/data_viz/__init__.py index db6ce6c8..7aa49525 100644 --- a/src/primaite/data_viz/__init__.py +++ b/src/primaite/data_viz/__init__.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Utility to generate plots of sessions metrics after PrimAITE.""" from enum import Enum diff --git a/src/primaite/data_viz/session_plots.py b/src/primaite/data_viz/session_plots.py index 245b9774..4d1984a8 100644 --- a/src/primaite/data_viz/session_plots.py +++ b/src/primaite/data_viz/session_plots.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Dict, Optional, Union diff --git a/src/primaite/environment/observations.py b/src/primaite/environment/observations.py index 53c173fd..55446be9 100644 --- a/src/primaite/environment/observations.py +++ b/src/primaite/environment/observations.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Module for handling configurable observation spaces in PrimAITE.""" import logging from abc import ABC, abstractmethod diff --git a/src/primaite/notebooks/__init__.py b/src/primaite/notebooks/__init__.py index 6ca1d3f6..8cf1a0c5 100644 --- a/src/primaite/notebooks/__init__.py +++ b/src/primaite/notebooks/__init__.py @@ -1,5 +1,6 @@ -"""Contains default jupyter notebooks which demonstrate PrimAITE functionality.""" # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +"""Contains default jupyter notebooks which demonstrate PrimAITE functionality.""" + import importlib.util import os import subprocess diff --git a/src/primaite/pol/__init__.py b/src/primaite/pol/__init__.py index cba4b28b..c630d5d5 100644 --- a/src/primaite/pol/__init__.py +++ b/src/primaite/pol/__init__.py @@ -1,2 +1,2 @@ -"""Pattern of Life- Represents the actions of users on the network.""" # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +"""Pattern of Life- Represents the actions of users on the network.""" diff --git a/src/primaite/primaite_session.py b/src/primaite/primaite_session.py index 76134238..bc997c18 100644 --- a/src/primaite/primaite_session.py +++ b/src/primaite/primaite_session.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Main entry point to PrimAITE. Configure training/evaluation experiments and input/output.""" from __future__ import annotations diff --git a/src/primaite/setup/__init__.py b/src/primaite/setup/__init__.py index 3c0bfe14..68b78767 100644 --- a/src/primaite/setup/__init__.py +++ b/src/primaite/setup/__init__.py @@ -1,2 +1,2 @@ -"""Utilities to prepare the user's data folders.""" # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +"""Utilities to prepare the user's data folders.""" diff --git a/src/primaite/setup/reset_example_configs.py b/src/primaite/setup/reset_example_configs.py index 599de8dc..120bc0d8 100644 --- a/src/primaite/setup/reset_example_configs.py +++ b/src/primaite/setup/reset_example_configs.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import filecmp import os import shutil diff --git a/src/primaite/transactions/__init__.py b/src/primaite/transactions/__init__.py index 45315b22..c86c3b57 100644 --- a/src/primaite/transactions/__init__.py +++ b/src/primaite/transactions/__init__.py @@ -1,2 +1,2 @@ -"""Record data of the system's state and agent's observations and actions.""" # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +"""Record data of the system's state and agent's observations and actions.""" diff --git a/src/primaite/utils/__init__.py b/src/primaite/utils/__init__.py index 55e8a6ba..c56bbdf0 100644 --- a/src/primaite/utils/__init__.py +++ b/src/primaite/utils/__init__.py @@ -1 +1,2 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Utilities for PrimAITE.""" diff --git a/src/primaite/utils/session_metadata_parser.py b/src/primaite/utils/session_metadata_parser.py index 936d3269..2434a812 100644 --- a/src/primaite/utils/session_metadata_parser.py +++ b/src/primaite/utils/session_metadata_parser.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import json from pathlib import Path from typing import Union diff --git a/src/primaite/utils/session_output_reader.py b/src/primaite/utils/session_output_reader.py index 2ff4a16a..6dd685e6 100644 --- a/src/primaite/utils/session_output_reader.py +++ b/src/primaite/utils/session_output_reader.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Any, Dict, Tuple, Union diff --git a/src/primaite/utils/session_output_writer.py b/src/primaite/utils/session_output_writer.py index 104acc62..ca152be7 100644 --- a/src/primaite/utils/session_output_writer.py +++ b/src/primaite/utils/session_output_writer.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import csv from logging import Logger from typing import Final, List, Tuple, TYPE_CHECKING, Union diff --git a/tests/config/legacy_conversion/legacy_training_config.yaml b/tests/config/legacy_conversion/legacy_training_config.yaml index 5c2025a2..e7e244de 100644 --- a/tests/config/legacy_conversion/legacy_training_config.yaml +++ b/tests/config/legacy_conversion/legacy_training_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Main Config File # Generic config values diff --git a/tests/config/legacy_conversion/new_training_config.yaml b/tests/config/legacy_conversion/new_training_config.yaml index c57741f7..2380dcb0 100644 --- a/tests/config/legacy_conversion/new_training_config.yaml +++ b/tests/config/legacy_conversion/new_training_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Main Config File # Generic config values diff --git a/tests/config/obs_tests/laydown.yaml b/tests/config/obs_tests/laydown.yaml index ef77ce83..25da9de3 100644 --- a/tests/config/obs_tests/laydown.yaml +++ b/tests/config/obs_tests/laydown.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '80' diff --git a/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml b/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml index 2ac8f59a..11904ddf 100644 --- a/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml +++ b/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml b/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml index a9986d5b..522686df 100644 --- a/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml +++ b/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_NODE_STATUSES.yaml b/tests/config/obs_tests/main_config_NODE_STATUSES.yaml index a129712c..0521d1b3 100644 --- a/tests/config/obs_tests/main_config_NODE_STATUSES.yaml +++ b/tests/config/obs_tests/main_config_NODE_STATUSES.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_without_obs.yaml b/tests/config/obs_tests/main_config_without_obs.yaml index 03d11b82..88895bd3 100644 --- a/tests/config/obs_tests/main_config_without_obs.yaml +++ b/tests/config/obs_tests/main_config_without_obs.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/one_node_states_on_off_lay_down_config.yaml b/tests/config/one_node_states_on_off_lay_down_config.yaml index aadbd449..93538f0c 100644 --- a/tests/config/one_node_states_on_off_lay_down_config.yaml +++ b/tests/config/one_node_states_on_off_lay_down_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '21' diff --git a/tests/config/one_node_states_on_off_main_config.yaml b/tests/config/one_node_states_on_off_main_config.yaml index db7399aa..2cb025c0 100644 --- a/tests/config/one_node_states_on_off_main_config.yaml +++ b/tests/config/one_node_states_on_off_main_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/ppo_not_seeded_training_config.yaml b/tests/config/ppo_not_seeded_training_config.yaml index 14b3f087..9d8e6986 100644 --- a/tests/config/ppo_not_seeded_training_config.yaml +++ b/tests/config/ppo_not_seeded_training_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/ppo_seeded_training_config.yaml b/tests/config/ppo_seeded_training_config.yaml index a176c793..0160ef53 100644 --- a/tests/config/ppo_seeded_training_config.yaml +++ b/tests/config/ppo_seeded_training_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/single_action_space_fixed_blue_actions_main_config.yaml b/tests/config/single_action_space_fixed_blue_actions_main_config.yaml index 0f378634..56c89e8d 100644 --- a/tests/config/single_action_space_fixed_blue_actions_main_config.yaml +++ b/tests/config/single_action_space_fixed_blue_actions_main_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/single_action_space_lay_down_config.yaml b/tests/config/single_action_space_lay_down_config.yaml index 9d05b84a..7d604034 100644 --- a/tests/config/single_action_space_lay_down_config.yaml +++ b/tests/config/single_action_space_lay_down_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '21' diff --git a/tests/config/single_action_space_main_config.yaml b/tests/config/single_action_space_main_config.yaml index c875757f..88616823 100644 --- a/tests/config/single_action_space_main_config.yaml +++ b/tests/config/single_action_space_main_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/test_random_red_main_config.yaml b/tests/config/test_random_red_main_config.yaml index 9e034355..5f17c0f0 100644 --- a/tests/config/test_random_red_main_config.yaml +++ b/tests/config/test_random_red_main_config.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/train_episode_step.yaml b/tests/config/train_episode_step.yaml index f112b741..59494c3e 100644 --- a/tests/config/train_episode_step.yaml +++ b/tests/config/train_episode_step.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/training_config_main_rllib.yaml b/tests/config/training_config_main_rllib.yaml index 88f82890..a616d302 100644 --- a/tests/config/training_config_main_rllib.yaml +++ b/tests/config/training_config_main_rllib.yaml @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/mock_and_patch/__init__.py b/tests/mock_and_patch/__init__.py index e69de29b..63f825c2 100644 --- a/tests/mock_and_patch/__init__.py +++ b/tests/mock_and_patch/__init__.py @@ -0,0 +1 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. diff --git a/tests/mock_and_patch/get_session_path_mock.py b/tests/mock_and_patch/get_session_path_mock.py index 90c0cb5d..f8e77ec9 100644 --- a/tests/mock_and_patch/get_session_path_mock.py +++ b/tests/mock_and_patch/get_session_path_mock.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import tempfile from datetime import datetime from pathlib import Path diff --git a/tests/test_active_node.py b/tests/test_active_node.py index addc595c..7f8673e2 100644 --- a/tests/test_active_node.py +++ b/tests/test_active_node.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Used to test Active Node functions.""" import pytest diff --git a/tests/test_observation_space.py b/tests/test_observation_space.py index d5844fd9..15009188 100644 --- a/tests/test_observation_space.py +++ b/tests/test_observation_space.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Test env creation and behaviour with different observation spaces.""" import numpy as np import pytest diff --git a/tests/test_primaite_session.py b/tests/test_primaite_session.py index 75ea5882..27497e51 100644 --- a/tests/test_primaite_session.py +++ b/tests/test_primaite_session.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import os import pytest diff --git a/tests/test_red_random_agent_behaviour.py b/tests/test_red_random_agent_behaviour.py index f8885f3e..a552168e 100644 --- a/tests/test_red_random_agent_behaviour.py +++ b/tests/test_red_random_agent_behaviour.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import pytest from primaite.config.lay_down_config import data_manipulation_config_path diff --git a/tests/test_resetting_node.py b/tests/test_resetting_node.py index fb7dc83d..04ec6103 100644 --- a/tests/test_resetting_node.py +++ b/tests/test_resetting_node.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Used to test Active Node functions.""" import pytest diff --git a/tests/test_reward.py b/tests/test_reward.py index 2edfd44a..e9695985 100644 --- a/tests/test_reward.py +++ b/tests/test_reward.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger diff --git a/tests/test_rllib_agent.py b/tests/test_rllib_agent.py index 645214e3..1ebf3b61 100644 --- a/tests/test_rllib_agent.py +++ b/tests/test_rllib_agent.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger diff --git a/tests/test_seeding_and_deterministic_session.py b/tests/test_seeding_and_deterministic_session.py index f52e9eee..4431e4d8 100644 --- a/tests/test_seeding_and_deterministic_session.py +++ b/tests/test_seeding_and_deterministic_session.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import pytest as pytest from primaite.config.lay_down_config import dos_very_basic_config_path diff --git a/tests/test_service_node.py b/tests/test_service_node.py index 4383fc1b..faf694fb 100644 --- a/tests/test_service_node.py +++ b/tests/test_service_node.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. """Used to test Service Node functions.""" import pytest diff --git a/tests/test_session_loading.py b/tests/test_session_loading.py index 54cac351..72e72f25 100644 --- a/tests/test_session_loading.py +++ b/tests/test_session_loading.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import os.path import shutil import tempfile diff --git a/tests/test_single_action_space.py b/tests/test_single_action_space.py index bfcffd42..785f9d65 100644 --- a/tests/test_single_action_space.py +++ b/tests/test_single_action_space.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import time import pytest diff --git a/tests/test_train_eval_episode_steps.py b/tests/test_train_eval_episode_steps.py index b839e630..eb73516f 100644 --- a/tests/test_train_eval_episode_steps.py +++ b/tests/test_train_eval_episode_steps.py @@ -1,3 +1,4 @@ +# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger From 81295a4fc4d6d8c465dc6b576abc5425067fcb37 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Mon, 17 Jul 2023 19:57:34 +0100 Subject: [PATCH 2/2] #1631 - Updated the copyright statement to comply with DEFCON 703 Edition 08/13 --- docs/_templates/custom-class-template.rst | 2 +- docs/_templates/custom-module-template.rst | 2 +- docs/api.rst | 2 +- docs/conf.py | 2 +- docs/index.rst | 2 +- docs/source/about.rst | 2 +- docs/source/config.rst | 2 +- docs/source/custom_agent.rst | 2 +- docs/source/dependencies.rst | 2 +- docs/source/getting_started.rst | 2 +- docs/source/glossary.rst | 2 +- docs/source/migration_1.2_-_2.0.rst | 2 +- docs/source/primaite_session.rst | 2 +- setup.py | 2 +- src/primaite/__init__.py | 2 +- src/primaite/acl/__init__.py | 2 +- src/primaite/acl/access_control_list.py | 2 +- src/primaite/acl/acl_rule.py | 2 +- src/primaite/agents/__init__.py | 2 +- src/primaite/agents/agent_abc.py | 2 +- src/primaite/agents/hardcoded_abc.py | 2 +- src/primaite/agents/hardcoded_acl.py | 2 +- src/primaite/agents/hardcoded_node.py | 2 +- src/primaite/agents/rllib.py | 2 +- src/primaite/agents/sb3.py | 2 +- src/primaite/agents/simple.py | 2 +- src/primaite/agents/utils.py | 2 +- src/primaite/cli.py | 2 +- src/primaite/common/__init__.py | 2 +- src/primaite/common/custom_typing.py | 2 +- src/primaite/common/enums.py | 2 +- src/primaite/common/protocol.py | 2 +- src/primaite/common/service.py | 2 +- src/primaite/config/__init__.py | 2 +- src/primaite/config/lay_down_config.py | 2 +- src/primaite/config/training_config.py | 2 +- src/primaite/data_viz/__init__.py | 2 +- src/primaite/data_viz/session_plots.py | 2 +- src/primaite/environment/__init__.py | 2 +- src/primaite/environment/observations.py | 2 +- src/primaite/environment/primaite_env.py | 2 +- src/primaite/environment/reward.py | 2 +- src/primaite/links/__init__.py | 2 +- src/primaite/links/link.py | 2 +- src/primaite/main.py | 2 +- src/primaite/nodes/__init__.py | 2 +- src/primaite/nodes/active_node.py | 2 +- src/primaite/nodes/node.py | 2 +- src/primaite/nodes/node_state_instruction_green.py | 2 +- src/primaite/nodes/node_state_instruction_red.py | 2 +- src/primaite/nodes/passive_node.py | 2 +- src/primaite/nodes/service_node.py | 2 +- src/primaite/notebooks/__init__.py | 2 +- src/primaite/pol/__init__.py | 2 +- src/primaite/pol/green_pol.py | 2 +- src/primaite/pol/ier.py | 2 +- src/primaite/pol/red_agent_pol.py | 2 +- src/primaite/primaite_session.py | 2 +- src/primaite/setup/__init__.py | 2 +- src/primaite/setup/old_installation_clean_up.py | 2 +- src/primaite/setup/reset_demo_notebooks.py | 2 +- src/primaite/setup/reset_example_configs.py | 2 +- src/primaite/setup/setup_app_dirs.py | 2 +- src/primaite/transactions/__init__.py | 2 +- src/primaite/transactions/transaction.py | 2 +- src/primaite/utils/__init__.py | 2 +- src/primaite/utils/package_data.py | 2 +- src/primaite/utils/session_metadata_parser.py | 2 +- src/primaite/utils/session_output_reader.py | 2 +- src/primaite/utils/session_output_writer.py | 2 +- tests/__init__.py | 2 +- tests/config/legacy_conversion/legacy_training_config.yaml | 2 +- tests/config/legacy_conversion/new_training_config.yaml | 2 +- tests/config/obs_tests/laydown.yaml | 2 +- tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml | 2 +- tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml | 2 +- tests/config/obs_tests/main_config_NODE_STATUSES.yaml | 2 +- tests/config/obs_tests/main_config_without_obs.yaml | 2 +- tests/config/one_node_states_on_off_lay_down_config.yaml | 2 +- tests/config/one_node_states_on_off_main_config.yaml | 2 +- tests/config/ppo_not_seeded_training_config.yaml | 2 +- tests/config/ppo_seeded_training_config.yaml | 2 +- .../single_action_space_fixed_blue_actions_main_config.yaml | 2 +- tests/config/single_action_space_lay_down_config.yaml | 2 +- tests/config/single_action_space_main_config.yaml | 2 +- tests/config/test_random_red_main_config.yaml | 2 +- tests/config/train_episode_step.yaml | 2 +- tests/config/training_config_main_rllib.yaml | 2 +- tests/conftest.py | 2 +- tests/mock_and_patch/__init__.py | 2 +- tests/mock_and_patch/get_session_path_mock.py | 2 +- tests/test_acl.py | 2 +- tests/test_active_node.py | 2 +- tests/test_observation_space.py | 2 +- tests/test_primaite_session.py | 2 +- tests/test_red_random_agent_behaviour.py | 2 +- tests/test_resetting_node.py | 2 +- tests/test_reward.py | 2 +- tests/test_rllib_agent.py | 2 +- tests/test_seeding_and_deterministic_session.py | 2 +- tests/test_service_node.py | 2 +- tests/test_session_loading.py | 2 +- tests/test_single_action_space.py | 2 +- tests/test_train_eval_episode_steps.py | 2 +- tests/test_training_config.py | 2 +- 105 files changed, 105 insertions(+), 105 deletions(-) diff --git a/docs/_templates/custom-class-template.rst b/docs/_templates/custom-class-template.rst index b3f43787..acffdc4c 100644 --- a/docs/_templates/custom-class-template.rst +++ b/docs/_templates/custom-class-template.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates. diff --git a/docs/_templates/custom-module-template.rst b/docs/_templates/custom-module-template.rst index 689d0d13..8eebad3e 100644 --- a/docs/_templates/custom-module-template.rst +++ b/docs/_templates/custom-module-template.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates. diff --git a/docs/api.rst b/docs/api.rst index d3db0a9c..b24dafc3 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. DO NOT DELETE THIS FILE! It contains the all-important `.. autosummary::` directive with `:recursive:` option, without diff --git a/docs/conf.py b/docs/conf.py index b14e5937..8afc1246 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: diff --git a/docs/index.rst b/docs/index.rst index 5ba94976..de5bed46 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. Welcome to PrimAITE's documentation ==================================== diff --git a/docs/source/about.rst b/docs/source/about.rst index e237da41..2068472c 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. _about: diff --git a/docs/source/config.rst b/docs/source/config.rst index fa173772..058565da 100644 --- a/docs/source/config.rst +++ b/docs/source/config.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. _config: diff --git a/docs/source/custom_agent.rst b/docs/source/custom_agent.rst index 7d426856..ba438305 100644 --- a/docs/source/custom_agent.rst +++ b/docs/source/custom_agent.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. Custom Agents ============= diff --git a/docs/source/dependencies.rst b/docs/source/dependencies.rst index fda95267..0d3f21c3 100644 --- a/docs/source/dependencies.rst +++ b/docs/source/dependencies.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. role:: raw-html(raw) :format: html diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index bb2b4bde..13c9d699 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. _getting-started: diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst index 6748c415..3422d51e 100644 --- a/docs/source/glossary.rst +++ b/docs/source/glossary.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. Glossary ============= diff --git a/docs/source/migration_1.2_-_2.0.rst b/docs/source/migration_1.2_-_2.0.rst index 072bdaa6..b7c9996d 100644 --- a/docs/source/migration_1.2_-_2.0.rst +++ b/docs/source/migration_1.2_-_2.0.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. v1.2 to v2.0 Migration guide ============================ diff --git a/docs/source/primaite_session.rst b/docs/source/primaite_session.rst index 3569b29b..b8895fc7 100644 --- a/docs/source/primaite_session.rst +++ b/docs/source/primaite_session.rst @@ -1,6 +1,6 @@ .. only:: comment - Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. + Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. .. _run a primaite session: diff --git a/setup.py b/setup.py index 63e905c0..efaf24bf 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from setuptools import setup from wheel.bdist_wheel import bdist_wheel as _bdist_wheel # noqa diff --git a/src/primaite/__init__.py b/src/primaite/__init__.py index 030860d8..de0837f9 100644 --- a/src/primaite/__init__.py +++ b/src/primaite/__init__.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import logging import logging.config import sys diff --git a/src/primaite/acl/__init__.py b/src/primaite/acl/__init__.py index 2623efbc..c6fd79f2 100644 --- a/src/primaite/acl/__init__.py +++ b/src/primaite/acl/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Access Control List. Models firewall functionality.""" diff --git a/src/primaite/acl/access_control_list.py b/src/primaite/acl/access_control_list.py index 9a8444e5..3a9b3c36 100644 --- a/src/primaite/acl/access_control_list.py +++ b/src/primaite/acl/access_control_list.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """A class that implements the access control list implementation for the network.""" from typing import Dict diff --git a/src/primaite/acl/acl_rule.py b/src/primaite/acl/acl_rule.py index a1fd93f2..9d881f5a 100644 --- a/src/primaite/acl/acl_rule.py +++ b/src/primaite/acl/acl_rule.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """A class that implements an access control list rule.""" diff --git a/src/primaite/agents/__init__.py b/src/primaite/agents/__init__.py index 71f63d3a..d987b43f 100644 --- a/src/primaite/agents/__init__.py +++ b/src/primaite/agents/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Common interface between RL agents from different libraries and PrimAITE.""" diff --git a/src/primaite/agents/agent_abc.py b/src/primaite/agents/agent_abc.py index fd9fbe9c..5b192536 100644 --- a/src/primaite/agents/agent_abc.py +++ b/src/primaite/agents/agent_abc.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/hardcoded_abc.py b/src/primaite/agents/hardcoded_abc.py index d900bc97..ec4b53e7 100644 --- a/src/primaite/agents/hardcoded_abc.py +++ b/src/primaite/agents/hardcoded_abc.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import time from abc import abstractmethod from pathlib import Path diff --git a/src/primaite/agents/hardcoded_acl.py b/src/primaite/agents/hardcoded_acl.py index 4ed81693..69ef84c9 100644 --- a/src/primaite/agents/hardcoded_acl.py +++ b/src/primaite/agents/hardcoded_acl.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from typing import Any, Dict, List, Union import numpy as np diff --git a/src/primaite/agents/hardcoded_node.py b/src/primaite/agents/hardcoded_node.py index 6857b251..469b85c9 100644 --- a/src/primaite/agents/hardcoded_node.py +++ b/src/primaite/agents/hardcoded_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import numpy as np from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC diff --git a/src/primaite/agents/rllib.py b/src/primaite/agents/rllib.py index 4bc8e4af..0781ccc4 100644 --- a/src/primaite/agents/rllib.py +++ b/src/primaite/agents/rllib.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/sb3.py b/src/primaite/agents/sb3.py index 9bd895a4..e0f519dc 100644 --- a/src/primaite/agents/sb3.py +++ b/src/primaite/agents/sb3.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from __future__ import annotations import json diff --git a/src/primaite/agents/simple.py b/src/primaite/agents/simple.py index ec965a26..2a0a8f57 100644 --- a/src/primaite/agents/simple.py +++ b/src/primaite/agents/simple.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC from primaite.agents.utils import get_new_action, transform_action_acl_enum, transform_action_node_enum diff --git a/src/primaite/agents/utils.py b/src/primaite/agents/utils.py index 85ba6f83..9a85638b 100644 --- a/src/primaite/agents/utils.py +++ b/src/primaite/agents/utils.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from typing import Dict, List, Union import numpy as np diff --git a/src/primaite/cli.py b/src/primaite/cli.py index adc9cb32..ab5869cb 100644 --- a/src/primaite/cli.py +++ b/src/primaite/cli.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Provides a CLI using Typer as an entry point.""" import logging import os diff --git a/src/primaite/common/__init__.py b/src/primaite/common/__init__.py index 5f47b0b5..738a30d1 100644 --- a/src/primaite/common/__init__.py +++ b/src/primaite/common/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Objects which are shared between many PrimAITE modules.""" diff --git a/src/primaite/common/custom_typing.py b/src/primaite/common/custom_typing.py index 6a6f1408..4fde41d1 100644 --- a/src/primaite/common/custom_typing.py +++ b/src/primaite/common/custom_typing.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from typing import Type, Union from primaite.nodes.active_node import ActiveNode diff --git a/src/primaite/common/enums.py b/src/primaite/common/enums.py index db5d153c..70dd97fd 100644 --- a/src/primaite/common/enums.py +++ b/src/primaite/common/enums.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Enumerations for APE.""" from enum import Enum, IntEnum diff --git a/src/primaite/common/protocol.py b/src/primaite/common/protocol.py index ad6a1d83..13830bf7 100644 --- a/src/primaite/common/protocol.py +++ b/src/primaite/common/protocol.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The protocol class.""" diff --git a/src/primaite/common/service.py b/src/primaite/common/service.py index 258ac8f9..2aee86fa 100644 --- a/src/primaite/common/service.py +++ b/src/primaite/common/service.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The Service class.""" from primaite.common.enums import SoftwareState diff --git a/src/primaite/config/__init__.py b/src/primaite/config/__init__.py index 5e9211be..9bd899f7 100644 --- a/src/primaite/config/__init__.py +++ b/src/primaite/config/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Configuration parameters for running experiments.""" diff --git a/src/primaite/config/lay_down_config.py b/src/primaite/config/lay_down_config.py index 3a85b9da..64210963 100644 --- a/src/primaite/config/lay_down_config.py +++ b/src/primaite/config/lay_down_config.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Any, Dict, Final, Union diff --git a/src/primaite/config/training_config.py b/src/primaite/config/training_config.py index 785d9757..34e61452 100644 --- a/src/primaite/config/training_config.py +++ b/src/primaite/config/training_config.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from __future__ import annotations from dataclasses import dataclass, field diff --git a/src/primaite/data_viz/__init__.py b/src/primaite/data_viz/__init__.py index 7aa49525..ad43c141 100644 --- a/src/primaite/data_viz/__init__.py +++ b/src/primaite/data_viz/__init__.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Utility to generate plots of sessions metrics after PrimAITE.""" from enum import Enum diff --git a/src/primaite/data_viz/session_plots.py b/src/primaite/data_viz/session_plots.py index 4d1984a8..39c2b4cc 100644 --- a/src/primaite/data_viz/session_plots.py +++ b/src/primaite/data_viz/session_plots.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Dict, Optional, Union diff --git a/src/primaite/environment/__init__.py b/src/primaite/environment/__init__.py index 8b0060c0..e837fe1e 100644 --- a/src/primaite/environment/__init__.py +++ b/src/primaite/environment/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Gym/Gymnasium environment for RL agents consisting of a simulated computer network.""" diff --git a/src/primaite/environment/observations.py b/src/primaite/environment/observations.py index 55446be9..b548155a 100644 --- a/src/primaite/environment/observations.py +++ b/src/primaite/environment/observations.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Module for handling configurable observation spaces in PrimAITE.""" import logging from abc import ABC, abstractmethod diff --git a/src/primaite/environment/primaite_env.py b/src/primaite/environment/primaite_env.py index b92c434e..9c4f346a 100644 --- a/src/primaite/environment/primaite_env.py +++ b/src/primaite/environment/primaite_env.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Main environment module containing the PRIMmary AI Training Evironment (Primaite) class.""" import copy import logging diff --git a/src/primaite/environment/reward.py b/src/primaite/environment/reward.py index 9cbb0078..35da53bb 100644 --- a/src/primaite/environment/reward.py +++ b/src/primaite/environment/reward.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Implements reward function.""" from typing import Dict diff --git a/src/primaite/links/__init__.py b/src/primaite/links/__init__.py index 6257f282..21ce44ba 100644 --- a/src/primaite/links/__init__.py +++ b/src/primaite/links/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Network connections between nodes in the simulation.""" diff --git a/src/primaite/links/link.py b/src/primaite/links/link.py index f61281cd..1c189baf 100644 --- a/src/primaite/links/link.py +++ b/src/primaite/links/link.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The link class.""" from typing import List diff --git a/src/primaite/main.py b/src/primaite/main.py index 9fcc4df6..f9e3eb70 100644 --- a/src/primaite/main.py +++ b/src/primaite/main.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The main PrimAITE session runner module.""" import argparse from pathlib import Path diff --git a/src/primaite/nodes/__init__.py b/src/primaite/nodes/__init__.py index 19347372..43b213d6 100644 --- a/src/primaite/nodes/__init__.py +++ b/src/primaite/nodes/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Nodes represent network hosts in the simulation.""" diff --git a/src/primaite/nodes/active_node.py b/src/primaite/nodes/active_node.py index f86f818b..fa38ae82 100644 --- a/src/primaite/nodes/active_node.py +++ b/src/primaite/nodes/active_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """An Active Node (i.e. not an actuator).""" import logging from typing import Final diff --git a/src/primaite/nodes/node.py b/src/primaite/nodes/node.py index 9fd5b719..40d596d7 100644 --- a/src/primaite/nodes/node.py +++ b/src/primaite/nodes/node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The base Node class.""" from typing import Final diff --git a/src/primaite/nodes/node_state_instruction_green.py b/src/primaite/nodes/node_state_instruction_green.py index 7ebe3886..9d07993c 100644 --- a/src/primaite/nodes/node_state_instruction_green.py +++ b/src/primaite/nodes/node_state_instruction_green.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Defines node behaviour for Green PoL.""" diff --git a/src/primaite/nodes/node_state_instruction_red.py b/src/primaite/nodes/node_state_instruction_red.py index 540625cc..62e3d732 100644 --- a/src/primaite/nodes/node_state_instruction_red.py +++ b/src/primaite/nodes/node_state_instruction_red.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Defines node behaviour for Green PoL.""" from dataclasses import dataclass diff --git a/src/primaite/nodes/passive_node.py b/src/primaite/nodes/passive_node.py index afe4e2d1..17c64fb6 100644 --- a/src/primaite/nodes/passive_node.py +++ b/src/primaite/nodes/passive_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The Passive Node class (i.e. an actuator).""" from primaite.common.enums import HardwareState, NodeType, Priority from primaite.config.training_config import TrainingConfig diff --git a/src/primaite/nodes/service_node.py b/src/primaite/nodes/service_node.py index 4ad52a1e..4931b7df 100644 --- a/src/primaite/nodes/service_node.py +++ b/src/primaite/nodes/service_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """A Service Node (i.e. not an actuator).""" import logging from typing import Dict, Final diff --git a/src/primaite/notebooks/__init__.py b/src/primaite/notebooks/__init__.py index 8cf1a0c5..fc872dc8 100644 --- a/src/primaite/notebooks/__init__.py +++ b/src/primaite/notebooks/__init__.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Contains default jupyter notebooks which demonstrate PrimAITE functionality.""" import importlib.util diff --git a/src/primaite/pol/__init__.py b/src/primaite/pol/__init__.py index c630d5d5..1adb1491 100644 --- a/src/primaite/pol/__init__.py +++ b/src/primaite/pol/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Pattern of Life- Represents the actions of users on the network.""" diff --git a/src/primaite/pol/green_pol.py b/src/primaite/pol/green_pol.py index e9dfef8c..867dc5ff 100644 --- a/src/primaite/pol/green_pol.py +++ b/src/primaite/pol/green_pol.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Implements Pattern of Life on the network (nodes and links).""" from typing import Dict, Union diff --git a/src/primaite/pol/ier.py b/src/primaite/pol/ier.py index 2de8fe6f..9c8717cd 100644 --- a/src/primaite/pol/ier.py +++ b/src/primaite/pol/ier.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """ Information Exchange Requirements for APE. diff --git a/src/primaite/pol/red_agent_pol.py b/src/primaite/pol/red_agent_pol.py index 1a8bd406..6ccb304a 100644 --- a/src/primaite/pol/red_agent_pol.py +++ b/src/primaite/pol/red_agent_pol.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Implements POL on the network (nodes and links) resulting from the red agent attack.""" from typing import Dict diff --git a/src/primaite/primaite_session.py b/src/primaite/primaite_session.py index bc997c18..73473bed 100644 --- a/src/primaite/primaite_session.py +++ b/src/primaite/primaite_session.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Main entry point to PrimAITE. Configure training/evaluation experiments and input/output.""" from __future__ import annotations diff --git a/src/primaite/setup/__init__.py b/src/primaite/setup/__init__.py index 68b78767..acfa48c4 100644 --- a/src/primaite/setup/__init__.py +++ b/src/primaite/setup/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Utilities to prepare the user's data folders.""" diff --git a/src/primaite/setup/old_installation_clean_up.py b/src/primaite/setup/old_installation_clean_up.py index 292535f2..ad31b6d2 100644 --- a/src/primaite/setup/old_installation_clean_up.py +++ b/src/primaite/setup/old_installation_clean_up.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from primaite import getLogger _LOGGER = getLogger(__name__) diff --git a/src/primaite/setup/reset_demo_notebooks.py b/src/primaite/setup/reset_demo_notebooks.py index 793f9ade..a1fd7f1d 100644 --- a/src/primaite/setup/reset_demo_notebooks.py +++ b/src/primaite/setup/reset_demo_notebooks.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import filecmp import os import shutil diff --git a/src/primaite/setup/reset_example_configs.py b/src/primaite/setup/reset_example_configs.py index 120bc0d8..60cd6c91 100644 --- a/src/primaite/setup/reset_example_configs.py +++ b/src/primaite/setup/reset_example_configs.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import filecmp import os import shutil diff --git a/src/primaite/setup/setup_app_dirs.py b/src/primaite/setup/setup_app_dirs.py index 693b11c1..d0f579c9 100644 --- a/src/primaite/setup/setup_app_dirs.py +++ b/src/primaite/setup/setup_app_dirs.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from primaite import _USER_DIRS, getLogger, LOG_DIR, NOTEBOOKS_DIR _LOGGER = getLogger(__name__) diff --git a/src/primaite/transactions/__init__.py b/src/primaite/transactions/__init__.py index c86c3b57..9a881fd5 100644 --- a/src/primaite/transactions/__init__.py +++ b/src/primaite/transactions/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Record data of the system's state and agent's observations and actions.""" diff --git a/src/primaite/transactions/transaction.py b/src/primaite/transactions/transaction.py index f49d4ec2..e4b2c0bb 100644 --- a/src/primaite/transactions/transaction.py +++ b/src/primaite/transactions/transaction.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """The Transaction class.""" from datetime import datetime from typing import List, Tuple diff --git a/src/primaite/utils/__init__.py b/src/primaite/utils/__init__.py index c56bbdf0..5dbd1e5f 100644 --- a/src/primaite/utils/__init__.py +++ b/src/primaite/utils/__init__.py @@ -1,2 +1,2 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Utilities for PrimAITE.""" diff --git a/src/primaite/utils/package_data.py b/src/primaite/utils/package_data.py index 59f36851..f329b64b 100644 --- a/src/primaite/utils/package_data.py +++ b/src/primaite/utils/package_data.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import os from pathlib import Path diff --git a/src/primaite/utils/session_metadata_parser.py b/src/primaite/utils/session_metadata_parser.py index 2434a812..eb3c3339 100644 --- a/src/primaite/utils/session_metadata_parser.py +++ b/src/primaite/utils/session_metadata_parser.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import json from pathlib import Path from typing import Union diff --git a/src/primaite/utils/session_output_reader.py b/src/primaite/utils/session_output_reader.py index 6dd685e6..7089c69a 100644 --- a/src/primaite/utils/session_output_reader.py +++ b/src/primaite/utils/session_output_reader.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Any, Dict, Tuple, Union diff --git a/src/primaite/utils/session_output_writer.py b/src/primaite/utils/session_output_writer.py index ca152be7..fa015f11 100644 --- a/src/primaite/utils/session_output_writer.py +++ b/src/primaite/utils/session_output_writer.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import csv from logging import Logger from typing import Final, List, Tuple, TYPE_CHECKING, Union diff --git a/tests/__init__.py b/tests/__init__.py index 31744e29..f8e6fc55 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. from pathlib import Path from typing import Final diff --git a/tests/config/legacy_conversion/legacy_training_config.yaml b/tests/config/legacy_conversion/legacy_training_config.yaml index e7e244de..fb24e3d7 100644 --- a/tests/config/legacy_conversion/legacy_training_config.yaml +++ b/tests/config/legacy_conversion/legacy_training_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Main Config File # Generic config values diff --git a/tests/config/legacy_conversion/new_training_config.yaml b/tests/config/legacy_conversion/new_training_config.yaml index 2380dcb0..3df29d04 100644 --- a/tests/config/legacy_conversion/new_training_config.yaml +++ b/tests/config/legacy_conversion/new_training_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Main Config File # Generic config values diff --git a/tests/config/obs_tests/laydown.yaml b/tests/config/obs_tests/laydown.yaml index 25da9de3..3590492b 100644 --- a/tests/config/obs_tests/laydown.yaml +++ b/tests/config/obs_tests/laydown.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '80' diff --git a/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml b/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml index 11904ddf..8374115d 100644 --- a/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml +++ b/tests/config/obs_tests/main_config_LINK_TRAFFIC_LEVELS.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml b/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml index 522686df..c68199a0 100644 --- a/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml +++ b/tests/config/obs_tests/main_config_NODE_LINK_TABLE.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_NODE_STATUSES.yaml b/tests/config/obs_tests/main_config_NODE_STATUSES.yaml index 0521d1b3..c662e715 100644 --- a/tests/config/obs_tests/main_config_NODE_STATUSES.yaml +++ b/tests/config/obs_tests/main_config_NODE_STATUSES.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/obs_tests/main_config_without_obs.yaml b/tests/config/obs_tests/main_config_without_obs.yaml index 88895bd3..bd23bded 100644 --- a/tests/config/obs_tests/main_config_without_obs.yaml +++ b/tests/config/obs_tests/main_config_without_obs.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/one_node_states_on_off_lay_down_config.yaml b/tests/config/one_node_states_on_off_lay_down_config.yaml index 93538f0c..65257d62 100644 --- a/tests/config/one_node_states_on_off_lay_down_config.yaml +++ b/tests/config/one_node_states_on_off_lay_down_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '21' diff --git a/tests/config/one_node_states_on_off_main_config.yaml b/tests/config/one_node_states_on_off_main_config.yaml index 2cb025c0..133b2af8 100644 --- a/tests/config/one_node_states_on_off_main_config.yaml +++ b/tests/config/one_node_states_on_off_main_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/ppo_not_seeded_training_config.yaml b/tests/config/ppo_not_seeded_training_config.yaml index 9d8e6986..1b1d5deb 100644 --- a/tests/config/ppo_not_seeded_training_config.yaml +++ b/tests/config/ppo_not_seeded_training_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/ppo_seeded_training_config.yaml b/tests/config/ppo_seeded_training_config.yaml index 0160ef53..14a4face 100644 --- a/tests/config/ppo_seeded_training_config.yaml +++ b/tests/config/ppo_seeded_training_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/single_action_space_fixed_blue_actions_main_config.yaml b/tests/config/single_action_space_fixed_blue_actions_main_config.yaml index 56c89e8d..2fcca1f2 100644 --- a/tests/config/single_action_space_fixed_blue_actions_main_config.yaml +++ b/tests/config/single_action_space_fixed_blue_actions_main_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/single_action_space_lay_down_config.yaml b/tests/config/single_action_space_lay_down_config.yaml index 7d604034..9fb82ac2 100644 --- a/tests/config/single_action_space_lay_down_config.yaml +++ b/tests/config/single_action_space_lay_down_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. - item_type: PORTS ports_list: - port: '21' diff --git a/tests/config/single_action_space_main_config.yaml b/tests/config/single_action_space_main_config.yaml index 88616823..625491fe 100644 --- a/tests/config/single_action_space_main_config.yaml +++ b/tests/config/single_action_space_main_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/test_random_red_main_config.yaml b/tests/config/test_random_red_main_config.yaml index 5f17c0f0..3416029c 100644 --- a/tests/config/test_random_red_main_config.yaml +++ b/tests/config/test_random_red_main_config.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/train_episode_step.yaml b/tests/config/train_episode_step.yaml index 59494c3e..31337b0c 100644 --- a/tests/config/train_episode_step.yaml +++ b/tests/config/train_episode_step.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/config/training_config_main_rllib.yaml b/tests/config/training_config_main_rllib.yaml index a616d302..40cbc0fc 100644 --- a/tests/config/training_config_main_rllib.yaml +++ b/tests/config/training_config_main_rllib.yaml @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. # Training Config File # Sets which agent algorithm framework will be used. diff --git a/tests/conftest.py b/tests/conftest.py index 3f022b6f..9b0db139 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import datetime import json import shutil diff --git a/tests/mock_and_patch/__init__.py b/tests/mock_and_patch/__init__.py index 63f825c2..778748f7 100644 --- a/tests/mock_and_patch/__init__.py +++ b/tests/mock_and_patch/__init__.py @@ -1 +1 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. diff --git a/tests/mock_and_patch/get_session_path_mock.py b/tests/mock_and_patch/get_session_path_mock.py index f8e77ec9..190e1dba 100644 --- a/tests/mock_and_patch/get_session_path_mock.py +++ b/tests/mock_and_patch/get_session_path_mock.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import tempfile from datetime import datetime from pathlib import Path diff --git a/tests/test_acl.py b/tests/test_acl.py index 30f12697..4ef9d78c 100644 --- a/tests/test_acl.py +++ b/tests/test_acl.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Used to tes the ACL functions.""" from primaite.acl.access_control_list import AccessControlList diff --git a/tests/test_active_node.py b/tests/test_active_node.py index 7f8673e2..880c0f02 100644 --- a/tests/test_active_node.py +++ b/tests/test_active_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Used to test Active Node functions.""" import pytest diff --git a/tests/test_observation_space.py b/tests/test_observation_space.py index 15009188..3bcdb66d 100644 --- a/tests/test_observation_space.py +++ b/tests/test_observation_space.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Test env creation and behaviour with different observation spaces.""" import numpy as np import pytest diff --git a/tests/test_primaite_session.py b/tests/test_primaite_session.py index 27497e51..210d931e 100644 --- a/tests/test_primaite_session.py +++ b/tests/test_primaite_session.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import os import pytest diff --git a/tests/test_red_random_agent_behaviour.py b/tests/test_red_random_agent_behaviour.py index a552168e..3496ed9d 100644 --- a/tests/test_red_random_agent_behaviour.py +++ b/tests/test_red_random_agent_behaviour.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import pytest from primaite.config.lay_down_config import data_manipulation_config_path diff --git a/tests/test_resetting_node.py b/tests/test_resetting_node.py index 04ec6103..80e13c5b 100644 --- a/tests/test_resetting_node.py +++ b/tests/test_resetting_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Used to test Active Node functions.""" import pytest diff --git a/tests/test_reward.py b/tests/test_reward.py index e9695985..741c6f13 100644 --- a/tests/test_reward.py +++ b/tests/test_reward.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger diff --git a/tests/test_rllib_agent.py b/tests/test_rllib_agent.py index 1ebf3b61..f494ea81 100644 --- a/tests/test_rllib_agent.py +++ b/tests/test_rllib_agent.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger diff --git a/tests/test_seeding_and_deterministic_session.py b/tests/test_seeding_and_deterministic_session.py index 4431e4d8..5220fb1c 100644 --- a/tests/test_seeding_and_deterministic_session.py +++ b/tests/test_seeding_and_deterministic_session.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import pytest as pytest from primaite.config.lay_down_config import dos_very_basic_config_path diff --git a/tests/test_service_node.py b/tests/test_service_node.py index faf694fb..2f504cd6 100644 --- a/tests/test_service_node.py +++ b/tests/test_service_node.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. """Used to test Service Node functions.""" import pytest diff --git a/tests/test_session_loading.py b/tests/test_session_loading.py index 72e72f25..bcd28d96 100644 --- a/tests/test_session_loading.py +++ b/tests/test_session_loading.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import os.path import shutil import tempfile diff --git a/tests/test_single_action_space.py b/tests/test_single_action_space.py index 785f9d65..4f7af9a6 100644 --- a/tests/test_single_action_space.py +++ b/tests/test_single_action_space.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import time import pytest diff --git a/tests/test_train_eval_episode_steps.py b/tests/test_train_eval_episode_steps.py index eb73516f..4f7bed16 100644 --- a/tests/test_train_eval_episode_steps.py +++ b/tests/test_train_eval_episode_steps.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import pytest from primaite import getLogger diff --git a/tests/test_training_config.py b/tests/test_training_config.py index d7fe4e50..4123ee39 100644 --- a/tests/test_training_config.py +++ b/tests/test_training_config.py @@ -1,4 +1,4 @@ -# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. +# Crown Owned Copyright (C) Dstl 2023. DEFCON 703. Shared in confidence. import yaml from primaite.config import training_config