microsoft / microsoft/Qcodes

Look into way to mass rewrite add parameter

Open
#4,458 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
459
Forks
359
Avg merge
3d 6h
Merged PRs (30d)
73

Description

Once #4412 lands it would be nice to transform all call of the form

```
self.add_parameter(name="foo", ...)
```
to

```
self.foo = self._add_parameter(name="foo" ....)
"""
Parameter foo
"""
```

So that parameters are documented, and completion works as expected.

Investigate how much effort it would take to do this using ast or similar.
See https://stackoverflow.com/questions/36022935/rewriting-code-with-ast-python for inspiration

Contributor guide

Open the 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.

Research direction

Start by reviewing the changes planned in #4412 and the existing self.add_parameter call pattern. Compare Python AST or similar rewriting approaches, using the linked Stack Overflow example for context. Done means documenting whether the mass transformation is feasible, its effort, and any scope or limitations.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.