Skip to content

14 modify contributingmd - #23

Merged
sadda merged 4 commits into
mainfrom
14-modify-contributingmd
Sep 3, 2026
Merged

sadda merged 4 commits into
mainfrom
14-modify-contributingmd

Conversation

@haitao-ZCU

Copy link
Copy Markdown
Collaborator

Closes #14

Updates CONTRIBUTING.md to reflect the current repository structure, adds a section on how pull requests should be performed, and adds instructions for running the tests.

@haitao-ZCU haitao-ZCU linked an issue Sep 3, 2026 that may be closed by this pull request
@sadda
sadda merged commit 778d66e into main Sep 3, 2026
6 checks passed
smidl added a commit that referenced this pull request Sep 4, 2026
`Geometry2`/`Computation2` are named for being the second machine defined, not for
the machine they describe. Nothing in the name says 5-phase, 40-slot, 113-turn, and
nothing distinguishes it from the other 5-phase variants people are running on
branches.

Renames each machine to one module per anchor, named `<class>_<phases>f_<slots>s_<turns>t`
as CONTRIBUTING's (dropped) anchor section specified:

  motors/motor1.py -> motors/synrm_3f_36s_68t.py
  motors/motor2.py -> motors/synrm_5f_40s_113t.py

Each exports plain `Geometry` and `Computation`, so the module name carries the
identity and the class names stay uniform. The numbering existed only because both
machines shared a namespace; per-anchor modules remove the need for it.

  from motors.synrm_5f_40s_113t import Geometry, Computation

The old paths remain as deprecation shims re-exporting `Geometry2`/`Computation2`,
so branches that predate this keep importing and can migrate on their own schedule.

Also restores the anchor definition to CONTRIBUTING (it survives on the
`contributing` branch but was dropped in #23, leaving "anchor" used three times and
never defined, and the sentence "add an **motors**" mid-substitution), and fixes that
sentence. The restored definition requires an anchor to declare its rotor radii --
which the 5-phase anchor currently does not; that is a separate fix.

No behaviour change: pure rename plus docs. Suite is 26 passed / 1 deselected,
identical to main, and Ruff is clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
smidl added a commit that referenced this pull request Sep 4, 2026
`Geometry2`/`Computation2` are named for being the second machine defined, not for
the machine they describe. Nothing in the name says 5-phase or 40-slot, and nothing
distinguishes it from the other 5-phase variants people run on branches.

One module per anchor, named `<class>_<phases>f_<slots>s`:

  motors/motor1.py -> motors/synrm_3f_36s.py
  motors/motor2.py -> motors/synrm_5f_40s.py

Each exports plain `Geometry` and `Computation`, so the module name carries the
identity and the class names stay uniform. The numbering existed only because both
machines shared a namespace; per-anchor modules remove the need for it.

  from motors.synrm_5f_40s import Computation, Geometry

The name carries only what the anchor fixes for good -- class, phases, slots. Turns
are deliberately left out: `Nc` is routinely swept, so a name containing it goes
stale. Same reasoning for currents and bus voltage.

The old paths remain as deprecation shims re-exporting `Geometry2`/`Computation2`,
so branches that predate this keep importing and can migrate on their own schedule.

Also restores the anchor definition to CONTRIBUTING (it survives on the
`contributing` branch but was dropped in #23, leaving "anchor" used three times and
never defined, and the sentence "add an **motors**" mid-substitution), and fixes that
sentence.

No behaviour change. Both anchor modules were verified content-identical to the
`motor1.py`/`motor2.py` they replace, modulo the class renames and a one-line
docstring -- including the fixes from #28 and #29, which landed in `motor2.py` while
this branch was open and had to be carried across by hand. That is worth noting: a
rename PR gets *no merge conflict* when a fix lands in the file it moves, because the
new path is an unrelated add. Suite is 26 passed / 1 deselected, identical to main;
Ruff clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
smidl added a commit that referenced this pull request Sep 6, 2026
`Geometry2`/`Computation2` are named for being the second machine defined, not for
the machine they describe. Nothing in the name says 5-phase or 40-slot, and nothing
distinguishes it from the other 5-phase variants people run on branches.

One module per anchor, named `<class>_<phases>f_<slots>s`:

  motors/motor1.py -> motors/synrm_3f_36s.py
  motors/motor2.py -> motors/synrm_5f_40s.py

Each exports plain `Geometry` and `Computation`, so the module name carries the
identity and the class names stay uniform. The numbering existed only because both
machines shared a namespace; per-anchor modules remove the need for it.

  from motors.synrm_5f_40s import Computation, Geometry

The name carries only what the anchor fixes for good -- class, phases, slots. Turns
are deliberately left out: `Nc` is routinely swept, so a name containing it goes
stale. Same reasoning for currents and bus voltage.

Also restores the anchor definition to CONTRIBUTING (it survives on the
`contributing` branch but was dropped in #23, leaving "anchor" used three times and
never defined, and the sentence "add an **motors**" mid-substitution), and fixes that
sentence.

No behaviour change: the two anchor modules were diffed against the `motor1.py` /
`motor2.py` they replace, with the class renames normalised away, and are identical
apart from a one-line docstring -- including the fixes from #28 and #29, which landed
in `motor2.py` while this branch was open and had to be carried across by hand.

Callers must update their import path; there is no compatibility shim, so a stale
import fails loudly rather than silently resolving to an aliased class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@haitao-ZCU
haitao-ZCU deleted the 14-modify-contributingmd branch September 9, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify CONTRIBUTING.md

2 participants