Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API docs #16

Merged
merged 11 commits into from
Dec 27, 2017
Merged

Add API docs #16

merged 11 commits into from
Dec 27, 2017

Conversation

thijstriemstra
Copy link
Contributor

  • use tox to test against multiple python versions
  • add sphinx api documentation
  • enforce pep8 style using flake8

fixes #5

@thijstriemstra
Copy link
Contributor Author

This is a work in progress @kplindegaard, I'll let you know when it's ready for review.

@kplindegaard
Copy link
Owner

Looking forward to it. Thanks!

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Dec 27, 2017

@kplindegaard I see many methods with a comment before the docstring like this:

    def open(self, bus):
        # type: (int) -> None
        """
        Open a given i2c bus.
        :param bus: i2c bus number (e.g. 0 or 1)
        """
        self.fd = os.open("/dev/i2c-{}".format(bus), os.O_RDWR)
        self.funcs = self._get_funcs()

e.g. # type: (int) -> None. Unfortunately this seems to screw up Sphinx, can I move those below the docstring instead?

@kplindegaard
Copy link
Owner

Go ahead. Could alternatively be deleted and we could add type hints in the docstring itself.

@thijstriemstra
Copy link
Contributor Author

Go ahead. Could alternatively be deleted and we could add type hints in the docstring itself.

I'll move them below the docstring and then you can later review them and move it into docstring.

@kplindegaard
Copy link
Owner

👍

@thijstriemstra
Copy link
Contributor Author

@kplindegaard this PR should be ready to go.

@thijstriemstra
Copy link
Contributor Author

thijstriemstra commented Dec 27, 2017

ps. i would squash merge this.. and you'll have to enable this repository on readthedocs.

@kplindegaard kplindegaard merged commit 9cdfa34 into kplindegaard:master Dec 27, 2017
@thijstriemstra thijstriemstra deleted the api-doc-5 branch December 27, 2017 22:32
@kplindegaard
Copy link
Owner

I hid some parts i don't think will be very relevant for the normal user and published the documentation on Read the docs
@thijstriemstra: Thank you for the great job you did!

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.

API documentation
2 participants