Permalink
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
seanh
Sean Hammond
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also
.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
Choose a base branch
accessible-activity-cards
add-elife-annotation-times-migration
add-make-sql
add-python-version-note
add-todo-to-remove-workaround
allow-py37-in-tox
allow-wildcards-in-domain
annotation-importer
annotation-shared
ap-replies
ap-separate-replies
api-importer
colander-api-query-param-validation
default-null-org-in-tests
do-make-lint-in-tox
enable-group-creator-deletion
filters
fix-ann-body-styling
h-load-testing
ignore-unknown-search-params
improve-form-field-list-design
index-and-search-elasticsearch6
jmcarp-docker-multi-stage
jmcarp-pytest-cleanup
mark-secret-key-required
master
nipsa-index
oauth-login-prototype
optimize-redirect-lookup
py3-encode-key-material
refactor-read-permission-logic
refactor-tox.ini
remove-auth-client-logic
remove-badge-nr-metrics
rename-py-builtins
replace-es-doc-types
revert-4951-add-member-to-group
run-make-dev-in-tox
search-as-jsonld
site-query
support-sqs
test-presentation-batch-indexer
update-es-version-in-install-docs
update-gevent
use-py3-in-docker
use-zope-sqlalchemy-with-weakrefs
user-group-doesnt-exist
validate-rss-stream-query-params
welcome
Nothing to show
Choose a Head Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
Choose a head branch
accessible-activity-cards
add-elife-annotation-times-migration
add-make-sql
add-python-version-note
add-todo-to-remove-workaround
allow-py37-in-tox
allow-wildcards-in-domain
annotation-importer
annotation-shared
ap-replies
ap-separate-replies
api-importer
colander-api-query-param-validation
default-null-org-in-tests
do-make-lint-in-tox
enable-group-creator-deletion
filters
fix-ann-body-styling
h-load-testing
ignore-unknown-search-params
improve-form-field-list-design
index-and-search-elasticsearch6
jmcarp-docker-multi-stage
jmcarp-pytest-cleanup
mark-secret-key-required
master
nipsa-index
oauth-login-prototype
optimize-redirect-lookup
py3-encode-key-material
refactor-read-permission-logic
refactor-tox.ini
remove-auth-client-logic
remove-badge-nr-metrics
rename-py-builtins
replace-es-doc-types
revert-4951-add-member-to-group
run-make-dev-in-tox
search-as-jsonld
site-query
support-sqs
test-presentation-batch-indexer
update-es-version-in-install-docs
update-gevent
use-py3-in-docker
use-zope-sqlalchemy-with-weakrefs
user-group-doesnt-exist
validate-rss-stream-query-params
welcome
Nothing to show
11
contributors
This comparison is big! We’re only showing the most recent
250
commits
Commits on Aug 13, 2018
Commits on Aug 14, 2018
Merge pull request #5217 from hypothesis/update-es-version-in-install…
…-docs Update Elasticsearch version and URL in installation docs
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 17, 2018
Commits on Aug 21, 2018
Make "gulp watch" task work with Gulp v4
- The various "watch-*" tasks never complete, so they must be composed using `gulp.parallel` rather than `gulp.series`. Otherwise only the first one runs. - Adapt usage of `gulp.watch` in various "watch-*" tasks to pass a function as the argument instead of a task name as required by the Gulp v4 API [1]. - Fix an existing issue where the "watch-css" task did not ensure that vendor CSS was built first. The issue mentioned in the existing comment about watching not working if the initial build failed appears not to apply any longer. [1] https://github.com/gulpjs/gulp/blob/4.0/docs/API.md#gulpwatchglobs-opts-fn
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 23, 2018
Merge pull request #5230 from hypothesis/admin-views-refactor
Reorganize admin views into `h.views.admin` module
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
robertknight
and seanh
Pipe compressed archive to `docker build` (#5233)
On my system (git 2.18.0 from Homebrew, docker 18.06.0-ce, macOS), the "make docker" task was failing with the error: ``` git archive HEAD | docker build -t hypothesis/hypothesis:dev - Sending build context to Docker daemon 4.487MB Error response from daemon: Syntax error - can't find = in "paster.bootstrap(config,". Must be of the form: name=value make: *** [docker] Error 1 ``` The "docker build" documentation [1] states that the context should be compressed, and sure enough configuring `git archive` to generate a compressed archive resolves the issue. [1] https://docs.docker.com/engine/reference/commandline/build/#build-with--
Loading status checks…
Commits on Aug 24, 2018
Remove an obsolete comment
Following the completion of the Elasticsearch 6 migration, these functions are only called once each.
Port a test from h/search/old_index_test.py to h/search/index_test.py
Port across a useful test from the old search indexing tests that were missing from the new tests to verify that the conversion from Annotation to JSON document indexed in Elasticsearch uses the expected method.
Loading status checks…
Re-use `get` fixture in more tests
Code for fetching the indexed JSON document from Elasticsearch was duplicated in several deletion and batch-indexing tests. Reuse the existing `get` fixture for this purpose, but rename it to `get_indexed_ann` for clarity.
Loading status checks…
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Remove old search indexing tests
These unit tests which mock ES have been replaced with tests in h/search/index_test.py which in most cases do actually make queries against Elasticsearch and thus give us more confidence that passing tests == working production app.
Loading status checks…
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
lyzadanger
and seanh
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Remove the majority of the old-style search query tests
Remove the tests in old_query_test.py which cover functionality that is also covered by the tests in query_test.py. Add a note about one aspect of searching by URI which is not explicitly covered in query_test.py and a note about needing to move the remaining `Builder` tests.
Loading status checks…
Commits on Aug 26, 2018
Merge pull request #5240 from hypothesis/remove-old-search-index-tests
Remove old search indexing tests
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 27, 2018
Remove test that is covered by another in query_test.py
This case is covered by `TestBuilder.test_it_sorts_annotations` in query_test.py.
Loading status checks…
Merge pull request #5241 from hypothesis/remove-old-search-query-tests
Remove the majority of the old-style search query tests
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5223 from hypothesis/spike-organization-nullable
Make Group.organization nullable and create new private groups with no organization
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Loading status checks…
Merge pull request #5244 from hypothesis/decrease-min-group-name-to-3
Decrease min group name to 3 characters
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 28, 2018
Install tox when running docs-related make commands
Automatically install `tox` in the developer's virtualenv when running any of the various docs-related `Makefile` commands. This fixes an issue that, if the developer didn't already have `tox` available on their system, the various docs-related `Makefile` commands will fail. Having the `Makefile` explicitly install `tox` is consistent with how `make test` already does it. The use of `PIP_REQUIRE_VIRTUALENV` in the `Makefile` prevents `tox` from being installed if the developer hasn't created and activated a virtualenv for h - it won't try to install `tox` globally.
Loading status checks…
Merge pull request #5218 from hypothesis/connect-api-policy
Use API Policy; Restrict AuthClientPolicy to `POST /api/groups`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 29, 2018
Record which /api/search params are used
Add custom metrics to record if the offset param is being used-the idea being we will know if people are still using it as it will be deprecated and perhaps when no one is using it anymore we can safely delete it. Add custom metrics to record the use of tag and tags. tags is an alias of tag. The idea being if no one is using it we could safely remove this and simplify our search query params. Add custom metrics to record the use of url and uri. url is an alias of uri. The idea being if no one is using it we could safely remove this and simplify our search query params.
Loading status checks…
Remove New Relic agent configuration for elasticsearch1 library
The elasticsearch1 library is no longer used by the h app following the Elasticsearch 6 migration.
Loading status checks…
Add New Relic env vars to `run-docker` make task
This makes it easier to run h with New Relic reporting enabled locally
for performance analysis etc.
To use it:
1. Set the `NEW_RELIC_LICENSE_KEY` env var to the key from your NR
Account Settings page.
2. Run `make docker` to build the docker image from git's HEAD commit
3. Run `make run-docker`.
Metrics will now appear under the "h (dev)" application in your NR
account.
If you need more flexibility, see Hannah's answer at
https://stackoverflow.com/c/hypothesis/questions/98Loading status checks…
Commits on Aug 30, 2018
Merge pull request #5249 from hypothesis/add-api-usage-metrics
Record which /api/search params are used
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5250 from hypothesis/remove-es1-newrelic-hooks
Remove remaining references to elasticsearch1 and elasticsearch1-dsl from config files
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5252 from hypothesis/remove-remaining-if-es1-swit…
…ches Remove remaining es1 switch statement
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5253 from hypothesis/move-old-query-tests
Move old Builder tests to query_test module
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Add helper for validating query parameters using Colander
Add `validate_query_params` helper function for validating query parameters (`request.GET` or `request.params`) using Colander schemas. Compared to simply calling `schema.deserialize(request.params)` this helper handles: - Raising a `ValidationError` with a single string error message if validation fails. - Preserving repeated fields. Ordinarily Colander will only return the last occurrence after parsing. In our case we want to preserve repeated fields for use in eg. requests such as `GET /api/search?tag=foo&tag=bar` to return annotations with tags "foo" and "bar".
Loading status checks…
Merge pull request #5247 from hypothesis/colander-query-param-validation
Add helper for validating query parameters using colander
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Aug 31, 2018
Loading status checks…
Add test to TestValidateQueryParams
Add test to check that a list field type can have a single value specified and it still gets converted to a list in the multidict to dict conversion and passes validation.
Merge pull request #5251 from hypothesis/add-newrelic-vars-to-run-docker
Add New Relic env vars to `run-docker` make task
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Limit search "offset" parameter to <= 9800
The window of annotations,from + size must be less than or equal to: 10000. Since limit (the size) is set to be no larger than 200, that means the offset must be no larger than 9800.
Add colander SearchParamsSchema schema class
This schema will only pass expected search query params through to
be used when building the query. All unknown parameters will be ignored.
It also casts the parameters to their desired types and validates the value.
The following available fields in elasticsearch were not exposed for the following
reasons:
- deleted There is a deleted filter that filters out deleted annotations
everytime a search is run so exposing this would have no affect.
- id This doesn't appear to work in practice and we prob shouldn't be
exposing id's from our db anyway.
- nipsa There is a filter for this that sorts these out so this would have
no affect, not to mention exposing this could potentially allow
a shadowbanned user from discovering they have been banned.
- shared There is a filter for this already so it would have no effect, not
to mention exposing this could be a permission escalation.
- tags_raw There is already a nicer tags field for tag searches. The intention
of tags_raw is to be used in aggregations.
- uri.parts This is already covered by the any filter and keyword.
- user_raw There is already a nicer tags field for user searches. The intention
of user_raw is to be usedin aggregations.
- authority There is a filter for this used on activity pages and this could be
a permission escalation. Also this is something internal to h that we
probably should avoid exposing anyway.
- updated This is a date and it needs a range query filter which
we don't currently have.
- created This is a date and it needs a range query filter which
we don't currently have.
- thread_ids This needs a more sensible name like "parent_of_annotations".
- target This is a somewhat complex object that the user would never be
able to pass in. It's broken up into smaller objects already.
Validate search query params in /api/search
Call validate_query_params in /api/search. Change the type of request.params used in the tests from a dict to a NestedMultiDict since this is what type request.params actually is. Since the SearchParamsSchema specifies defaults for certain params, test_it_searches has to be changed to assert the default params were passed into search as opposed to an empty dict.
Merge pull request #5224 from hypothesis/ignore-unknown-es-query-params
Ignore unknown es query params
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 01, 2018
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5256 from hypothesis/revert-5224-ignore-unknown-e…
…s-query-params Revert "Ignore unknown es query params"
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Add test to TestValidateQueryParams
Add test to check that a list field type can have a single value specified and it still gets converted to a list in the multidict to dict conversion and passes validation.
Limit search "offset" parameter to <= 9800
The window of annotations,from + size must be less than or equal to: 10000. Since limit (the size) is set to be no larger than 200, that means the offset must be no larger than 9800.
Add tests for sorting search by user, id, & group
Add tests for sorting search by user, id, and group. Add mapping of sort by user to the non-analyzed field user_raw.
Add colander SearchParamsSchema schema class
This schema will only pass expected search query params through to
be used when building the query. All unknown parameters will be ignored.
It also casts the parameters to their desired types and validates the value.
The following available fields in elasticsearch were not exposed for the following
reasons:
- deleted There is a deleted filter that filters out deleted annotations
everytime a search is run so exposing this would have no affect.
- id This doesn't appear to work in practice and we prob shouldn't be
exposing id's from our db anyway.
- nipsa There is a filter for this that sorts these out so this would have
no affect, not to mention exposing this could potentially allow
a shadowbanned user from discovering they have been banned.
- shared There is a filter for this already so it would have no effect, not
to mention exposing this could be a permission escalation.
- tags_raw There is already a nicer tags field for tag searches. The intention
of tags_raw is to be used in aggregations.
- uri.parts This is already covered by the any filter and keyword.
- user_raw There is already a nicer tags field for user searches. The intention
of user_raw is to be usedin aggregations.
- authority There is a filter for this used on activity pages and this could be
a permission escalation. Also this is something internal to h that we
probably should avoid exposing anyway.
- updated This is a date and it needs a range query filter which
we don't currently have.
- created This is a date and it needs a range query filter which
we don't currently have.
- thread_ids This needs a more sensible name like "parent_of_annotations".
- target This is a somewhat complex object that the user would never be
able to pass in. It's broken up into smaller objects already.
Validate search query params in /api/search
Call validate_query_params in /api/search. Change the type of request.params used in the tests from a dict to a NestedMultiDict since this is what type request.params actually is. Since the SearchParamsSchema specifies defaults for certain params, test_it_searches has to be changed to assert the default params were passed into search as opposed to an empty dict.
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 04, 2018
Fix a tox warning and remove some duplication
Fix a "Conflicting basepython for environment 'functional-py3'" warning that tox was printing out, and also remove some duplication from the tox.ini file. The problem was that tox testenv names, such as "py27", "functional", "functional-py3", "coverage", etc in our tox.ini file, are actually hyphen-separated lists of what tox calls "factors": https://tox.readthedocs.io/en/latest/config.html?highlight=factors#factors-and-factor-conditional-settings Tox sees the testenv name "functional-py3" as two factors "functional" and "py3". And "py3" is the name of one of tox's builtin factors. The testenv name "functional-py3" activates the builtin "py3" factor which sets `basepython = python3`. This conflicts with the `basepython = python3.6` within the testenv definition (py3 != python3.6). Fix this by: 1. Renaming the functional-py3 testenv to functional-py36, so that it triggers the builtin py36 factor (basepython = python3.6) instead of the py3 one. 2. Removing the `basepython = python3.6` from the testenv definition body. It's not needed as the "-py36" in the testenv name has already set that basepython. Also remove the `basepython = python2.7` from `[testenv:functional]` as it's not needed - testenvs inherit the `basepython` from the default testenv which, in our tox.ini file, is tox's builtin py27 testenv. Also remove the `skip_install = true` from `[testenv:functional]` - it already inherits this from `[testenv]`. Also remove some duplication by adding a `tox.ini`-file section `[functional]` and having both `[testenv:functional]` and `[testenv:functional-py36]` use values from it.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Remove Sphinx deps
`make docs` and other docs-related Makefile commands run in tox-managed venvs, so it's no longer necessary to install docs stuff in yout development venv.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Merge pull request #5259 from hypothesis/fix-tox-warning
Fix a tox warning and remove some duplication
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Use elasticsearch_dsl in filters
Convert filters/matchers/aggs to use elasticsearch_dsl. This means now each filter will take in a search argument that is the elasticsearch_dsl search object. Filters/Matchers will return a new modified search object, while aggs will modify the search object in place. Refactor the Search class to use these new classes and remove use of the old Builder class.
Reorg existing tests into test classes
Reorganize the existing tests into their corresponding test classes: TestSorter, TestLimiter, and TestKeyValueMatcher.
Commits on Sep 05, 2018
Merge pull request #5219 from hypothesis/replace-builder-with-dsl
Replace Builder class with elasticsearch_dsl
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Fix RSS stream
The `/stream.rss` and `/stream.atom` views were broken by 6c342c7 because the `params.copy()` call in `h.search.query.Builder.build` was removed. As a result `Search.run` tried to modify its input `params` dict which crashed in views were that argument is the read-only `request.params`. It seems less surprising for `Search.run` not to mutate its input dict, so restore that behavior.
Loading status checks…
Create new `h.schemas.forms.accounts.edit_profile` module and tests
Update `h.views.accounts` to use new `EditProfileSchema` Remove `EditProfileSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.login` module and tests
Update `h.views.accounts` to use new `LoginSchema` Remove `LoginSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.forgot_password` module and tests
Update `h.views.accounts` to use new `ForgotPasswordSchema` Remove `ForgotPasswordSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.reset_password` module and tests
Update `h.views.accounts` to use new `ResetPasswordSchema` Remove `ResetPasswordSchema` from `h.accounts.schemas`
Loading status checks…
Merge pull request #5255 from hypothesis/refactor-accounts-schemas
Factor out some of `h.accounts.schemas` into separate modules
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5267 from hypothesis/revert-5255-refactor-account…
…s-schemas Revert "Factor out some of `h.accounts.schemas` into separate modules"
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Create new `h.schemas.forms.accounts.edit_profile` module and tests
Update `h.views.accounts` to use new `EditProfileSchema` Remove `EditProfileSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.login` module and tests
Update `h.views.accounts` to use new `LoginSchema` Remove `LoginSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.forgot_password` module and tests
Update `h.views.accounts` to use new `ForgotPasswordSchema` Remove `ForgotPasswordSchema` from `h.accounts.schemas`
Create new `h.schemas.forms.accounts.reset_password` module and tests
Update `h.views.accounts` to use new `ResetPasswordSchema` Remove `ResetPasswordSchema` from `h.accounts.schemas`
Make `h.views.api.groups` handle userid ValueError from user service
Make sure the view does not expose the ValueError that can result from invoking the `fetch` method on the `user_service` with a malformed `userid`. Return a 404 instead.
Loading status checks…
Commits on Sep 06, 2018
Add search_after in search query & tests
Previously the param "offset" was being used to set the "from" property in the search query to search from "offset" annotations to "limit" number of annotations. This will be deprecated. Going forward, it will use the param "search_after" to set the "search_after" property in the search query to search starting at sort field "search_after" to "limit" number of annotations. search_after does not run through the parser to format the dates so we must run the datetime parsing before it is passed to search_after. search_after only accepts the number epoch_miliseconds as that is the raw format in es for the created and updated fields. Add tests for search_after.
Ignore/strip offset when search_after is specified
Offset has been deprecated in favor of search_after. This means both the Limiter and the Sorter have to handle the case where both offset and search_after have been specified. This is because we make no guarantee that the Sorter will be run before the Limiter or vise versa. If the Sorter is run first the offset should be popped. If the Limiter is run first the offset should be popped and ignored. Add tests for both cases ^. Cleanup the extract offset and limit logic.
Validate search_after interactions in the schema
Validate at the schema level the following: - Validate that search_after is the correct format based on the value of sort. - Default offset to 0 if search_after is set. Add schema tests to validate the above additions to the schema validation. Remove the handling of both offset and search_after being set in the Sorter and Limiter classes since this is now handled by the schema. Remove query tests that validate the handling of both offset and search_after being set since this is handled by the schema now.
Loading status checks…
Include CORS headers on error responses from the API
The `h.views.api.config.api_config` decorator applies a CORS header decorator to API views, but the headers added by this decorator are not applied if any part of the view processing pipeline raises an exception and an exception view is invoked instead. Given that most API error handling involves raising exceptions which then render responses using views in `h.views.api.exceptions`, the result is that CORS headers were not set. As a result, failing API requests caused surprising and confusing error messages in the console about disallowed cross-origin requests, instead of reporting the actual error. Fixes #5264
Remove code that establishes elasticsearch_dsl's default connection
We are using elasticsearch_dsl for generating and executing search queries in app code and tests, but we've opted to stick with the existing method of establishing a connection to Elasticsearch rather than using elasticsearch_dsl's default connection. The existing method of creating a connection and exposing it via `request.es` is convenient to work with in tests, since it can be easily mocked. It is also more consistent with how we set up and expose connections to other external services such as statsd or the database session.
Loading status checks…
Merge pull request #5269 from hypothesis/redux-refactor-accounts-schemas
Redux: refactor accounts schemas
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Update breaking tests for `request.default_authority`
These tests are for modules whose code doesn’t have any broken references to `request.authority`, but their tests do
Loading status checks…
Merge pull request #5254 from hypothesis/default-authority
Change `request.authority` -> `request.default_authority`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Enable CORS headers on `json_error` view
Despite being in `h/views/api/*` this view is used by some non-API routes, which we may not want to be cross-origin readable. However it doesn't leak any information about the error. In future this will be split into two separate views for API and non-API routes as per https://hypothes-is.slack.com/archives/C4K6M7P5E/p1536243261000100
Loading status checks…
Merge pull request #5270 from hypothesis/fix-api-error-view-cors-headers
Add missing CORS headers to API error responses
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Split json_error exception view into API and non-API request handlers
We have API and non-API views that return JSON. For consistency handle unexpected exceptions (aka. Internal Server Errors) for API views in a view defined in `h/views/api/exceptions.py` and for other views in a view defined in `h/views/exceptions.py`. Right now the only difference is that the API view adds CORS headers to the response. I have also changed the error message to make it shorter and thus be easier to read if it gets displayed to the user directly, eg. as the Hypothesis client will do in a toaster at the top of the sidebar.
Loading status checks…
Add check_icu_plugin param to search.init
Instead of passing in a full dictionary of settings into search.init, change search.init to accept a single boolean value for check_icu_plugin and default it to True. This way the settings don't get passed around the code, it is backwards compatible, and is a lot less invasive of a change.
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5271 from hypothesis/remove-es-connect
Remove code that establishes elasticsearch_dsl's default connection
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 07, 2018
Fix date parsing logic
There was a problem where if a date that was just a year such as "2017" was passed into the date parsing logic it would be interpreted as ms since the epoch instead of going through the date parser. This has been fixed along with some subtle cleanups to names of methods and doc strings to make the code more readable.
Loading status checks…
Allow "uri.parts" as a query param argument to /api/search
This existing query param was missed when validation of query params to the search API was added recently. Many users of this parameter will be better served by the upcoming wildcard URI search support, but since there were users of the existing query param, it makes sense to continue to support it.
Loading status checks…
Loading status checks…
Merge pull request #5273 from hypothesis/split-json-error-view
Split json_error exception view into API and non-API request handlers
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5265 from hypothesis/api-docs-group-security
Fix security documentation for POST api/groups/{id}/members/{user}Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5268 from hypothesis/handle-userid-value-error-api
Make `h.views.api.groups` handle userid ValueError from user service
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5274 from hypothesis/client-authority-util
Add utility method to determine current auth client authority
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Add minimal functional tests for RSS feeds
We inadvertently broke the RSS feeds in production. This was resolved in #5262 but I think it would be useful to have a couple of basic functional tests as extra security.
Loading status checks…
Loading status checks…
Commits on Sep 09, 2018
Merge pull request #5276 from hypothesis/add-uri-parts-to-schema
Allow "uri.parts" as a query param argument to /api/search
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 10, 2018
Merge pull request #5277 from hypothesis/rss-functional-tests
Add minimal functional tests for RSS feeds
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5278 from hypothesis/adjust-auth-client-principals
Change auth_client `authority` principal to `client_authority`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 11, 2018
Loading status checks…
Commits on Sep 12, 2018
Replace deprecated `log.warn` with `log.warning`
See deprecation notice in https://docs.python.org/3/library/logging.html#logging.Logger.warning
Loading status checks…
Merge pull request #5283 from hypothesis/log-warn-to-warning
Replace deprecated `log.warn` with `log.warning`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Extend AuthClient policy to member-add endpoint; use permission on view
Extend the AuthClient policy to `POST /api/groups/{pubid}/members/{userid}`
and change the group to authorize on permission `member_add` on Group
Remove old view-level auth code and update testsLoading status checks…
Merge pull request #5279 from hypothesis/authz-for-add-group-member
Extend AuthPolicy, add Authorization to API add-group-member endpoint
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5285 from hypothesis/add-root-tests
Add rudimentary tests to `h.traversal.roots.Root`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5284 from hypothesis/auth-client-role
Add `AuthClient` role-principal and assign it to authClient requests
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 13, 2018
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Remove an unnecessary default value
This function is never called without passing `expand`, and `expand` is never `None`.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Fix another dangerous default value
Remove the argument entirely because it's only ever used by the tests, and the only to pass in the same value as the default value.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Change page title and button text for create group page.
Since we have different types of groups, and previously we didn't explicitly say what type of group is created with this form, we're updating the page title to be more clear. Fixes #5290
Loading status checks…
Merge pull request #5291 from hypothesis/change-page-title
Change page title and button text for create group page.
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 14, 2018
Don't call pytest fixtures directly
Several tests were triggering "fixtures are not meant to be called directly" warnings from pytest, and in a future version of pytest it won't even be _possible_ to call fixtures directly. Fix the code to no longer call fixtures directly.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Fix an SQLAlchemy unicode warning
We're reading the value of the X-Forwarded-User header, which in Python
2 is a byte string, and then using it in an SQLAlchemy query which is
triggering a unicode warning from SQLAlchemy:
Unicode type received non-unicode bind param value
This is because we're passing SQLAlchemy a byte string and asking it to
match it against a unicode column.
Fix this by decoding the byte string to unicode first.
Once we've moved to Python 3 we can remove this decoding: request header
values are unicode already in Python 3.Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Merge pull request #5293 from hypothesis/fix-sqlalchemy-unicode-warning
Fix an SQLAlchemy unicode warning
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Fix Pyramid deprecation warning
`check_csrf` was deprecated in Pyramid 1.7: https://docs.pylonsproject.org/projects/pyramid/en/latest/whatsnew-1.7.html?highlight=check_csrf#deprecations The new `require_csrf` view option was added in Pyramid 1.7, to be used instead of `check_csrf`: https://docs.pylonsproject.org/projects/pyramid/en/latest/whatsnew-1.7.html?highlight=check_csrf#feature-additions The docs for the old, deprecated `check_csrf` can be found on this page: https://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/api/config.html?highlight=check_csrf#pyramid.config.Configurator.add_view And here's the new `require_csrf`: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html?highlight=require_csrf#non-predicate-arguments
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Replace deprecated readfp()
Calling readfp() prints a warning in Python 3:
DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
Fix this by calling read_file() instead. But read_file() isn't available
in Python < 3.2, so still use readfp() in older versions.
Here's the docs for the old, deprecated readfp():
https://docs.python.org/2/library/configparser.html?highlight=readfp#ConfigParser.RawConfigParser.readfp
Here's the docs for the new read_file():
https://docs.python.org/3/library/configparser.html?highlight=read_file#configparser.ConfigParser.read_fileVerified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Replace deprecated warn()
warn() is deprecated and prints a warning in newer versions of Python. Use warning() instead.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Upgrade Jinja2
Upgrade Jinja2 to the latest version by running this command:
$ pip-compile --upgrade-package jinja2
This fixes a warning that the tests were printing out when run in Python
3:
DeprecationWarning: Flags not at the start of the expression '\\w+(?u)'
Changelog: http://jinja.pocoo.org/docs/2.10/changelog/Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5292 from hypothesis/dont-call-fixtures-directly
Don't call pytest fixtures directly
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5294 from hypothesis/fix-check_csrf-deprecation-w…
…arning Fix Pyramid deprecation warning
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Fix invalid string escapes
\ is the escape character in Python string literals: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals For example if you want to put a tab character in a string you would do: >>> print("foo \t bar") foo bar If you want to put a literal \ in a string you have to use \\: >>> print("foo \\ bar") foo \ bar Or use a "raw string": >>> print(r"foo \ bar") foo \ bar You can't just go putting backslashes in string literals whenever you want one. A backslash isn't valid when not followed by one of the valid escape sequences, and newer versions of Python print a deprecation warning. For example \A isn't an escape sequence: $ python3.6 -Wd -c '"\A"' <string>:1: DeprecationWarning: invalid escape sequence \A See: https://bugs.python.org/issue27364 If your backslash sequence does accidentally match one of Python's escape sequences, but you didn't mean it to, that's even worse. So you should always use raw strings or \\. It's important to remember that a string literal is still a string literal even if that string is intended to be used as a regular expression. Python's regular expression syntax supports lots of special sequences that begin with \. For example \A matches the start of a string. But \A is not valid in a Python string literal! This is invalid: my_regex = "\Afoo" Instead you should do this: my_regex = r"\Afoo" See: https://docs.python.org/3/library/re.html Docstrings are another one to remember: docstrings are string literals too, and invalid \ sequences are invalid in docstrings too! Use raw strings (`r"""..."""`) for docstrings if they contain \'s.
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Commits on Sep 15, 2018
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 17, 2018
judell
and hmstepanek
Add UriCombinedWildcardFilter
Searching for a partial url is a common use case. It is particularly
useful for publishers who want to know who has been making annotations
on all their articles. It is also useful for users who simply can't
remember the entire url of an article they have annotated.
Add UriCombinedWildcardFilter has two configurations:
1. seperate_keys=True
Wildcards are only present in wildcard_uri param values and exact
matches are present in uri/url param values.
1. seperate_keys=False
Wildcards and exact matches are present in uri/url param values.
UriCombinedWildcardFilter igores all wildcard uri's that have wildcards
in the domain.
Remove UriFilter from default modifier list in Search class since
the UriCombinedWildcardFilter will need to replace it in certain
cases and there is no way to selectively remove modifiers. The
current design pattern is if the modifier is used by all searches,
then it is in the default list, since it will not be, drop it from
the default list.
Add both UriFilter and UriCombinedWildcardFilter's to the search __init__
module as they will be appended to the Search class modifier list as needed.
Modify all existing code that runs Search to append the UriFilter to the list
of modifiers before running a search.
Normalize http://foo.com/* to http://foo.com
Import urlparse from h._compat Wildcard uri's that don't contain wildcards are invalid. Simplify test_matches tests. Normalize http://foo.com/* to http://foo.com by also stripping `*`'s before normalizing wildcard uri's. fixup
fixup: logic for uri's w/o authority
Improve wording of Ignore invalid uri's comment. s/compinsate/compensate Escape backslashes in docstring. s/ending_question_wildcard/trailing_wildcard in wildcard normalizer. s/expected/expected_ann_idxs in test_matches.
Remove use of using="default" for es connection
Since we chose not to go forward with using elasticsearch-dsl to generate an elasticsearch connection, using "default" doesn't make sense so simply pass the elasticsearch-dsl search the request.es.conn in the tests instead. This keeps the tests consistent with the rest of the code.
Loading status checks…
Commits on Sep 18, 2018
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5303 from hypothesis/remove-use-of-es-dsl-default…
…-connection Remove use of using="default" for es connection
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was signed with a verified signature.
GPG key ID: BACE948C46F9B25E
Learn about signing commits
Loading status checks…
Merge pull request #5287 from hypothesis/fail-tests-on-warnings
Make the tests fail if any warnings are printed
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
judell
and hmstepanek
Append UriCombinedWildcardFilter in /api/search
This will allow searching for uri's containing wildcards via the wildcard_uri parameter. Add the wildcard_uri parameter to the schema and raise a validation error if the uri value is invalid (aka contains wildcards in the domain of the uri). Update the docs to reflect the additional wildcard_uri parameter.
Default search_after date to 1/1/1970 00:00:00 0ms
Datetimes default the date to be the current date for fields that aren't specified. This behavior is unintuitive and undesireable. Dates should be defaulted to the first month, first day, 00:00:00 0ms.
Merge pull request #5286 from hypothesis/add-uri-wildcard-to-api-search
Add wildcard_uri parameter to /api/search
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 19, 2018
Merge pull request #5302 from hypothesis/fix-default-search-query-date
Default search_after date to 1/1/1970 00:00:00 0ms
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 20, 2018
Add a field called hidden to an annotation document at the time of in…
…dexing. This new field is set when all children of an annotation AND the annotation itself, have been moderated. We will then use this field to determine which annotations are displayed and which ones are filtered out. See hypothesis/product-backlog#583
Loading status checks…
Merge pull request #5289 from hypothesis/nipsas
Add a field called hidden to an annotation document at the time of indexing
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 22, 2018
Enable searching for wildcard url's on activity pages (#5299)
* Add UriCombinedWildcardFilter to activity pages Replace the UriFilter with the UriCombinedWildcardFilter on activity pages so that the url facet now accepts and searches for wildcard urls. Add a test. * Add wildcard desc to url facet on activity pages * Switch on wildcard activity page feature flag * fixup: change wording of url facet
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 24, 2018
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 Search.run 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.
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 26, 2018
Change the NipsaFilter to HiddenFilter to filter annotations which ar…
…e moderated or belong to a nipsaed user. See hypothesis/product-backlog#583
Loading status checks…
Update AuthClientPolicy route whitelisting
The former method of pattern-matching on request.path was kludgy and resulted in at least one bug from oversight. The new whitelist here is easier to read as a human and is matched against the request’s `matched_route` object.
Protect `POST /api/users` with permission instead of view logic
Remove view-level auth* checking on auth-client as authn now happens in AuthClientPolicy and authz via a permission on the `UserRoot` traversal root. This endpoint will temporarily return a 404 instead of a 403 on authz fail because of the way that API view exceptions intercept 403s. To be fixed soon
raise `ValidationError` if `authority` param mismatch
Raise a `ValidationError` if supplied `authority` param does not match the verified auth client authority
Loading status checks…
Loading status checks…
Merge pull request #5314 from hypothesis/admin-auth-client-warning
Add security warning on admin/create-oauth-client form
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5309 from hypothesis/filters
Add new HiddenFilter to filter annotations which are moderated or belong to a nipsaed user.
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Update documentation about API Authorizations
Expand explanation of `clientCredentials` and add section for forwarded users
Loading status checks…
Commits on Sep 27, 2018
Revert "Add new HiddenFilter to filter annotations which are moderate…
…d or belong to a nipsaed user."
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5317 from hypothesis/revert-5309-filters
Revert "Add new HiddenFilter to filter annotations which are moderated or belong to a nipsaed user."
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5316 from hypothesis/api-authorization-docs
Update documentation about API Authorizations
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5288 from hypothesis/add-create-user-permission
Add create user permission and update `POST /api/users` authz
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Make `UserRoot.__getitem__` aware of `client_authority`
Make it possible to retrieve User models from third-party authorities when a verified/auth’d auth client is present in the request.
Protect `PATCH /api/users/{username}` with a permission
Instead of using view-level logic, update the view to match on a permission assigned in the User model’s ACL
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Commits on Sep 28, 2018
Merge pull request #5320 from hypothesis/move-validators-schemas
Move `h.validators` -> `h.schemas.validators`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Merge pull request #5318 from hypothesis/add-update-user-permission
Add update-user permission; use AuthClient auth'n for `PATCH /api/user/{username}`Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
This file was deleted.