Skip to content
Permalink
Browse files

prepare 6.8.3 release (#111)

  • Loading branch information...
eli-darkly committed Feb 12, 2019
1 parent af8cc80 commit 0d74e1dc9388d6f74e676418a6e2f6923ac93e82
@@ -0,0 +1,12 @@
version: 2

python:
version: 3.5
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true
@@ -81,20 +81,22 @@ The SDK is tested with the most recent patch releases of Python 2.7, 3.3, 3.4, 3
Database integrations
---------------------

Feature flag data can be kept in a persistent store using Consul, DynamoDB, or Redis. These adapters are implemented in the `Consul`, `DynamoDB` and `Redis` classes in `ldclient.integrations`; to use them, call the `new_feature_store` method in the appropriate class, and put the returned object in the `feature_store` property of your client configuration. See [`ldclient.integrations`](https://github.com/launchdarkly/python-client-private/blob/master/ldclient/integrations.py) and the [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store) for more information.
Feature flag data can be kept in a persistent store using Consul, DynamoDB, or Redis. These adapters are implemented in the `Consul`, `DynamoDB` and `Redis` classes in `ldclient.integrations`; to use them, call the `new_feature_store` method in the appropriate class, and put the returned object in the `feature_store` property of your client configuration. See [`ldclient.integrations`](https://launchdarkly-python-sdk.readthedocs.io/en/latest/api-integrations.html#module-ldclient.integrations) and the [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store) for more information.

Note that Consul is not supported in Python 3.3 or 3.4.

Using flag data from a file
---------------------------

For testing purposes, the SDK can be made to read feature flag state from a file or files instead of connecting to LaunchDarkly. See [`file_data_source.py`](https://github.com/launchdarkly/python-client/blob/master/ldclient/file_data_source.py) and the [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/reading-flags-from-a-file) for more details.
For testing purposes, the SDK can be made to read feature flag state from a file or files instead of connecting to LaunchDarkly. See [`ldclient.integrations.Files`](https://launchdarkly-python-sdk.readthedocs.io/en/latest/api-integrations.html#ldclient.integrations.Files) and the [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/reading-flags-from-a-file) for more details.

Learn more
-----------
----------

Check out our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](http://docs.launchdarkly.com/docs/python-sdk-reference).

Generated API documentation is on [readthedocs.io](https://launchdarkly-python-sdk.readthedocs.io/en/latest/).

Testing
-------

@@ -116,16 +118,18 @@ About LaunchDarkly
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
* LaunchDarkly provides feature flag SDKs for
* [Java](http://docs.launchdarkly.com/docs/java-sdk-reference "Java SDK")
* [Java](http://docs.launchdarkly.com/docs/java-sdk-reference "LaunchDarkly Java SDK")
* [JavaScript](http://docs.launchdarkly.com/docs/js-sdk-reference "LaunchDarkly JavaScript SDK")
* [PHP](http://docs.launchdarkly.com/docs/php-sdk-reference "LaunchDarkly PHP SDK")
* [Python](http://docs.launchdarkly.com/docs/python-sdk-reference "LaunchDarkly Python SDK")
* [Go](http://docs.launchdarkly.com/docs/go-sdk-reference "LaunchDarkly Go SDK")
* [Node.JS](http://docs.launchdarkly.com/docs/node-sdk-reference "LaunchDarkly Node SDK")
* [Electron](http://docs.launchdarkly.com/docs/electron-sdk-reference "LaunchDarkly Electron SDK")
* [.NET](http://docs.launchdarkly.com/docs/dotnet-sdk-reference "LaunchDarkly .Net SDK")
* [Ruby](http://docs.launchdarkly.com/docs/ruby-sdk-reference "LaunchDarkly Ruby SDK")
* [iOS](http://docs.launchdarkly.com/docs/ios-sdk-reference "LaunchDarkly iOS SDK")
* [Android](http://docs.launchdarkly.com/docs/android-sdk-reference "LaunchDarkly Android SDK")
* [C/C++](http://docs.launchdarkly.com/docs/c-sdk-reference "LaunchDarkly C/C++ SDK")
* Explore LaunchDarkly
* [launchdarkly.com](http://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](http://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDKs
@@ -0,0 +1,52 @@
jobs:
- job: build
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: 'Setup Dynamo'
inputs:
targetType: inline
workingDirectory: $(System.DefaultWorkingDirectory)
script: |
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
mkdir dynamo
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
cd dynamo
javaw -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar
- task: PowerShell@2
displayName: 'Setup Consul'
inputs:
targetType: inline
workingDirectory: $(System.DefaultWorkingDirectory)
script: |
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
mkdir consul
Expand-Archive -Path consul.zip -DestinationPath consul
cd consul
sc.exe create "Consul" binPath="$(System.DefaultWorkingDirectory)/consul/consul.exe agent -dev"
sc.exe start "Consul"
- task: PowerShell@2
displayName: 'Setup Redis'
inputs:
targetType: inline
workingDirectory: $(System.DefaultWorkingDirectory)
script: |
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
mkdir redis
Expand-Archive -Path redis.zip -DestinationPath redis
cd redis
./redis-server --service-install
./redis-server --service-start
- task: PowerShell@2
displayName: 'Setup SDK and Test'
inputs:
targetType: inline
workingDirectory: $(System.DefaultWorkingDirectory)
script: |
python --version
pip install -r test-requirements.txt
pip install -r consul-requirements.txt
python setup.py install
mkdir test-reports
pytest -s --junitxml=test-reports/junit.xml testing;
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

.PHONY: help install html

SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = ldclient-py
SOURCEDIR = .
BUILDDIR = build

help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

install:
pip install -r requirements.txt

html: install
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,29 @@
# How the Python SDK documentation works

The generated API documentation is built with [Sphinx](http://www.sphinx-doc.org/en/master/), and is hosted on [Read the Docs](https://readthedocs.org/).

It uses the following:

* Docstrings within the code. Docstrings can use any of the markup supported by Sphinx.
* The `.rst` files in the `docs` directory. These provide the overall page structure.
* The `conf.py` file containing Sphinx settings.

## What to document

Every public class, method, and module should have a docstring. Classes and methods with no docstring will not be included in the API docs.

"Public" here means things that we want third-party developers to use. The SDK also contains many modules and classes that are not actually private (i.e. they aren't prefixed with `_`), but are for internal use only and aren't supported for any other use (we would like to reduce the amount of these in future).

To add an undocumented class or method in an existing module to the docs, just give it a docstring.

To add a new module to the docs, give it a docstring and then add a link to it in the appropriate `api-*.rst` file, in the same format as the existing links.

## Undocumented things

Modules that contain only implementation details are omitted from the docs by simply not including links to them in the `.rst` files.

Internal classes in a documented module will be omitted from the docs if they do not have any docstrings, unless they inherit from another class that has docstrings. In the latter case, the way to omit them from the docs is to edit the `.rst` file that contains the link to that module, and add a `:members:` directive under the module that specifically lists all the classes that _should_ be shown.

## Testing

In the `docs` directory, run `make html` to build all the docs. Then view `docs/build/html/index.html`.
@@ -0,0 +1,25 @@
Extending the SDK
=================

ldclient.interfaces module
--------------------------

.. automodule:: ldclient.interfaces
:members:
:special-members: __init__
:show-inheritance:

ldclient.feature_store_helpers module
-------------------------------------

.. automodule:: ldclient.feature_store_helpers
:members:
:special-members: __init__
:show-inheritance:

ldclient.versioned_data_kind module
-----------------------------------

.. automodule:: ldclient.versioned_data_kind
:members:
:show-inheritance:
@@ -0,0 +1,10 @@
Integrating with other services
===============================

ldclient.integrations module
----------------------------

.. automodule:: ldclient.integrations
:members:
:special-members: __init__
:show-inheritance:
@@ -0,0 +1,40 @@
Core API
========

ldclient module
---------------

.. automodule:: ldclient
:members: get,set_config,set_sdk_key
:show-inheritance:

ldclient.client module
----------------------

.. automodule:: ldclient.client
:members: LDClient
:special-members: __init__
:show-inheritance:

ldclient.config module
----------------------

.. automodule:: ldclient.config
:members:
:special-members: __init__
:show-inheritance:

ldclient.flag module
--------------------

.. automodule:: ldclient.flag
:members: EvaluationDetail
:special-members: __init__
:show-inheritance:

ldclient.flags_state module
---------------------------

.. automodule:: ldclient.flags_state
:members:
:show-inheritance:

0 comments on commit 0d74e1d

Please sign in to comment.
You can’t perform that action at this time.