From 5ea00d8764e6356bed49afcb9e7a6cd109bad9fa Mon Sep 17 00:00:00 2001 From: Sahil Dua Date: Fri, 2 Sep 2016 01:03:24 +0200 Subject: [PATCH 1/4] Add basic template for Contributing guide --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1a04856 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +How to contribute +================= + + +## Testing + + +## Reporting Bugs + + +## Submitting Changes + From fa061fa08b31f594a5e3bd6f5c9a5cb3aeda1268 Mon Sep 17 00:00:00 2001 From: Sahil Dua Date: Fri, 2 Sep 2016 01:42:39 +0200 Subject: [PATCH 2/4] Add contributing guidelines - basic --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a04856..4cbbb7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,54 @@ How to contribute ================= +Thanks for your interest in contributing to Kinto! -## Testing +## Reporting Bugs +Report bugs at https://github.com/Kinto/kinto-http.py/issues/new -## Reporting Bugs +If you are reporting a bug, please include: + + - Any details about your local setup that might be helpful in troubleshooting. + - Detailed steps to reproduce the bug. + + +## Ready to contribute? + +### System Requirements + +Depending on the platform and chosen configuration, some libraries or extra services are required. + +The following commands will install necessary tools for cryptography and Python packaging like Virtualenv. + +#### Linux +On Debian / Ubuntu based systems: + +```bash +apt-get install libffi-dev libssl-dev python-dev python-virtualenv +``` + +#### OS X +Assuming [brew](http://brew.sh/) is installed: + +```bash +brew install libffi openssl pkg-config python + +pip install virtualenv +``` + + +### Getting Started + + - Fork the repo on GitHub. + - Clone your fork locally: + +```bash +git clone git@github.com:your_name_here/kinto-http.py.git +``` + + +## Testing ## Submitting Changes From 6ef185ead544ce951c9ea7c9f594714f21d51194 Mon Sep 17 00:00:00 2001 From: Sahil Dua Date: Sat, 10 Sep 2016 17:06:59 +0200 Subject: [PATCH 3/4] Add testing and submitting changes sections information to contributing guide --- CONTRIBUTING.md | 27 +++++++-- config/kinto.ini | 151 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 6 deletions(-) create mode 100644 config/kinto.ini diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4cbbb7b..72c9c58 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Report bugs at https://github.com/Kinto/kinto-http.py/issues/new If you are reporting a bug, please include: - Any details about your local setup that might be helpful in troubleshooting. - - Detailed steps to reproduce the bug. + - Detailed steps to reproduce the bug or even a PR with a failing tests if you can. ## Ready to contribute? @@ -37,19 +37,34 @@ brew install libffi openssl pkg-config python pip install virtualenv ``` - ### Getting Started - - Fork the repo on GitHub. - - Clone your fork locally: + - Fork the repo on GitHub and clone locally: ```bash -git clone git@github.com:your_name_here/kinto-http.py.git +git clone git@github.com:Kinto/kinto-http.py.git +git remote add {your_name} git@github.com:{your_name}/kinto-http.py.git ``` - ## Testing + - `make tests-once` to run the test with the current venv. + - `make tests` to run all the tests (with Py2 and Py3, flake8 and functional tests) + +You may need to use `make run-kinto` before running the functional tests. +If you want to run the functional tests only, you can use `make functional`. ## Submitting Changes +```bash +git checkout master +git pull origin master +git checkout -b issue_number-bug-title +git commit # Your changes +git push -u {your_name} issue_number-bug-title +``` + +Then you can create a Pull-Request. +Please create your pull-request as soon as you have one commit even if it is only a failing tests. This will allow us to help and give guidance. + +You will be able to update your pull-request by adding commit in your branch. diff --git a/config/kinto.ini b/config/kinto.ini new file mode 100644 index 0000000..4f55206 --- /dev/null +++ b/config/kinto.ini @@ -0,0 +1,151 @@ +# Created at Thu, 01 Sep 2016 01:20:06 +0200 +# Using Kinto version 4.1.1 + + +[server:main] +use = egg:waitress#main +host = 0.0.0.0 +port = %(http_port)s + + +[app:main] +use = egg:kinto + +# +# Backends. +# +# https://kinto.readthedocs.io/en/latest/configuration/settings.html#storage +# +kinto.storage_backend = kinto.core.storage.memory +kinto.storage_url = +kinto.cache_backend = kinto.core.cache.memory +kinto.cache_url = +kinto.permission_backend = kinto.core.permission.memory +kinto.permission_url = + +# +# Auth configuration. +# +# https://kinto.readthedocs.io/en/latest/configuration/settings.html#authentication +# +kinto.userid_hmac_secret = bcdf0f0baa0868c73b69c9dc5d3e9935cd7c4aca67168b57160e2734ec8fba55 +multiauth.policies = basicauth +# multiauth.policies = fxa basicauth + +# kinto.readonly = false +# kinto.bucket_create_principals = system.Authenticated +# kinto.batch_max_requests = 25 + +# +# Experimental JSON-schema on collection +# kinto.experimental_collection_schema_validation = true + +# +# Plugins +# +kinto.includes = kinto.plugins.default_bucket + +# +# Firefox Accounts configuration. +# These are working FxA credentials for localhost:8888 +# kinto.includes = kinto_fxa +# fxa-oauth.client_id = 61c3f791f740c19a +# fxa-oauth.client_secret = b13739d8a905315314b09fb7b947aaeb62b47c6a4a5efb00c378fdecacd1e95e +# fxa-oauth.oauth_uri = https://oauth-stable.dev.lcip.org/v1 +# fxa-oauth.requested_scope = profile kinto +# fxa-oauth.required_scope = kinto +# fxa-oauth.relier.enabled = true +# fxa-oauth.webapp.authorized_domains = * + +# +# Client cache headers +# +# https://kinto.readthedocs.io/en/latest/configuration/settings.html#client-caching +# +# Every bucket objects objects and list +# kinto.bucket_cache_expires_seconds = 3600 +# +# Every collection objects and list of every buckets +# kinto.collection_cache_expires_seconds = 3600 +# +# Every group objects and list of every buckets +# kinto.group_cache_expires_seconds = 3600 +# +# Every records objects and list of every collections +# kinto.record_cache_expires_seconds = 3600 +# +# Records in a specific bucket +# kinto.blog_record_cache_expires_seconds = 3600 +# +# Records in a specific collection in a specific bucket +# kinto.blog_article_record_cache_expires_seconds = 3600 + +# +# Production settings +# +# https://kinto.readthedocs.io/en/latest/configuration/production.html +# +# kinto.statsd_backend = kinto.core.statsd +# kinto.statsd_url = udp://localhost:8125 +# kinto.statsd_prefix = kinto-prod + +# kinto.http_scheme = https +# kinto.http_host = kinto.services.mozilla.com + +# kinto.backoff = 10 +# kinto.retry_after_seconds = 30 +# kinto.eos = + + +# [uwsgi] +# wsgi-file = app.wsgi +# enable-threads = true +# socket = /var/run/uwsgi/kinto.sock +# chmod-socket = 666 +# processes = 3 +# master = true +# module = kinto +# harakiri = 120 +# uid = kinto +# gid = kinto +# virtualenv = .venv +# lazy = true +# lazy-apps = true +# single-interpreter = true +# buffer-size = 65535 +# post-buffering = 65535 +# plugin = python + + +# +# Logging configuration +# + +# kinto.logging_renderer = kinto.core.logs.ClassicLogRenderer + +[loggers] +keys = root, kinto + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[logger_kinto] +level = DEBUG +handlers = +qualname = kinto + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s From 1acd824cbf1af88493ae5bb128454cadedb9a61f Mon Sep 17 00:00:00 2001 From: Sahil Dua Date: Tue, 13 Sep 2016 00:05:30 +0200 Subject: [PATCH 4/4] Remove kinto.ini file (added by mistake in last commit) --- config/kinto.ini | 151 ----------------------------------------------- 1 file changed, 151 deletions(-) delete mode 100644 config/kinto.ini diff --git a/config/kinto.ini b/config/kinto.ini deleted file mode 100644 index 4f55206..0000000 --- a/config/kinto.ini +++ /dev/null @@ -1,151 +0,0 @@ -# Created at Thu, 01 Sep 2016 01:20:06 +0200 -# Using Kinto version 4.1.1 - - -[server:main] -use = egg:waitress#main -host = 0.0.0.0 -port = %(http_port)s - - -[app:main] -use = egg:kinto - -# -# Backends. -# -# https://kinto.readthedocs.io/en/latest/configuration/settings.html#storage -# -kinto.storage_backend = kinto.core.storage.memory -kinto.storage_url = -kinto.cache_backend = kinto.core.cache.memory -kinto.cache_url = -kinto.permission_backend = kinto.core.permission.memory -kinto.permission_url = - -# -# Auth configuration. -# -# https://kinto.readthedocs.io/en/latest/configuration/settings.html#authentication -# -kinto.userid_hmac_secret = bcdf0f0baa0868c73b69c9dc5d3e9935cd7c4aca67168b57160e2734ec8fba55 -multiauth.policies = basicauth -# multiauth.policies = fxa basicauth - -# kinto.readonly = false -# kinto.bucket_create_principals = system.Authenticated -# kinto.batch_max_requests = 25 - -# -# Experimental JSON-schema on collection -# kinto.experimental_collection_schema_validation = true - -# -# Plugins -# -kinto.includes = kinto.plugins.default_bucket - -# -# Firefox Accounts configuration. -# These are working FxA credentials for localhost:8888 -# kinto.includes = kinto_fxa -# fxa-oauth.client_id = 61c3f791f740c19a -# fxa-oauth.client_secret = b13739d8a905315314b09fb7b947aaeb62b47c6a4a5efb00c378fdecacd1e95e -# fxa-oauth.oauth_uri = https://oauth-stable.dev.lcip.org/v1 -# fxa-oauth.requested_scope = profile kinto -# fxa-oauth.required_scope = kinto -# fxa-oauth.relier.enabled = true -# fxa-oauth.webapp.authorized_domains = * - -# -# Client cache headers -# -# https://kinto.readthedocs.io/en/latest/configuration/settings.html#client-caching -# -# Every bucket objects objects and list -# kinto.bucket_cache_expires_seconds = 3600 -# -# Every collection objects and list of every buckets -# kinto.collection_cache_expires_seconds = 3600 -# -# Every group objects and list of every buckets -# kinto.group_cache_expires_seconds = 3600 -# -# Every records objects and list of every collections -# kinto.record_cache_expires_seconds = 3600 -# -# Records in a specific bucket -# kinto.blog_record_cache_expires_seconds = 3600 -# -# Records in a specific collection in a specific bucket -# kinto.blog_article_record_cache_expires_seconds = 3600 - -# -# Production settings -# -# https://kinto.readthedocs.io/en/latest/configuration/production.html -# -# kinto.statsd_backend = kinto.core.statsd -# kinto.statsd_url = udp://localhost:8125 -# kinto.statsd_prefix = kinto-prod - -# kinto.http_scheme = https -# kinto.http_host = kinto.services.mozilla.com - -# kinto.backoff = 10 -# kinto.retry_after_seconds = 30 -# kinto.eos = - - -# [uwsgi] -# wsgi-file = app.wsgi -# enable-threads = true -# socket = /var/run/uwsgi/kinto.sock -# chmod-socket = 666 -# processes = 3 -# master = true -# module = kinto -# harakiri = 120 -# uid = kinto -# gid = kinto -# virtualenv = .venv -# lazy = true -# lazy-apps = true -# single-interpreter = true -# buffer-size = 65535 -# post-buffering = 65535 -# plugin = python - - -# -# Logging configuration -# - -# kinto.logging_renderer = kinto.core.logs.ClassicLogRenderer - -[loggers] -keys = root, kinto - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = INFO -handlers = console - -[logger_kinto] -level = DEBUG -handlers = -qualname = kinto - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s