Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

convert NamedTuples to @dataclass

Open
#38 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

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.

Description

enhancement

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.

Dominant language
Jupyter Notebook
Stars
1.8k
Forks
283
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/CyberBattleSim

All issues in microsoft/CyberBattleSim

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.