Commit Graph

1854 Commits

Author SHA1 Message Date
Marek Wolan
abbfc86942 2623 update defaults 2024-07-11 15:50:35 +01:00
Marek Wolan
579469d1c3 2623 add sb3 contrib dependency 2024-07-11 11:25:38 +01:00
Marek Wolan
bdf5ff2167 2623 Add docs for action masking 2024-07-11 10:01:33 +01:00
Marek Wolan
0c58c3969a 2623 - finish testing action mask 2024-07-10 13:46:30 +01:00
Marek Wolan
7201b7b8e0 2623 Add e2e tests for action masking 2024-07-10 11:01:42 +01:00
Marek Wolan
faf268a9b9 2623 move action mask generation to game and fix MARL masking 2024-07-09 15:59:50 +01:00
Marek Wolan
5367f9ad53 2623 Ray single agent action masking 2024-07-09 15:27:03 +01:00
Marek Wolan
470fa28ee1 2623 Implement basic action masking logic 2024-07-09 13:13:13 +01:00
Marek Wolan
cbf54d442c #2623 Make it possible to view currently valid simulation requests 2024-07-08 15:17:35 +01:00
Czar Echavez
2a0695d0d1 #2688: apply the request validators + fixing the fix duration test + refactor test class names 2024-07-05 15:06:17 +01:00
Czar Echavez
20e5e40d0d Merged PR 446: Add fix duration in config
## Summary
Added a ``fix_duration`` config property in applications and services
Defaults to using 2 if none is specified

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/446?_a=files&path=/tests/integration_tests/configuration_file_parsing/test_software_fix_duration.py

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2725
2024-07-03 10:21:17 +00:00
Czar Echavez
797afc99ab Merge remote-tracking branch 'origin/dev' into feature/2725-add-software-fix-duration-config 2024-07-03 10:37:02 +01:00
Czar Echavez
55c457a87d #2725: apply PR suggestions 2024-07-03 10:34:44 +01:00
Marek Wolan
bd23ee2083 Merged PR 444: Refactor application install
## Summary
* Remove the ip address parameter from application install
* Make it possible to install any application that exists
* Add new configuration actions for applications
* Add an application registry to match names to application classes

## Test process
* several new tests
* notebooks still running

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2438, #2705
2024-07-02 15:57:59 +00:00
Czar Echavez
fcd1209156 #2725: documentation 2024-07-02 16:55:28 +01:00
Czar Echavez
6a72f6af42 #2725: add fix duration to application and service configuration 2024-07-02 15:52:18 +01:00
Marek Wolan
eb1f7555f8 Merged PR 445: #2702 - update data manipulation notebook text
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2702 - update data manipulation notebook text

Related work items: #2702
2024-07-02 14:29:05 +00:00
Marek Wolan
cbc414bddf #2702 - update data manipulation notebook text 2024-07-02 15:25:40 +01:00
Marek Wolan
59b4a162ef Merged PR 442: Add application configuration actions
## Summary
* Add new actions for configuring applications

## Test process
Integration tests.

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Related work items: #2700
2024-07-02 13:56:34 +00:00
Marek Wolan
feabe5117c #2700 Fix docstrings in application configure methods 2024-07-02 12:48:23 +01:00
Marek Wolan
b27ac52d9e #2700 add E2E tests for application configure actions 2024-07-02 11:10:19 +01:00
Marek Wolan
33b9c5f6b3 Merge branch 'feature/2701-refactor-install-action' into feature/2700-application-configure-actions 2024-07-02 10:41:17 +01:00
Czar Echavez
eee7a68f28 Merged PR 440: #2620: add nbmake and pytest xdist to run the notebooks as part of pieline
![image.png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/440/attachments/image.png)
![image (2).png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/440/attachments/image%20%282%29.png)

## Summary
Added nbmake so that the pytest can be used to run the notebooks in primaite as part of the pipeline

## Test process
n/a

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2620: add nbmake and pytest xdist to run the notebooks as part of pieline

