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

feat: docs building #1

Merged
merged 22 commits into from
Aug 5, 2024
Merged

feat: docs building #1

merged 22 commits into from
Aug 5, 2024

Conversation

dtdang
Copy link
Collaborator

@dtdang dtdang commented Aug 1, 2024

What I did

Build plugin docs using sphinx.

fixes: #APE-243

How I did it

How to verify it

This is how the docs looks when it builds the repo through github actions: https://dtdang.github.io/ape-vyper/latest/

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@dtdang dtdang requested a review from antazoey August 1, 2024 22:04
@antazoey
Copy link
Member

antazoey commented Aug 2, 2024

Thoughts from viewing the demo:

  1. The logo is really small on desktop
Screenshot 2024-08-02 at 08 11 22

That is actually my only note, it looks amazing!

Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

This is looking great!

@@ -1,6 +1,6 @@
# Quick Start

TODO: Description
A script that uses sphinx to develop documentation for ApeWorX plugins.
Copy link
Member

Choose a reason for hiding this comment

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

refactor idea: We can make this less of a script and more of a package / sphinx plugin (at some point).

Something like:

from ape_plugins_docs import build_docs

(btw not saying we really need to publish this to pypi, only talking about the usage)

README.md Outdated Show resolved Hide resolved
_static/custom.css Show resolved Hide resolved
build_docs.py Outdated Show resolved Hide resolved
build_docs.py Outdated Show resolved Hide resolved
conf.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
conf.py Outdated Show resolved Hide resolved
@dtdang
Copy link
Collaborator Author

dtdang commented Aug 2, 2024

Thoughts from viewing the demo:

1. The logo is really small on desktop
Screenshot 2024-08-02 at 08 11 22

That is actually my only note, it looks amazing!

I'm thinking of asking Alex to combine the icon and name in one long logo instead to make it easier to see on the docs page since it does look really small there. I don't think there's a way to have 2 images side by side for the logo natively

setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

This seems acceptable as a first pass! We have some great ideas for how to improve the experience, but this solves the main problem of getting the docs build process in a central spot for all to share. Nice work!

README.md Outdated Show resolved Hide resolved
README.md Outdated

```bash
pip install docs-build
```
- name: Clone ape-docs-build
Copy link
Member

Choose a reason for hiding this comment

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

idea: Perhaps we should make a custom github actions so users can do:

uses: ApeWorX/ape-docs-build

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried working on making it a custom github action but I think I would have to rework some of it because of how I currently have it setup.

Copy link
Member

Choose a reason for hiding this comment

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

I can try to help

f.write(REDIRECT_HTML.format(redirect))


if __name__ == "__main__":
Copy link
Member

Choose a reason for hiding this comment

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

another idea: it may be nice to make this a click script instead.
we need to keep in mind developers wanting to build and run the docs locally to test changes to their plugins.
if the script is only available in CI/CD, they won't be able to do that!

Also, if we make it a click script, it'd be easy to eventually add it to the ape plugins docs commands

Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

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

One thing to do I just realized:

  1. Describe in the README how to build docs for a plugin locally as a developer
  2. Improve the dev-ex of building and serving docs locally

Part 2 can come in waves or in a later PR. Stuff like making it a CLI / click-script or adding it to ape plugins docs command or both..

In any case, developers are going to want to build docs locally

setup.py Outdated Show resolved Hide resolved
@dtdang dtdang merged commit 22f29da into ApeWorX:main Aug 5, 2024
5 checks passed
@dtdang dtdang deleted the feat/docs_setup branch August 5, 2024 17:16
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.

2 participants