diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..150ce68 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,31 @@ +name: pypi-publish + +on: + release: + types: [ published ] + workflow_dispatch: + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + - name: Create packages + run: python -m build + - name: Run twine check + run: twine check dist/* + - name: Upload to pypi + env: + TWINE_USERNAME: ${{ secrets.PYPI_USER }} + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload dist/*.whl diff --git a/README.md b/README.md index 8c86720..ccc9afd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +**Deployments** + +[![pages](https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg)][gha_pages] +[![pypi](https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg)][gha_pypi] + +[![PyPI version shields.io](https://img.shields.io/pypi/v/stream-localhost)][pypi] +[![Pypi-format](https://img.shields.io/pypi/format/stream-localhost)](https://pypi.org/project/stream-localhost/#files) +[![Pypi-status](https://img.shields.io/pypi/status/stream-localhost)][pypi] + # Video Streaming Video streaming using FastAPI @@ -17,3 +26,60 @@ Video streaming using FastAPI > - `IP_HOSTED` is typically set to `True` if port forwarding is used to expose the API > - This will allow the application to host the API on local IP instead of `localhost` (if `VIDEO_HOST` is `None`) > - This can also be done by specifying the local IP for the env var `VIDEO_HOST` manually + +## Coding Standards +Docstring format: [`Google`][google-docs]
+Styling conventions: [`PEP 8`][pep8] and [`isort`][isort] + +## [Release Notes][release-notes] +**Requirement** +```shell +python -m pip install gitverse +``` + +**Usage** +```shell +gitverse-release reverse -f release_notes.rst -t 'Release Notes' +``` + +## Linting +`pre-commit` will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL +markdown files (including Wiki pages) + +**Requirement** +```shell +pip install sphinx==5.1.1 pre-commit recommonmark +``` + +**Usage** +```shell +pre-commit run --all-files +``` + +## Pypi Package +[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)][pypi-repo] + +[https://pypi.org/project/stream-localhost/][pypi] + +## Runbook +[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)][sphinx] + +[https://jarvis-docs.vigneshrao.com/][runbook] + +## License & copyright + +© Vignesh Rao + +Licensed under the [MIT License][license] + +[license]: https://github.com/thevickypedia/pystream/blob/master/LICENSE +[pypi]: https://pypi.org/project/stream-localhost +[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/ +[release-notes]: https://github.com/thevickypedia/pystream/blob/master/release_notes.rst +[gha_pages]: https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment +[gha_pypi]: https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml +[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings +[pep8]: https://www.python.org/dev/peps/pep-0008/ +[isort]: https://pycqa.github.io/isort/ +[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html +[runbook]: https://jarvis-docs.vigneshrao.com/