The /daeclipse
folder contains the contents of the daeclipse
Python package. The purpose of the package is to conveniently wrap DeviantArt Eclipse API calls, similar to an SDK. poetry
is used for Python dependency management and packaging.
To get started, make sure to install poetry dependencies at the root.
poetry install
pytest
is used for unit testing, with all code written in the tests/
directory. All coverage reports are sent to codecov
. This is also automatically checked and sent via the GitHub Actions workflow test-python.yml.
To run tests locally:
poetry run pytest test
To run tests locally with a coverage report returned in the terminal:
poetry run pytest --cov=daeclipse test
To run tests locally with a coverage report returned as xml:
poetry run pytest --cov=daeclipse --cov-report=xml test
Code for all of the above follows the wemake-python-styleguide guidelines. This is also automatically checked via the GitHub Actions workflow lint-python.yml.
Linting can be run locally via the below command at root, although the local linter is more restrictive than the GitHug Actiions linter:
flake8
pdoc
is used for automated Python documentation generation. All documentation is generated on the main
branch into a build/python/
folder, which is then deployed to the gh-pages
branch via the GitHub Actions workflow gh-pages.yml.
The GitHub Actions workflow pypi.yml uses JRubics/poetry-publish
to publish the daeclipse
folder contents to pypi.org. Releases are published after a release is tagged on GitHub, formatted as v*.*.*
.
The /spec
folder contains the modularized OpenAPI spec to document how the DeviantArt Eclipse API behaves. Implementation is based on dgarcia360/openapi-boilerplate.
To get started, make sure to install node dependencies at the root.
npm install
The below command bundles the spec as one .yaml
file.
npm run build
The minified document is stored in _build/api/openapi.yaml
.
The below command checks if the document follows the OpenAPI 3.0 Specification.
npm run test
The below command builds a docs site so that you can view the rendering on your local browser.
npm run preview
The server starts on http://127.0.0.1:8080
You can optionally also generate the HTML and view index.html
.
npm run html
Courtesy of the boilerplate repo, the OpenAPI Spec is linted using Spectral. This is also automatically checked via the GitHub Actions workflow lint-openapi.yml.
OpenAPI linting can also be performed locally by running the below command to check if the document follows the OpenAPI 3.0 Specification.
npm run test
redoc
is used for automated OpenAPI documentation generation, courtesy of the boilerplate. All documentation is generated on the main
branch into a build/api/
folder, which is then deployed to the gh-pages
branch via the GitHub Actions workflow gh-pages.yml.
The OpenAPI ReDoc documentation is deployed to the gh-pages
branch via the GitHub Actions workflow gh-pages.yml.
The documentation that links to the separate specific documentation is stored as Markdown files in docs/
. mkdocs
takes the contents and formats as a helpful documentation site via GitHub Pages and the GitHub Actions workflow gh-pages.yml.
To preview the docs/
folder as the HTML site locally:
mkdocs build
The command will generate a build/
folder containing the website contents.
The full documentation is deployed to the gh-pages
branch via the GitHub Actions workflow gh-pages.yml.