#1631 - Added the DEFCON 703 header to all possible files

This commit is contained in:
Chris McCarthy
2023-07-17 19:28:43 +01:00
parent 3186fcb489
commit 678f953ced
68 changed files with 109 additions and 7 deletions

View File

@@ -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. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
.. ..

View File

@@ -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. Credit to https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion for the custom templates.
.. ..

View File

@@ -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 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 which API documentation wouldn't get extracted from docstrings by the `sphinx.ext.autosummary` engine. It is hidden

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #
# For the full list of built-in configuration values, see the documentation: # For the full list of built-in configuration values, see the documentation:

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
Welcome to PrimAITE's documentation Welcome to PrimAITE's documentation
==================================== ====================================

View File

@@ -1,4 +1,8 @@
.. _about: .. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
.. _about:
About PrimAITE About PrimAITE
============== ==============

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
.. _config: .. _config:
The Config Files Explained The Config Files Explained

View File

@@ -1,4 +1,8 @@
Custom Agents .. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
Custom Agents
============= =============

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
.. role:: raw-html(raw) .. role:: raw-html(raw)
:format: html :format: html

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
.. _getting-started: .. _getting-started:
Getting Started Getting Started

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
Glossary Glossary
============= =============

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
v1.2 to v2.0 Migration guide v1.2 to v2.0 Migration guide
============================ ============================

View File

@@ -1,3 +1,7 @@
.. only:: comment
Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
.. _run a primaite session: .. _run a primaite session:
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/``. ``~/primaite/sessions/2023-01-31/2023-01-31_17-30-00/``.
Loading a session 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 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. (See :func:`primaite.cli.session`), or by calling :func:`primaite.main.run` with session_path.

View File

@@ -1 +1,2 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Common interface between RL agents from different libraries and PrimAITE.""" """Common interface between RL agents from different libraries and PrimAITE."""

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from __future__ import annotations from __future__ import annotations
import json import json

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import time import time
from abc import abstractmethod from abc import abstractmethod
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from typing import Any, Dict, List, Union from typing import Any, Dict, List, Union
import numpy as np import numpy as np

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import numpy as np import numpy as np
from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from __future__ import annotations from __future__ import annotations
import json import json

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from __future__ import annotations from __future__ import annotations
import json import json

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC from primaite.agents.hardcoded_abc import HardCodedAgentSessionABC
from primaite.agents.utils import get_new_action, transform_action_acl_enum, transform_action_node_enum from primaite.agents.utils import get_new_action, transform_action_acl_enum, transform_action_node_enum

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from typing import Dict, List, Union from typing import Dict, List, Union
import numpy as np import numpy as np

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from typing import Type, Union from typing import Type, Union
from primaite.nodes.active_node import ActiveNode from primaite.nodes.active_node import ActiveNode

View File

@@ -1 +1,2 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Configuration parameters for running experiments.""" """Configuration parameters for running experiments."""

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Utility to generate plots of sessions metrics after PrimAITE.""" """Utility to generate plots of sessions metrics after PrimAITE."""
from enum import Enum from enum import Enum

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from pathlib import Path from pathlib import Path
from typing import Dict, Optional, Union from typing import Dict, Optional, Union

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Module for handling configurable observation spaces in PrimAITE.""" """Module for handling configurable observation spaces in PrimAITE."""
import logging import logging
from abc import ABC, abstractmethod from abc import ABC, abstractmethod

View File

@@ -1,5 +1,6 @@
"""Contains default jupyter notebooks which demonstrate PrimAITE functionality."""
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Contains default jupyter notebooks which demonstrate PrimAITE functionality."""
import importlib.util import importlib.util
import os import os
import subprocess import subprocess

View File

@@ -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. # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Pattern of Life- Represents the actions of users on the network."""

View File

@@ -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.""" """Main entry point to PrimAITE. Configure training/evaluation experiments and input/output."""
from __future__ import annotations from __future__ import annotations

View File

@@ -1,2 +1,2 @@
"""Utilities to prepare the user's data folders."""
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence. # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Utilities to prepare the user's data folders."""

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import filecmp import filecmp
import os import os
import shutil import shutil

View File

@@ -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. # Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Record data of the system's state and agent's observations and actions."""

View File

@@ -1 +1,2 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Utilities for PrimAITE.""" """Utilities for PrimAITE."""

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import json import json
from pathlib import Path from pathlib import Path
from typing import Union from typing import Union

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Tuple, Union from typing import Any, Dict, Tuple, Union

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import csv import csv
from logging import Logger from logging import Logger
from typing import Final, List, Tuple, TYPE_CHECKING, Union from typing import Final, List, Tuple, TYPE_CHECKING, Union

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Main Config File # Main Config File
# Generic config values # Generic config values

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Main Config File # Main Config File
# Generic config values # Generic config values

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
- item_type: PORTS - item_type: PORTS
ports_list: ports_list:
- port: '80' - port: '80'

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
- item_type: PORTS - item_type: PORTS
ports_list: ports_list:
- port: '21' - port: '21'

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
- item_type: PORTS - item_type: PORTS
ports_list: ports_list:
- port: '21' - port: '21'

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
# Training Config File # Training Config File
# Sets which agent algorithm framework will be used. # Sets which agent algorithm framework will be used.

View File

@@ -0,0 +1 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import tempfile import tempfile
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Used to test Active Node functions.""" """Used to test Active Node functions."""
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Test env creation and behaviour with different observation spaces.""" """Test env creation and behaviour with different observation spaces."""
import numpy as np import numpy as np
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import os import os
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import pytest import pytest
from primaite.config.lay_down_config import data_manipulation_config_path from primaite.config.lay_down_config import data_manipulation_config_path

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Used to test Active Node functions.""" """Used to test Active Node functions."""
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import pytest import pytest
from primaite import getLogger from primaite import getLogger

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import pytest import pytest
from primaite import getLogger from primaite import getLogger

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import pytest as pytest import pytest as pytest
from primaite.config.lay_down_config import dos_very_basic_config_path from primaite.config.lay_down_config import dos_very_basic_config_path

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
"""Used to test Service Node functions.""" """Used to test Service Node functions."""
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import os.path import os.path
import shutil import shutil
import tempfile import tempfile

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import time import time
import pytest import pytest

View File

@@ -1,3 +1,4 @@
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
import pytest import pytest
from primaite import getLogger from primaite import getLogger