Annotate with anyone, anywhere.
Switch branches/tags
Clone or download
hmstepanek Use popall in es search query modifiers (#5304)
* Use _pop_param_values in es search query modifiers

Previously each modifier had essentially the same code to extact
all values of the same key from the params multidict, now they just
call _pop_param_values(key) instead.

Some of the tests were passing in a dict-type value for params instead of
a MultiDict-type. This change forces the params to now be a MultiDict as it
uses a MultiDict-only method called getall().

* Set params type MultiDict in doc-string

* Rename _pop_param_values to popall

* Change Search to no longer make a copy of params

Search previously made a copy of the params that were passed to it.
This functioned mainly as a way of casting a NestedMultiDict type (readonly)
coming from request into a MultiDict type (mutable). Search calls
query filters that pop the params. In half of the cases where Search
is used, the params that are passed in are already in a poppable state
and copying is expensive thus let the code that calls Search decide whether
to copy/cast the params or not.

The badge view and tests were updated to pass a MultiDict.

The feeds view was updated to cast the request.params into a MultiDict.

The test for verifying the Search doesn't modify params was removed as this
is now expected behavior.

Update the description of params to explain that they will be popped.
Latest commit 2c85928 Sep 24, 2018
Failed to load latest commit information.
.github Enable stale bot May 14, 2018
bin Remove fallback and enable redirects to new site (#4543) May 24, 2017
conf Remove New Relic agent configuration for elasticsearch1 library Aug 29, 2018
docs Add warning about wildcard being in beta in docs Sep 18, 2018
h Use popall in es search query modifiers (#5304) Sep 24, 2018
scripts Remove old es from travis & use 9200 port Aug 9, 2018
tests Use popall in es search query modifiers (#5304) Sep 24, 2018
.babelrc Use Babel for ES2015 transpilation Sep 2, 2016
.coveragerc Update .coveragerc Sep 26, 2016
.editorconfig Set default indent size for Jinja2 templates to two spaces Aug 9, 2016
.eslintrc Fix inconsistencies in front-end code style (#4055) Nov 14, 2016
.gitattributes Do not show vendored PDF.js in language stats Oct 6, 2015
.gitignore Git ignore .pytest_cache dir Apr 25, 2018
.mailmap Add .mailmap file to fix up authors in git history May 11, 2016
.prospector.yaml Disabled pep257:D212 rule in prospector. Dec 17, 2017
.pyup.yml create config file (#4485) Apr 5, 2017
.travis.yml Merge pull request #5214 from hypothesis/srcdocs Aug 10, 2018
AUTHORS Add myself to AUTHORS Oct 8, 2014
CODE_OF_CONDUCT Add Code of Conduct for contributors to repo May 17, 2016
CONTRIBUTING.rst Fix some broken links in the docs May 25, 2016
Dockerfile Build static assets in separate stage. (#4905) Mar 27, 2018
Jenkinsfile Fix a tox warning and remove some duplication Sep 4, 2018
LICENSE Remove the old threading implementation (#3287) May 23, 2016
Makefile Add New Relic env vars to `run-docker` make task Aug 29, 2018
NOTICE Switch out jschannel for frame-rpc Jul 31, 2015
README.rst Add readthedocs README badge Aug 8, 2018
docker-compose.yml Change elasticsearch port from 9201 to 9200 Aug 9, 2018
gulpfile.js Make "gulp watch" task work with Gulp v4 Aug 21, 2018 Remove adding of hostname to STATSD_PREFIX in Python code Feb 10, 2017
package-lock.json Upgrade karma to latest. Aug 13, 2018
package.json Upgrade karma to latest. Aug 13, 2018 Remove Sphinx deps Sep 4, 2018 Remove elasticsearch1 as a dependency Aug 7, 2018
requirements.txt Upgrade Jinja2 Sep 14, 2018
setup.cfg Use `make lint` to enforce `unicode_literals` Apr 19, 2018
tox.ini Make the tests fail if any warnings are printed Sep 18, 2018



Build Status Code Coverage IRC channel License badge

Python version badge

Documentation Status

h is the web app that serves most of the website, including the web annotations API at The Hypothesis client is a browser-based annotator that is a client for h's API.


See the Contributor's guide for instructions on setting up a development environment and contributing to h.


Join us on Slack (request an invite or log in once you've created an account) or in on freenode for discussion.

If you'd like to contribute to the project, you should also subscribe to the development mailing list and read our Contributor's guide. Then consider getting started on one of the issues that are ready for work.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


Hypothesis is released under the 2-Clause BSD License, sometimes referred to as the "Simplified BSD License" or the "FreeBSD License". Some third-party components are included. They are subject to their own licenses. All of the license information can be found in the included LICENSE file.