microsoft / microsoft/CyberBattleSim
convert NamedTuples to @dataclass
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 1.8k
- Forks
- 286
- Avg merge
- 4h 35m
- Merged PRs (30d)
- 12
Description
Hi, I'm creating a frontend wrapper for this project and noticed that NamedTuple and @dataclasses are used almost interchangeably in model.py. I was wondering why that's the case and if it would be possible to just change all NamedTuples to @dataclasses. This would make the model more consistent. I tried changing it for a couple classes and didn't notice anything breaking.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading model.py and inventory every NamedTuple and @dataclass usage, noting how the frontend wrapper consumes these models. Check whether converting the remaining NamedTuples preserves the existing behavior, and consider the work done when model.py uses a consistent representation without breaking the wrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100