Skip to content

Commit

Permalink
Merge pull request #7 from chmoder/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
chmoder authored Oct 30, 2022
2 parents 98af83a + e270156 commit 14857c9
Show file tree
Hide file tree
Showing 16 changed files with 796 additions and 66 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install poetry && poetry install
- name: Check codestlye with Black
uses: psf/black@stable
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
echo "skipping till flake8 + sphinx resolve conflict"
- name: Security Analysis with bandit
run: |
mkdir ci-logs
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
A python client for the https://strike.me API

### Developer Documentation
[Install Poetry](# https://python-poetry.org/docs/#installation)

[Install Poetry](https://python-poetry.org/docs/#installation)
```
python -m pip install --upgrade pip
pip install poetry
poetry install
```
```

## Build Docs
poetry run sphinx-apidoc -F -o ./docs ../strike_api
poetry run make clean && poetry run make html
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
36 changes: 36 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "strike_api"
copyright = "2022, Author"
author = "Author"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.todo",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

language = "en"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# -- Options for todo extension ----------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration

todo_include_todos = True
21 changes: 21 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. strike_api documentation master file, created by
sphinx-quickstart on Sun Oct 30 09:23:43 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to strike_api's documentation!
======================================

.. toctree::
:maxdepth: 4
:caption: Contents:

strike_api


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
61 changes: 61 additions & 0 deletions docs/strike_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
strike\_api package
===================

Submodules
----------

strike\_api.accounts module
---------------------------

.. automodule:: strike_api.accounts
:members:
:undoc-members:
:show-inheritance:

strike\_api.base module
-----------------------

.. automodule:: strike_api.base
:members:
:undoc-members:
:show-inheritance:

strike\_api.events module
-------------------------

.. automodule:: strike_api.events
:members:
:undoc-members:
:show-inheritance:

strike\_api.invoices module
---------------------------

.. automodule:: strike_api.invoices
:members:
:undoc-members:
:show-inheritance:

strike\_api.rates module
------------------------

.. automodule:: strike_api.rates
:members:
:undoc-members:
:show-inheritance:

strike\_api.subscriptions module
--------------------------------

.. automodule:: strike_api.subscriptions
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: strike_api
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 14857c9

Please sign in to comment.