Related work items: #2620
2024-07-02 08:21:29 +00:00
Czar Echavez
e2429df220 #2620: remove div zero from notebook 2024-07-02 02:52:08 +01:00
Czar Echavez
a5a93fe850 #2620: commit a div zero to check that the pipeline fails 2024-07-02 02:10:40 +01:00
Czar Echavez
12a6aa5e7f #2620: make the windows script work 2024-07-02 01:31:59 +01:00
Czar Echavez
88ab3c3ca1 #2620: remove shell 2024-07-02 00:45:24 +01:00
Czar Echavez
1faacc8d7c #2620: fix indentation 2024-07-02 00:28:59 +01:00
Czar Echavez
918eba2217 #2620: fix indentation 2024-07-02 00:25:30 +01:00
Czar Echavez
8097884ae2 #2620: modify script 2024-07-02 00:00:20 +01:00
Czar Echavez
ab3e84b8b9 #2620: remove irrelevant change 2024-07-01 17:03:14 +01:00
Czar Echavez
afcb844501 #2620: remove cell that fails on purpose 2024-07-01 16:45:28 +01:00
Marek Wolan
dc2c64b2f6 #2701 - Remove ip address option from node application install 2024-07-01 16:23:10 +01:00
Czar Echavez
9c568b0ff3 Merged PR 439: #2641: Added a check for software health state in db service + tests
## Summary
Added a check in the database service process_sql method that checks if the Database Service is in a GOOD state (mainly so that the database service being in a fixed state returns an error)

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/439?_a=files&path=/tests/integration_tests/system/test_database_on_node.py

https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/439?_a=files&path=/tests/integration_tests/system/test_web_client_server_and_database.py

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2641: Added a check for software health state in db service + tests

Related work items: #2641
2024-07-01 15:22:22 +00:00
Czar Echavez
a47a14b86e #2620: Going around azure dev ops to fail the script 2024-07-01 15:57:15 +01:00
Marek Wolan
91727f7fde Merged PR 438: #2705 - Move application registry into application module instead of hardcodi...
## Summary
- Add a registry class variable to Application.
- Add an identifier string for all existing applications
- Utilise application registry in game from_config method.

## Test process
New unit test for new features
existing tests pass
notebooks run as before

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [~] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

#2705 - Move application registry into application module instead of hardcoding in game module

Related work items: #2705
2024-07-01 14:33:44 +00:00
Marek Wolan
f2db8b0fb5 Merge remote-tracking branch 'origin/feature/2438-application-install-action-refactor' into feature/2700-application-configure-actions 2024-07-01 15:26:19 +01:00
Marek Wolan
bf8ec60833 #2700 Add configure dosbot action 2024-07-01 15:25:20 +01:00
Marek Wolan
ab73ac20e8 #2700 add ransomware configure action 2024-07-01 14:41:41 +01:00
Czar Echavez
4dd50be11a #2620: run notebooks after test so that the results can be published 2024-07-01 14:31:58 +01:00
Charlie Crane
96f62a3229 Merged PR 436: 2656 - Implement Optional Negative Reward
## Summary
This PR implements an "ActionPenalty" Reward class, that can be used for penalising an agent when it carries out an action other than DONOTHING.

The value for this can be configured within the scenario YAML file.

## Test process
I've written unit tests to check that the action penalty is correctly calculated and applied, another to check that the config is read correctly and loads into PrimaiteGymEnv correctly.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2656
2024-07-01 13:25:05 +00:00
Marek Wolan
2dd7546f3d 2705 Fix application tests by correctly renaming fixture 2024-07-01 13:25:16 +01:00
Marek Wolan
655bc04a42 #2705 Minor comment and name changes to applications 2024-07-01 13:21:08 +01:00
Czar Echavez
cb61756e43 #2620: attempting to fail pipeline if notebook fails 2024-07-01 12:21:05 +01:00
Czar Echavez
ee4e152f13 #2620: publish result of test and checking if pipeline fails 2024-07-01 12:00:17 +01:00
Marek Wolan
c34cb6d7ce #2700 Add DatabaseConfigure action 2024-07-01 11:31:27 +01:00
Czar Echavez
7ac503794d Merge remote-tracking branch 'origin/dev' into feature/2641-prevent-databaseservice-interactions-from-occurring-in-fixing-state 2024-06-28 16:46:52 +01:00
Czar Echavez
ce58f3960c #2620: downgrade pytest-xdist version 2024-06-28 16:43:10 +01:00
Czar Echavez
a4424608dd #2620: add nbmake and pytest xdist to run the notebooks as part of pieline 2024-06-28 16:33:24 +01:00
Czar Echavez
3ac97f8c3f #2641: Added a check for software health state in db service + tests 2024-06-28 13:07:57 +01:00