Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare 6.8.3 release #111

Merged
merged 114 commits into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
96a1cc3
add option to reduce front-end metadata for untracked flags
eli-darkly Oct 5, 2018
e59a1c7
Merge pull request #76 from launchdarkly/eb/ch24449/less-metadata
eli-darkly Oct 5, 2018
89056fc
fix logic for whether a flag is tracked in all_flags_state
eli-darkly Oct 8, 2018
1fc23e4
use expiringdict from PyPi
eli-darkly Oct 14, 2018
0a30e0d
Merge pull request #77 from launchdarkly/eb/ch24449/less-metadata-2
eli-darkly Oct 15, 2018
103b339
Merge pull request #78 from launchdarkly/eb/ch25286/expiring-dict
eli-darkly Oct 15, 2018
40f2ca4
merge from public after release
LaunchDarklyCI Oct 17, 2018
ae8b25e
implement file data source, not including auto-update
eli-darkly Nov 1, 2018
850837d
rm debugging
eli-darkly Nov 1, 2018
aa7684a
rm debugging
eli-darkly Nov 1, 2018
39c9042
Python 3 compatibility fix
eli-darkly Nov 1, 2018
a43bf0c
add file watching, update documentation and tests
eli-darkly Nov 2, 2018
2cea730
readme
eli-darkly Nov 2, 2018
dcf1afe
debugging
eli-darkly Nov 2, 2018
4e98fdd
debugging
eli-darkly Nov 2, 2018
8f3c221
debugging
eli-darkly Nov 2, 2018
84276dd
fix cleanup logic
eli-darkly Nov 2, 2018
2a822e6
rm debugging
eli-darkly Nov 2, 2018
eaabe4d
Merge pull request #79 from launchdarkly/eb/ch26233/file-data-source
eli-darkly Nov 14, 2018
ac5e8de
typo in comment
eli-darkly Nov 14, 2018
39f5f62
merge from public after release
LaunchDarklyCI Nov 14, 2018
040ced9
add feature store wrapper class and make Redis feature store use it
eli-darkly Dec 29, 2018
59a67a8
test the new Redis factory method
eli-darkly Dec 29, 2018
1e38ac1
add DynamoDB support
eli-darkly Dec 29, 2018
431dddf
add test credentials
eli-darkly Dec 29, 2018
3aa5644
link in comment
eli-darkly Dec 31, 2018
bd00276
comment
eli-darkly Dec 31, 2018
11eabd3
Merge branch 'eb/ch28329/feature-store-support' into eb/ch28329/dynamodb
eli-darkly Dec 31, 2018
534ec5d
don't catch exceptions in Redis feature store, let the client catch them
eli-darkly Dec 31, 2018
5f16c8d
gitignore
eli-darkly Dec 31, 2018
ac0f2ea
misc test fixes
eli-darkly Dec 31, 2018
fa56526
Merge branch 'eb/ch28329/feature-store-support' into eb/ch28329/dynamodb
eli-darkly Dec 31, 2018
3a1c2dc
Merge pull request #81 from launchdarkly/eb/ch28329/dynamodb
eli-darkly Jan 9, 2019
b06eef9
Merge pull request #80 from launchdarkly/eb/ch28329/feature-store-sup…
eli-darkly Jan 9, 2019
256b6fb
implement dependency ordering for feature store data
eli-darkly Jan 9, 2019
289077c
fix incomplete implementation & test
eli-darkly Jan 9, 2019
2c59294
Python 3.x fix
eli-darkly Jan 9, 2019
1dd6961
Merge pull request #82 from launchdarkly/eb/ch29197/dependency-order
eli-darkly Jan 15, 2019
78b6118
minor doc fixes
eli-darkly Jan 16, 2019
931d008
merge from public after release
LaunchDarklyCI Jan 16, 2019
3eb821c
feature store test improvements
eli-darkly Jan 18, 2019
cc938e3
better database prefix test
eli-darkly Jan 19, 2019
5b8b337
clarify comment
eli-darkly Jan 19, 2019
b911d9e
Merge pull request #83 from launchdarkly/eb/feature-store-tests
eli-darkly Jan 19, 2019
f9ce243
add Consul feature store integration
eli-darkly Jan 19, 2019
89a96be
typo
eli-darkly Jan 19, 2019
da8c1a6
rm extra import
eli-darkly Jan 19, 2019
b19e618
fix byte/string issue and rename file
eli-darkly Jan 19, 2019
db621dc
rename file
eli-darkly Jan 19, 2019
b09e07e
docs
eli-darkly Jan 19, 2019
9ea89ca
script typo
eli-darkly Jan 19, 2019
a50e6f3
move all low-level feature store integration code into submodules
eli-darkly Jan 19, 2019
68c55b4
Merge pull request #84 from launchdarkly/eb/ch28431/consul
eli-darkly Jan 26, 2019
0baddab
move file data source implementation
eli-darkly Jan 28, 2019
c8585ba
don't need future.with_statement in Python 2.6+
eli-darkly Jan 28, 2019
2a6d53b
don't need future.absolute_import in Python 2.6+
eli-darkly Jan 28, 2019
c32793a
don't need future.print_function when you're printing a single string…
eli-darkly Jan 28, 2019
4971d17
don't need future.division since we're not using the / operator
eli-darkly Jan 28, 2019
0abadf1
rm unused dependency
eli-darkly Jan 28, 2019
e228e90
Revert "rm unused dependency"
eli-darkly Jan 28, 2019
122d7a6
don't need builtins.object unless we're defining an iterator, and eve…
eli-darkly Jan 29, 2019
6a45e70
update docs with note on portability
eli-darkly Jan 29, 2019
858e001
typo
eli-darkly Jan 29, 2019
6788526
Merge pull request #86 from launchdarkly/eb/ch30683/future
eli-darkly Jan 29, 2019
5657142
Merge pull request #85 from launchdarkly/eb/move-modules
eli-darkly Jan 31, 2019
d4d4b8a
update package metadata prior to release
eli-darkly Jan 31, 2019
7a6db77
Merge pull request #87 from launchdarkly/eb/ch30988/setup-py
eli-darkly Jan 31, 2019
4787d44
merge from public after release
LaunchDarklyCI Jan 31, 2019
eaf677e
add test for whether the package can be installed
eli-darkly Jan 31, 2019
eae17f6
fix build
eli-darkly Jan 31, 2019
0892c97
fix build
eli-darkly Jan 31, 2019
e21aa65
fix manifest
eli-darkly Jan 31, 2019
0520a9b
skip test on 3.3
eli-darkly Jan 31, 2019
9deef2d
misc fixes for 3.3
eli-darkly Jan 31, 2019
e44abfa
another 3.3 fix
eli-darkly Jan 31, 2019
273219a
misc fixes
eli-darkly Jan 31, 2019
b3944f9
misc fixes
eli-darkly Jan 31, 2019
02dad33
Merge branch 'eb/ch31016/test-packaging' into eb/ch31016/fix-packaging
eli-darkly Jan 31, 2019
5706f21
Merge pull request #89 from launchdarkly/eb/ch31016/fix-packaging
eli-darkly Jan 31, 2019
9ac4c3b
Merge pull request #88 from launchdarkly/eb/ch31016/test-packaging
eli-darkly Jan 31, 2019
60aa805
merge from public after release
LaunchDarklyCI Jan 31, 2019
b4792e6
add test for importing the built package
eli-darkly Jan 31, 2019
7c2b501
add submodule imports
eli-darkly Jan 31, 2019
a9d481c
ensure that all packages are included in distribution
eli-darkly Jan 31, 2019
71b821f
fix import
eli-darkly Jan 31, 2019
424db63
Merge pull request #91 from launchdarkly/eb/ch31044/package-subdirs-fix
eli-darkly Jan 31, 2019
b2e6c59
Merge pull request #90 from launchdarkly/eb/ch31044/test-package-import
eli-darkly Jan 31, 2019
bee50e8
merge from public after release
LaunchDarklyCI Jan 31, 2019
06fc3b2
add basic pipeline and install deps
hroederld Feb 5, 2019
0165540
add pytest
hroederld Feb 5, 2019
7c9f4e2
remove explicit install of deps
hroederld Feb 5, 2019
a38b957
add other db deps
hroederld Feb 5, 2019
0b6d28f
major cleanup of doc comments, add Sphinx build script
eli-darkly Feb 5, 2019
71534aa
add consul to test-requirements, remove specific reference to install…
hroederld Feb 5, 2019
6bbd65f
Revert "add consul to test-requirements, remove specific reference to…
hroederld Feb 5, 2019
0ec55a7
remove redis and dynamo explicit dep reference
hroederld Feb 5, 2019
49c5993
add requirements.txt
eli-darkly Feb 5, 2019
5228df7
add config file
eli-darkly Feb 5, 2019
f4e5c86
break up API docs into logical groups with a better home page
eli-darkly Feb 5, 2019
9445a6e
misc cleanup
eli-darkly Feb 5, 2019
c496c35
misc cleanup
eli-darkly Feb 5, 2019
a6f1bca
Merge pull request #93 from launchdarkly/eb/ch17280/docs
eli-darkly Feb 5, 2019
68bb4e4
RTD config fixes
eli-darkly Feb 5, 2019
6766920
minor edit
eli-darkly Feb 5, 2019
f612360
Merge pull request #94 from launchdarkly/eb/ch17280/doc-templates
eli-darkly Feb 5, 2019
74e82c8
misc. doc comment edits
eli-darkly Feb 6, 2019
9316b0d
use RTD theme
eli-darkly Feb 6, 2019
794e59f
Merge pull request #92 from launchdarkly/hr/azure
hroederld Feb 6, 2019
5df3b55
Merge pull request #95 from launchdarkly/eb/ch17280/edits
eli-darkly Feb 6, 2019
5eee9ba
Merge pull request #96 from launchdarkly/eb/ch17280/rtd-theme
eli-darkly Feb 6, 2019
338910c
remove jsonpickle
eli-darkly Feb 11, 2019
f586cd1
misc doc comment/readme edits prior to publishing docs
eli-darkly Feb 11, 2019
125d359
Merge pull request #97 from launchdarkly/eb/ch31867/jsonpickle
eli-darkly Feb 12, 2019
0972671
Merge pull request #98 from launchdarkly/eb/ch17280/doc-edits
eli-darkly Feb 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------

Expand All @@ -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
Expand Down
52 changes: 52 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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;
19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -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)
29 changes: 29 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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`.
25 changes: 25 additions & 0 deletions docs/api-extending.rst
Original file line number Diff line number Diff line change
@@ -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:
10 changes: 10 additions & 0 deletions docs/api-integrations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Integrating with other services
===============================

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

.. automodule:: ldclient.integrations
:members:
:special-members: __init__
:show-inheritance:
40 changes: 40 additions & 0 deletions docs/api-main.rst
Original file line number Diff line number Diff line change
@@ -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:
Loading