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 documentation #456

Merged
merged 3 commits into from
Jan 17, 2023
Merged

Conversation

PerchunPak
Copy link
Member

@PerchunPak PerchunPak commented Jan 7, 2023

Note that documentation in general is not finished. This just adds the skeleton for the API docs, I also didn't adapt docstrings for Sphinx style yet, it will be a separated PR.

To see the docs:

  • Checkout to the branch
  • poetry install --with docs
  • cd docs
  • make html
  • Open _build/html/index.html in your browser.
  • Use a bar on the left and go to the API documentation.

I also used built-in Sphinx type hints support (see discussion in Discord) because the second variant was buggy. Although, I like the result.

@PerchunPak PerchunPak requested a review from ItsDrike as a code owner January 7, 2023 15:58
Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! There are several things that should be changed, but it's mostly just the wordings on some pages, but overall great work!

.github/workflows/validation.yml Outdated Show resolved Hide resolved
mcstatus.address
mcstatus.dns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to make these a part of the public API? These are purely internal tools which don't really have anything to do with obtaining status of minecraft servers. I would rather avoid making these public as it forces us to keep them backwards compatible. I'd put these on the internal page instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that mcstatus.dns is a part of Public API, maybe I just remember #203 wrong. Although, in the #203 description, it's clearly mentioned that this is a part of Public API.

I agree with Address.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that mcstatus.dns is a part of Public API, maybe I just remember #203 wrong. Although, in the #203 description, it's clearly mentioned that this is a part of Public API.

Fair, I might've originally intended it to be a part of the public API, however I'm not sure if it actually should be. I'd vote for moving it into the internal, and if someone really wants it they can still technically use it as an internal feature, without us guaranteeing backwards compatibility there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed Address from here in this force push.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also remove the dns module, as I said, it probably shouldn't be a part of the public API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/api/basic.rst Outdated Show resolved Hide resolved
docs/api/basic.rst Outdated Show resolved Hide resolved
docs/api/internal.rst Outdated Show resolved Hide resolved
docs/api/basic.rst Outdated Show resolved Hide resolved
docs/api/basic.rst Show resolved Hide resolved
docs/api/basic.rst Outdated Show resolved Hide resolved
docs/api/basic.rst Outdated Show resolved Hide resolved
docs/api/basic.rst Outdated Show resolved Hide resolved
@ItsDrike ItsDrike added area: documentation Related to project's documentation (comments, docstrings, docs) type: enhancement Improvement to an existing feature labels Jan 7, 2023
@PerchunPak PerchunPak force-pushed the api-docs branch 5 times, most recently from 9a33ad9 to 7ac4014 Compare January 8, 2023 16:46
@PerchunPak
Copy link
Member Author

Documentation build will be fixed after #458.

@kevinkjt2000 kevinkjt2000 merged commit 7f74d0e into py-mine:sphinx-docs Jan 17, 2023
@PerchunPak PerchunPak deleted the api-docs branch January 17, 2023 16:12
@PerchunPak PerchunPak mentioned this pull request Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Related to project's documentation (comments, docstrings, docs) type: enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants