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

ci: generate schemas and documentation #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ynezz
Copy link
Collaborator

@ynezz ynezz commented Apr 9, 2021

Changes

  • Move Python requirements into requirements.txt
  • requirements: add pyyaml >= 5.3 dependency
  • README: remove obsolete jsonlint-php dependency
  • ci: generate schemas and documentation

GitHub pages

Preview https://ynezz.github.io/openwrt-ucentral-schema/

GitHub pages needs to be enabled:

image

Then the actual docs would get published once the CI workflow on main branch finishes.

It's good practice, one source of truth etc.

Signed-off-by: Petr Štetiar <[email protected]>
Otherwise we might get following issue with older versions:

 AttributeError: module 'yaml' has no attribute 'FullLoader'

Signed-off-by: Petr Štetiar <[email protected]>
Seems to be not used anywhere.

Signed-off-by: Petr Štetiar <[email protected]>
 * generate JSON schemas and documentation
 * upload documentation artifacts
 * create index.html for GitHub pages
 * publish documentation as GitHub pages (only on main branch)

Signed-off-by: Petr Štetiar <[email protected]>
@@ -39,5 +39,37 @@ jobs:
make -j$(($(nproc)+1)) -C $(pwd)/build all
sudo make -C $(pwd)/build install

- name: Install Python dependencies for YAML schemas
run: |
sudo apt-get install python3-setuptools
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@ynezz ynezz Apr 10, 2021

Choose a reason for hiding this comment

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

It's not that hard to check that the documentation is wrong. Who reads the documentation? :-) FYI real error I've tried to fix by that line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Reported upstream, strange that they messed this up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, it seems like they document and install python-setuptools for Python2, whereas I'm installing setuptools for Python3.

@blogic blogic force-pushed the main branch 10 times, most recently from 43ed9dc to e9431c8 Compare April 16, 2021 13:33
@blogic blogic force-pushed the main branch 3 times, most recently from 74de820 to 1025971 Compare May 3, 2021 12:30
@blogic blogic force-pushed the main branch 7 times, most recently from 8c5079d to 0a9ff8a Compare May 15, 2021 15:31
@blogic blogic force-pushed the main branch 4 times, most recently from 110fc02 to 66694c2 Compare June 7, 2021 14:30
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