adafruit / Adafruit_CircuitPython_ServoKit

CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT kits.
MIT License
69 stars 29 forks source link

sphinx does not properly link to adafruit_motor classes #25

Closed ktdreyer closed 3 years ago

ktdreyer commented 3 years ago

Something is not quite right with the Sphinx links for adafruit_motor. The servokit API page has the strings :py:class:~adafruit_motor.servo.ContinuousServo and :py:class:~adafruit_motor.servo.Servo rather than linking to the class docs for ContinuousServo and Servo.

I was looking at this a bit, and I can't figure out how to make Sphinx link those classes, but maybe someone has some idea?

ladyada commented 3 years ago

im not a sphinx-pert... @tannewt any advice (or someone else who knows the deets)?

tannewt commented 3 years ago

I think there are two things to do:

  1. Use one ` instead of two where the references are. For example: https://github.com/adafruit/Adafruit_CircuitPython_ServoKit/blob/master/adafruit_servokit.py#L107 Once that's done, the doc build should break.
  2. Add the intersphinx mapping for motor to the conf.py here: https://github.com/adafruit/Adafruit_CircuitPython_ServoKit/blob/master/docs/conf.py#L33 It should follow the same pattern as Register. This should fix the doc build.

@ktdreyer Want to try fixing it?

jposada202020 commented 3 years ago

Fix by #28