Commit Graph

2251 Commits

Author SHA1 Message Date
Marek Wolan
9f5e16dd85 #2869 - Edit test fixture to work with new agent system 2025-01-14 10:58:34 +00:00
Marek Wolan
e7cfeeafc0 Make data manipulation agent inherit from periodic agent & fix it a bit 2025-01-14 09:57:35 +00:00
Marek Wolan
a447c5f43c #2869 - Make periodic agent timing check stricter 2025-01-14 09:05:13 +00:00
Charlie Crane
23736f7738 #2869 - Documentation changes 2025-01-13 15:59:10 +00:00
Charlie Crane
edd2668ea4 #2869 - Update type hints and ConfigSchema variables in some agent classes 2025-01-13 15:08:48 +00:00
Charlie Crane
32fc970cfe #2869 - Update Config for some agent classes to use pydantic.Field, amend some identifiers and agent_name variables 2025-01-13 10:51:30 +00:00
Charlie Crane
511abea59c #2869 - Actioning review comments 2025-01-13 10:26:48 +00:00
Charlie Crane
c16abdfd30 #2869 - Remove agent_name from ConfigSchema and replace with type 2025-01-10 14:39:03 +00:00
Charlie Crane
e3f4775acb #2869 - Updates to ConfigSchema declaration and addressing some review comments 2025-01-10 14:09:15 +00:00
Charlie Crane
7af9d3724f #2869 - Updates to address test failures. Updated YAML configs to remove redundant start_settings 2025-01-08 14:42:35 +00:00
Charlie Crane
66d309871f #2869 - Minor changes trying to make pytest happy 2025-01-06 11:38:07 +00:00
Charlie Crane
505eab6ed9 #2869 - Changes following review discussion 2025-01-03 14:02:36 +00:00
Charlie Crane
55ddcb7eb4 #2869 - Pull in changes from 4.0.0a1-dev and resolve conflicts 2025-01-03 09:54:11 +00:00
Charlie Crane
2108b914e3 #2869 - New Year, new changes. Actioning review comments and some changes following self-review and catchup 2025-01-02 17:41:24 +00:00
Marek Wolan
491de6fc47 Revert pre-commit deleting files 2025-01-02 15:11:02 +00:00
Marek Wolan
bf32271ddd Change copyright to 2025 2025-01-02 15:05:06 +00:00
Charlie Crane
dc6f2be209 #2869 - pre-commit changes 2024-12-17 12:50:14 +00:00
Charlie Crane
770896200b #2869 - More YAML/test fixes to address failures 2024-12-17 12:47:54 +00:00
Charlie Crane
3b1b74fb3a #2869 - Some additional test updates to amend failures. Pre-commit tbd and some cleanup 2024-12-17 12:21:28 +00:00
Charlie Crane
436a986458 #2869 - Fixed failing tests from agent refactor. Some tests still fail but this is due to updating some action names in anticipation of merging in the extensible actions refactor 2024-12-17 10:51:57 +00:00
Charlie Crane
a4fbd29bb4 #2869 - Updates to agents to make sure they can be generated from a given config. Updates to test suite to reflect code changes 2024-12-16 15:57:00 +00:00
Charlie Crane
d9a1a0e26f 2869 - Addressing some typos in agent declaration, and neatening up the agent structure within PrimAITE. 2024-12-16 11:27:14 +00:00
Charlie Crane
c3a70be8d1 #2869 - Changes to AbstractAgent to address some pydantic issues 2024-12-13 16:37:39 +00:00
Charlie Crane
4c20cd4ac6 #2869 - initial creation of how to section for the new extendable agents. 2024-12-13 15:28:01 +00:00
Charlie Crane
4ac90c3c10 #2869 - Changes to agent refactor config schema, removal of state variables that aren't necessary to be in config 2024-12-13 11:05:24 +00:00
Charlie Crane
86ad872cba #2869 - Committing minor changes to base AbstractAgent class before changing branches 2024-12-12 11:32:59 +00:00
Charlie Crane
fe65cef9aa '2869 - Revert deletion of abstract_tap.py as needed for DataManipulationBot 2024-12-11 12:01:07 +00:00
Charlie Crane
feee028485 #2869 - Updates to Probabilistic Agent to follow the defined extensibility schema. 2024-12-11 11:58:42 +00:00
Charlie Crane
1798ec6fe0 #2869 - Commit before switching branches. Changes to make pydantic happy with AgentLog 2024-12-05 14:00:44 +00:00
Charlie Crane
917386d638 #2869 - Agents Refactor 2024-11-27 15:29:51 +00:00
Charlie Crane
7435a4dee8 #2869 - Commit before changing branches. Addition of properties to Agent classes and removal of if/else chain in game.py 2024-11-21 14:45:35 +00:00
Charlie Crane
75d4ef2dfd #2869 - eod commit. Updates to AbstractAgent.from_config, and some minor tweaks to PrimaiteGame 2024-11-20 17:51:05 +00:00
Charlie Crane
a3dc616126 #2869 - Starter changes in refactor of agent classes for refactor to become extensible. Identifiers added to classes and beginning of the inclusion of a ConfigSchema to base AbstractAgentClass 2024-11-20 17:19:35 +00:00
Marek Wolan
6844bd692a bump version to 4.0.0a1 2024-10-11 13:02:44 +01:00
Marek Wolan
9626cfc990 Merge remote-tracking branch 'origin/release/3.3.0' into 4.0.0a1 2024-10-11 12:42:32 +01:00
Marek Wolan
43ec85a669 #2755 - refix some air space frequency issues 2024-10-11 09:52:16 +01:00
Marek Wolan
8419fd751a Merged PR 561: Make it possible to add sets of nodes to the network
## Summary
* Changed the office LAN convenience function to a class with a registry. Now, plugin can register custom node adders.
* Added ability to define `node_sets` in the config that map to `NetworkNodeAdder` subclasses
* Made airspacefrequency into a DTO class again to make management simpler.
* Moved the node registry out of `HostNode` and `NetworkNode` into `Node`
* Changed game.py to check the hardcoded node types before the node registry (this will change once I add ConfigSchema to all node subclasses)
* Made `show` method of the network container show all nodes, including ones registered at runtime.

