Package restructuring and renaming for 1.2.0
This commit is contained in:
@@ -15,16 +15,17 @@ steps:
|
||||
displayName: 'Use Python $(python.version)'
|
||||
|
||||
- script: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
pip install wheel
|
||||
python -m pip install --upgrade pip==23.0.1
|
||||
pip install wheel==0.38.4 --upgrade
|
||||
pip install setuptools==66 --upgrade
|
||||
pip install build==0.10.0
|
||||
pip install twine
|
||||
pip install keyring
|
||||
pip install artifacts-keyring
|
||||
displayName: 'Install build dependencies'
|
||||
|
||||
- script: |
|
||||
python setup.py sdist bdist_wheel
|
||||
python -m build
|
||||
displayName: 'Build PrimAITE sdist and wheel'
|
||||
|
||||
- task: TwineAuthenticate@1
|
||||
@@ -33,5 +34,5 @@ steps:
|
||||
artifactFeed: PrimAITE/PrimAITE
|
||||
|
||||
- script: |
|
||||
python -m twine upload --verbose -r PrimAITE --config-file $(PYPIRC_PATH) dist/*
|
||||
python -m twine upload --verbose -r PrimAITE --config-file $(PYPIRC_PATH) dist/*.whl
|
||||
displayName: 'Artifact Upload'
|
||||
|
||||
45
.azure/azure-build-deploy-docs-pipeline.yml
Normal file
45
.azure/azure-build-deploy-docs-pipeline.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Azure Static Web Apps CI/CD
|
||||
|
||||
pr: none
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
- job: build_and_deploy_job
|
||||
displayName: Build and Deploy Job
|
||||
condition: or(eq(variables['Build.Reason'], 'Manual'),or(eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.Reason'], 'IndividualCI')))
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
variables:
|
||||
- group: Azure-Static-Web-Apps-nice-bay-0ad032c03-variable-group
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
- script: |
|
||||
python -m pip install --upgrade pip==23.0.1
|
||||
pip install wheel==0.38.4 --upgrade
|
||||
pip install setuptools==66 --upgrade
|
||||
pip install build==0.10.0
|
||||
displayName: 'Install build dependencies'
|
||||
|
||||
- script: |
|
||||
pip install -e .[dev]
|
||||
displayName: 'Install Yawning-Titan for docs autosummary'
|
||||
|
||||
- script: |
|
||||
cd docs
|
||||
make html
|
||||
cd ..
|
||||
cd ..
|
||||
displayName: 'Build Docs'
|
||||
|
||||
- task: AzureStaticWebApp@0
|
||||
inputs:
|
||||
azure_static_web_apps_api_token: $(AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_BAY_0AD032C03)
|
||||
app_location: "/docs/_build/html"
|
||||
api_location: ""
|
||||
output_location: "/"
|
||||
displayName: 'Deploy Docs to nice-bay-0ad032c03'
|
||||
52
.azure/azure-ci-build-pipeline.yaml
Normal file
52
.azure/azure-ci-build-pipeline.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
trigger:
|
||||
- main
|
||||
- dev
|
||||
- feature/*
|
||||
- hotfix/*
|
||||
- bugfix/*
|
||||
- release/*
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
Python38:
|
||||
python.version: '3.8'
|
||||
Python39:
|
||||
python.version: '3.9'
|
||||
Python310:
|
||||
python.version: '3.10'
|
||||
Python311:
|
||||
python.version: '3.11'
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
displayName: 'Use Python $(python.version)'
|
||||
|
||||
- script: |
|
||||
python -m pip install --upgrade pip==23.0.1
|
||||
pip install wheel==0.38.4 --upgrade
|
||||
pip install setuptools==66 --upgrade
|
||||
pip install build==0.10.0
|
||||
pip install pytest-azurepipelines
|
||||
displayName: 'Install build dependencies'
|
||||
|
||||
- script: |
|
||||
python -m build
|
||||
displayName: 'Build PrimAITE'
|
||||
|
||||
- script: |
|
||||
PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl)
|
||||
python -m pip install $PRIMAITE_WHEEL[dev]
|
||||
displayName: 'Install PrimAITE'
|
||||
|
||||
#- script: |
|
||||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
# displayName: 'Lint with flake8'
|
||||
|
||||
- script: |
|
||||
pytest tests/
|
||||
displayName: 'Run unmarked tests'
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,6 +1,8 @@
|
||||
# PrimAITE Package
|
||||
PRIMAITE/outputs
|
||||
PRIMAITE/outputs/*
|
||||
src/primaite/outputs
|
||||
src/primaite/outputs/*
|
||||
src/primaite/logs
|
||||
src/primaite/logs/*
|
||||
TestResults
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
||||
25
.pre-commit-config.yaml
Normal file
25
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
repos:
|
||||
- repo: http://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: check-added-large-files
|
||||
args: ['--maxkb=1000']
|
||||
- id: mixed-line-ending
|
||||
- id: requirements-txt-fixer
|
||||
- repo: http://github.com/psf/black
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: http://github.com/pycqa/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
args: [ "--profile", "black" ]
|
||||
- repo: http://github.com/PyCQA/flake8
|
||||
rev: 6.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [ flake8-docstrings ]
|
||||
@@ -5,8 +5,8 @@
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
|
||||
@@ -5,24 +5,37 @@
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
import furo
|
||||
sys.path.insert(0, os.path.abspath("../"))
|
||||
|
||||
project = 'PrimAITE'
|
||||
copyright = '2022, jashort'
|
||||
author = 'jashort'
|
||||
release = '0.1.0'
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
year = datetime.datetime.now().year
|
||||
project = "primaite"
|
||||
copyright = f"Copyright (C) QinetiQ Training and Simulation Ltd 2021 - {year}"
|
||||
author = "QinetiQ Training and Simulation Ltd"
|
||||
|
||||
# The short Major.Minor.Build version
|
||||
with open("../src/primaite/VERSION", "r") as file:
|
||||
version = file.readline()
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = version
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ['sphinx_rtd_theme']
|
||||
extensions = []
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = []
|
||||
templates_path = ["_templates"]
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_static_path = ['_static']
|
||||
html_theme = "furo"
|
||||
html_static_path = ["_static"]
|
||||
@@ -9,11 +9,11 @@ Welcome to PrimAITE's documentation
|
||||
What is PrimAITE?
|
||||
------------------------
|
||||
|
||||
PrimAITE (Primary-level AI Training Environment) is a simulation environment for training AI under the ARCD programme. It incorporates the functionality required of a Primary-level environment, as specified in the Dstl ARCD Training Environment Matrix document:
|
||||
PrimAITE (Primary-level AI Training Environment) is a simulation environment for training AI under the ARCD programme. It incorporates the functionality required of a Primary-level environment, as specified in the Dstl ARCD Training Environment Matrix document:
|
||||
|
||||
* The ability to model a relevant platform / system context;
|
||||
* The ability to model key characteristics of a platform / system by representing connections, IP addresses, ports, traffic loading, operating systems, file system, services and processes;
|
||||
* Operates at machine-speed to enable fast training cycles.
|
||||
* The ability to model a relevant platform / system context;
|
||||
* The ability to model key characteristics of a platform / system by representing connections, IP addresses, ports, traffic loading, operating systems, file system, services and processes;
|
||||
* Operates at machine-speed to enable fast training cycles.
|
||||
|
||||
PrimAITE aims to evolve into an ARCD environment that could be used as the follow-on from Reception level approaches (e.g. YAWNING TITAN), and help bridge the Sim-to-Real gap into Secondary level environments (e.g. IMAGINARY YAK).
|
||||
|
||||
@@ -35,8 +35,8 @@ The best place to start is :ref:`about`
|
||||
:maxdepth: 8
|
||||
:caption: Contents:
|
||||
|
||||
about
|
||||
dependencies
|
||||
config
|
||||
session
|
||||
results
|
||||
source/about
|
||||
source/dependencies
|
||||
source/config
|
||||
source/session
|
||||
source/results
|
||||
@@ -7,8 +7,8 @@ REM Command file for Sphinx documentation
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=source
|
||||
set BUILDDIR=build
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=_build
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
|
||||
@@ -55,6 +55,7 @@ dev = [
|
||||
"pytest-cov==4.0.0",
|
||||
"pytest-flake8==1.1.1",
|
||||
"pip-licenses==4.3.0",
|
||||
"pre-commit==2.20.0",
|
||||
"wheel==0.38.4",
|
||||
"build==0.10.0"
|
||||
]
|
||||
|
||||
3
pytest.ini
Normal file
3
pytest.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
[pytest]
|
||||
testpaths =
|
||||
tests
|
||||
@@ -7,7 +7,7 @@
|
||||
# "GENERIC"
|
||||
agentIdentifier: STABLE_BASELINES3_A2C
|
||||
# Number of episodes to run per session
|
||||
numEpisodes: 10000
|
||||
numEpisodes: 10
|
||||
# Time delay between steps (for generic agents)
|
||||
timeDelay: 10
|
||||
# Filename of the scenario / laydown
|
||||
|
||||
1
tests/conftest.py
Normal file
1
tests/conftest.py
Normal file
@@ -0,0 +1 @@
|
||||
# Crown Copyright (C) Dstl 2022. DEFCON 703. Shared in confidence.
|
||||
Reference in New Issue
Block a user