Skip to content

Commit e6c8e3d

Browse files
authored
docs: publish to readthedocs (#14)
* docs: publish to readthedocs * style: format python code (pep8) Co-authored-by: HeZean <HeZean@users.noreply.github.com>
1 parent 4c24952 commit e6c8e3d

13 files changed

Lines changed: 246 additions & 40 deletions

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ cover/
3636

3737

3838
dist/
39-
featureprobe_server.egg-info/
39+
featureprobe_server_sdk_python.egg-info/
40+
41+
docs/_build

README.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FeatureProbe Server Side SDK for Python
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
.. image:: https://img.shields.io/pypi/v/featureprobe-server-sdk-python
5+
:target: https://pypi.python.org/pypi/featureprobe-server-sdk-python
6+
:alt: PyPI Version
7+
8+
.. image:: https://img.shields.io/pypi/pyversions/featureprobe-server-sdk-python.svg
9+
:target: https://pypi.python.org/pypi/featureprobe-server-sdk-python
10+
:alt: Python Version
11+
12+
.. image:: https://codecov.io/gh/FeatureProbe/server-sdk-python/branch/main/graph/badge.svg
13+
:target: https://codecov.io/gh/FeatureProbe/server-sdk-python
14+
:alt: CodeCov
15+
16+
.. image:: https://img.shields.io/github/stars/FeatureProbe/server-sdk-python
17+
:target: https://github.com/FeatureProbe/server-sdk-python/stargazers
18+
:alt: GitHub Star
19+
20+
.. image:: https://img.shields.io/github/license/FeatureProbe/server-sdk-python
21+
:target: https://github.com/FeatureProbe/server-sdk-python/blob/main/LICENSE
22+
:alt: License
23+
24+
Feature Probe is an open source feature management service. This SDK is used to control features in Python programs.
25+
This SDK is designed primarily for use in multi-user systems such as web servers and applications.
26+
27+
28+
Basic Terms
29+
-----------
30+
31+
Reading the short `Basic Terms <https://docs.featureprobe.io/sdk/sdk-introduction>`_ will help to understand the code blow more easily.
32+
`中文 <https://github.com/FeatureProbe/FeatureProbe/blob/main/BASIC_TERMS_CN.md>`_
33+
34+
35+
How to User This SDK
36+
--------------------
37+
38+
See `SDK Doc <https://docs.featureprobe.io/sdk/Server-Side%20SDKs/python-sdk>`_ for detail.
39+
`中文 <https://docs.featureprobe.io/zh-CN/sdk/Server-Side%20SDKs/python-sdk>`_
40+
41+
42+
Contributing
43+
------------
44+
45+
We are working on continue evolving FeatureProbe core, making it flexible and easier to use.
46+
Development of FeatureProbe happens in the open on GitHub, and we are grateful to the
47+
community for contributing bugfixes and improvements.
48+
49+
Please read `CONTRIBUTING <https://github.com/FeatureProbe/featureprobe/blob/master/CONTRIBUTING.md>`_
50+
for details on our code of conduct, and the process for taking part in improving FeatureProbe.
51+
52+
53+
License
54+
-------
55+
56+
This project is licensed under the Apache 2.0 License - see the `LICENSE <LICENSE>`_ file for details.

demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
SDK_KEY = 'server-8ed48815ef044428826787e9a238b9c6a479f98c'
1717
with fp.Client(SDK_KEY, config) as client:
1818
# Create one user
19-
user = fp.User().with_attr('userId', '00001') # "userId" is used in rules, should be filled in.
19+
# "userId" is used in rules, should be filled in.
20+
user = fp.User().with_attr('userId', '00001')
2021

2122
# Get toggle result for this user.
2223
TOGGLE_KEY = 'campaign_allow_list'

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
API References
2+
============
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
featureprobe

docs/conf.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import os
2+
import sys
3+
4+
sys.path.insert(0, os.path.abspath('..'))
5+
6+
7+
project = 'featureprobe-server-sdk-python'
8+
copyright = 'FeatureProbe'
9+
author = 'FeatureProbe'
10+
version = '1.x'
11+
12+
13+
extensions = [
14+
'sphinx.ext.autodoc',
15+
'sphinx.ext.intersphinx',
16+
]
17+
18+
templates_path = ['_templates']
19+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
20+
21+
html_theme = "sphinx_rtd_theme"
22+
html_static_path = ['_static']
23+
24+
source_suffix = '.rst'
25+
master_doc = 'index'
26+
27+
autodoc_member_order = 'alphabetical'

docs/contributing.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Contributing
2+
------------
3+
4+
We are working on continue evolving FeatureProbe core, making it flexible and easier to use.
5+
Development of FeatureProbe happens in the open on GitHub, and we are grateful to the
6+
community for contributing bugfixes and improvements.
7+
8+
Please read `CONTRIBUTING <https://github.com/FeatureProbe/featureprobe/blob/master/CONTRIBUTING.md>`_
9+
for details on our code of conduct, and the process for taking part in improving FeatureProbe.
10+
11+
12+
* `Bug Report <https://github.com/FeatureProbe/server-sdk-python/issues>`_
13+
* `Feature Request <https://github.com/FeatureProbe/FeatureProbe/issues>`_

docs/featureprobe.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
featureprobe package
2+
====================
3+
4+
featureprobe.client module
5+
--------------------------
6+
7+
.. automodule:: featureprobe.client
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
12+
featureprobe.config module
13+
--------------------------
14+
15+
.. automodule:: featureprobe.config
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
featureprobe.detail module
21+
--------------------------
22+
23+
.. automodule:: featureprobe.detail
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
28+
featureprobe.evaluation\_result module
29+
--------------------------------------
30+
31+
.. automodule:: featureprobe.evaluation_result
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
35+
36+
featureprobe.http\_config module
37+
--------------------------------
38+
39+
.. automodule:: featureprobe.http_config
40+
:members:
41+
:undoc-members:
42+
:show-inheritance:
43+
44+
featureprobe.user module
45+
------------------------
46+
47+
.. automodule:: featureprobe.user
48+
:members:
49+
:undoc-members:
50+
:show-inheritance:
51+
52+
Module contents
53+
---------------
54+
55+
.. automodule:: featureprobe
56+
:members:
57+
:undoc-members:
58+
:show-inheritance:

docs/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. include:: ../README.rst
2+
:end-before: Basic Term
3+
4+
5+
.. toctree::
6+
:maxdepth: 2
7+
:caption: Contents:
8+
9+
10+
Table of Contents
11+
:::::::::::::::::
12+
13+
.. toctree::
14+
:maxdepth: 1
15+
16+
userguide
17+
api
18+
contributing

0 commit comments

Comments
 (0)