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.

ynezz added 4 commits April 9, 2021 10:36
It's good practice, one source of truth etc.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Otherwise we might get following issue with older versions:

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

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Seems to be not used anywhere.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
 * 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 <ynezz@true.cz>
@@ -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
@blogic blogic force-pushed the main branch 9 times, most recently from 4fdaeed to 1bdc8de Compare October 27, 2021 16:11
@blogic blogic force-pushed the main branch 5 times, most recently from 704e471 to 08e0c28 Compare November 11, 2021 09:17
@blogic blogic force-pushed the main branch 2 times, most recently from f926153 to 0a49566 Compare January 27, 2022 13:59
@blogic blogic force-pushed the main branch 3 times, most recently from 80727d5 to 7bc2f00 Compare February 4, 2022 06:27
@blogic blogic force-pushed the main branch 2 times, most recently from 68b8888 to 35adc26 Compare February 12, 2022 15:47
@blogic blogic force-pushed the main branch 6 times, most recently from 3ff0a8d to 6d83248 Compare May 26, 2022 06:54
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