Skip to content

Conversation

@virtuald
Copy link
Member

Well. Sorta. The goal is to make the library simpler to use and remove guesswork, so I ended up only flattening wpimath and wpilib.

  • hal.simuation and wpilib.simulation are different enough that it felt right to keep them
  • ntcore.meta isn't used by users
  • wpiutil isn't common enough to matter

- Keeping wpilib.simulation and wpilib.sysid since they're fairly distinct
@pjreiniger
Copy link
Contributor

pjreiniger commented Dec 21, 2025

Part of me likes the yaml files having the same directory structure as the the .hpp files in allwpilib, assuming that semiwrap doesn't automatically add a python subpackage when the files are in a nested directory. That isn't really what is happening now because of the big allwpilib reorg, but I thought I would voice my preference if files are getting moved around anyway,

Having said that I'm cool with the python side becoming flat.

@virtuald
Copy link
Member Author

semiwrap does not support having the yaml files in separate directories for the same module -- there's not really anything stopping it other than it doesn't do it right now.

I don't feel strongly about it either way, other than I think it would be annoying to add it because scan-headers and such all assume a flat directory structure.

@pjreiniger
Copy link
Contributor

I meant that more in terms of I prefer wpimath/semiwrap/goeomtry/Pose2d.yml vs wpimath/semiwrap/Pose2.yml

i.e with a root of <project>/semiwrap from there on it matches the include path. I wasn't talking about moving things out of the semiwrap directory

To me it helps to match this hpp file that is under wpilibc/src/main/native/include/wpi/hardware/discrete/AnalogInput.hpp with the yml file in semiwrap/wpi/hardware/discrete/AnalogInput.hpp. I think in terms of the allwpilib mirror it helps remove some of the witchcraft that semiwrap does if you can more directly associate the C++ vs python.

I'll also reiterate that this is a luke warm take. I'm ok with how it is, just commenting a "if it was me doing it"

@virtuald
Copy link
Member Author

Right. Currently semiwrap does not support that. It wouldn't be hard to make it work (probably one or two lines to correct), and slightly annoying to fix scan-headers to select the right directory (but doable).

I'm not going to do it, but I'm not opposed to it.

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.

3 participants