## Test process
* Existing tests passed.
* Added unit tests for node adders

## 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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code
2024-10-09 14:56:57 +00:00
Marek Wolan
611b34e29f remove outdated comment 2024-10-09 14:16:23 +01:00
Marek Wolan
a42398ac09 Fix typos and improve validation 2024-10-09 14:15:53 +01:00
Marek Wolan
56a17c3fea Update typos and comments according to PR comments 2024-10-08 13:40:40 +01:00
Marek Wolan
39c190e5f4 add documentation for node seta and update changelog 2024-10-04 12:46:29 +01:00
Marek Wolan
07c4860059 Add more tests for office lan creation 2024-10-04 11:36:48 +01:00
Marek Wolan
b4cc1b4379 Add tests for office lan creation 2024-10-04 11:07:49 +01:00
Marek Wolan
b5b7fc6a8d Give node types their own identifiers and make the network show method use them 2024-10-04 09:20:07 +01:00
Marek Wolan
5fde945fac rename identifier back to type 2024-10-02 14:24:59 +01:00
Marek Wolan
a838cc6ce1 Convert office lan adder to a class and make it extendable 2024-10-02 13:56:39 +01:00
Marek Wolan
d26fcf01a2 Merged PR 558: Make software manager show method always show all software.
DataFusionService didn't show in software list, because it uses the port_protocol_mapping as the source of truth for installed software instead of the software list itself.

This fixes that :)

Related work items: #2899
2024-09-30 08:16:46 +00:00
Marek Wolan
221e09ba51 Turn AirSpaceFrequency to a schema instead of a dict for validation 2024-09-27 15:06:19 +01:00
Marek Wolan
5282cb0294 #2899 - Make software manager always show() all software 2024-09-27 10:56:48 +01:00
Marek Wolan
521580ea12 Merged PR 555: Refactor Ports and Airspace to be extensible
## Summary
* Ports are no longer enums, they are now plain integers
* Ports are no longer validated against a list of pre-defined ports, any integer from 0-65535 can be used now.
* Port enum was replaced with a convenience port lookup. For example any expression in the form `Port.HTTP` was replaced with `PORT_LOOKUP["HTTP"]` which resolves to the integer 80.
* Some tests were adjusted to use the new syntax for ports
* Backwards compatibility for YAML configs has been retained by adding pydantic validators to automatically convert named ports to integer counterparts, however defining action/observation spaces in code now requires users to specify ports as integers instead of port enum objects. For instance, monitored_ports in the ACL observation space will now look like this: `[53, 80]` instead of `[Port.DNS, Port.HTTP]`
* Plugins can extend the port lookup, however it is not necessary because it's possible to use integer literals.
* Airspace has been treated similarly, except airspace frequencies have multiple attributes, namely max_data_rate_bps. Therefore, the lookup for named Frequencies resolves to a dictionary of freq_hz (float), and max_data_rate_bps (float)
* Airspace logic has been adjusted accordingly to use the new dictionary for tracking bandwidth limits
* A new method for registering new airspace frequencies has been added. Plugins that add new frequencies can call `register_default_frequency`, after which any new airspace will have access to that frequency.

* For consistency, `IPProtocol` was also changed to be a lookup instead of an enum. It is not extendable by plugins as so far we have not needed to model additional protocols in our plugin.

These changes were necessary as it's not possible to extend enums in python, therefore plugins would not have been able to add new ports. There is an added benefit that this is a stepping stone towards support communication on dynamic and ephemeral ports.

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

## 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
- [X] attended to any **TO-DOs** left in the code
2024-09-27 09:19:17 +00:00