Shyam Sunder
d083084407
server/tests: use transactional db for faster unit tests
...
* `test_modify_saves_non_empty_diffs` needs non-transactional
db, so moved to seperate file
* Replaced incompatable usage of `db.session.rollback()`
with parametrerized function calls
* xfail conditionals for search removed, as we can no longer
get current driver with binds
* Also remove usage of deprecated `pytest.yield_fixture`
2021-09-23 12:24:56 -04:00
Shyam Sunder
0dd427755b
client+server: fix linter issues due to updated pre-commit hooks
2020-09-01 14:07:39 -04:00
Shyam Sunder
57193b5715
client+server: implement code autoformatting using prettier and black
2020-06-06 08:58:23 -04:00
Shyam Sunder
ea623449e7
server: format code to flake8
2020-06-05 10:02:18 -04:00
Shyam Sunder
b0f1b8c230
fix python lint issues
2020-06-03 11:55:50 -04:00
Ruin0x11
5ca21f9e7f
Add pool tests
2020-05-04 19:12:54 -07:00
Shyam Sunder
0e6427d8bc
server/tests: use postgresql test database
2020-03-06 18:15:25 -05:00
rr-
4bc58a3c95
server: lint
2017-04-24 23:30:53 +02:00
rr-
e4aa38f159
server/search: fix errors on negative page offsets
2017-04-24 22:12:12 +02:00
rr-
ba4df16499
server/search: add search term escaping
2017-04-24 21:59:38 +02:00
rr-
fdad08e176
server: use index-based paging ( #123 )
2017-02-09 22:40:00 +01:00
rr-
ee6b66329b
server/posts: fix search by aspect ratio
...
It was being rounded to nearest integer because of the width/height
columns' data type.
2017-02-05 23:21:43 +01:00
rr-
00c3a4320b
server/posts: support aspect-ratio search query
2017-02-05 22:09:33 +01:00
rr-
0b21d98c9b
server/posts: support note-text search query
2017-02-05 21:51:53 +01:00
rr-
ad842ee8a5
server: refactor + add type hinting
...
- Added type hinting (for now, 3.5-compatible)
- Split `db` namespace into `db` module and `model` namespace
- Changed elastic search to be created lazily for each operation
- Changed to class based approach in entity serialization to allow
stronger typing
- Removed `required` argument from `context.get_*` family of functions;
now it's implied if `default` argument is omitted
- Changed `unalias_dict` implementation to use less magic inputs
2017-02-05 16:34:45 +01:00
rr-
0c61e85340
server: fix lint
2016-09-26 22:51:00 +02:00
rr-
560a7d6839
server/search: prefer arrays over ranges
...
(No, it doesn't work recursively.)
Also fix tests.
2016-09-26 22:48:09 +02:00
rr-
422b99ac8d
server/search: add content-checksum
2016-08-26 16:26:06 +02:00
rr-
bb369efa99
server/general: disable autoflush
2016-08-26 14:41:05 +02:00
rr-
61d084cc66
server/search: support 'submit:' for anon uploads
2016-08-22 19:45:25 +02:00
rr-
9aea55e3d1
server/general: embrace most of PEP8
...
Ignored only the rules about continuing / hanging indentation.
Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr-
d102c9bdba
server/tests: update func.posts tests
2016-08-14 16:43:35 +02:00
rr-
ac23067fdf
server/general: use UTC time stamps
2016-07-03 14:46:28 +02:00
rr-
40565e82ae
server/posts: change comment-time behavior
...
Rather than looking at the edit time, now it looks at the creation time.
2016-06-12 14:24:14 +02:00
rr-
f3bb6c28a1
server/general: cosmetic fixes
2016-06-05 10:39:56 +02:00
rr-
8a5c6f0b31
server/search: fix caching special tokens
...
special:liked was being reused between users. Now the cache internally
caches object similar to liked:USER.
2016-06-03 19:47:09 +02:00
rr-
f0d3589344
server/search: cache by query rather than its text
2016-06-03 19:47:09 +02:00
rr-
59ad5fe402
server/search: refactor, extract parsing
2016-06-03 19:47:09 +02:00
rr-
a72f6aa585
server/search: fix searching for invalid numbers
2016-06-02 20:56:28 +02:00
rr-
1034362b84
server/search: fix searching by partial range
2016-06-02 20:56:28 +02:00
rr-
802c7feca0
server/search: add safety search for posts
2016-06-02 13:58:08 +02:00
rr-
48bcbbff83
server/search: improve performance
2016-05-30 20:51:52 +02:00
rr-
731c0442e9
server/search: change named token detection
...
In particular, treat tokens starting with : as anonymous tokens.
2016-05-24 10:29:14 +02:00
rr-
172b956e48
server/search: permit search for tags by alias
2016-05-11 23:47:50 +02:00
rr-
6179f016ae
server/search: make searches case insensitive
2016-05-11 23:47:50 +02:00
rr-
fcbfa90879
serevr/tags: fix search by post count and category
2016-05-09 22:36:29 +02:00
rr-
339c9a3333
server/tags: reduce number of queries
...
On a test page with 50 tags, 158 queries were reduced to 3:
1. Get the authenticated user
2. Get tags for given page
3. Count all tags
Looks just about right.
2016-05-08 20:33:16 +02:00
rr-
58964bcdc9
server/posts: add post listing
2016-05-07 21:50:37 +02:00
rr-
da5b32feeb
server/users: fix hiding email from admins etc
2016-04-29 13:16:16 +02:00
rr-
0b47957bb9
server/comments: add comment search
2016-04-24 11:56:14 +02:00
rr-
a30886cc70
server/search: rename order: to sort:
2016-04-22 19:37:58 +02:00
rr-
2e57a0746f
server/general: consistently use db.session
2016-04-19 18:10:22 +02:00
rr-
1597ae7c5c
server/db: refactor session usage
2016-04-18 23:06:51 +02:00
rr-
e8a9c4ad51
server/db: fix ambiguous names
2016-04-18 19:24:09 +02:00
rr-
9ac70dbed4
server/tags: simplify relations model
2016-04-17 12:54:31 +02:00
rr-
cecab3caf0
server/tests: fix test name
2016-04-17 10:08:11 +02:00
rr-
0bc45e9c45
server/search: support -min and -max suffixes
2016-04-17 08:31:46 +02:00
rr-
61d2fb88ea
server/tags: add tag listing
2016-04-16 21:24:09 +02:00
rr-
c71c082000
server/search: fix missing default search order
2016-04-16 18:55:04 +02:00
rr-
3d4ceb13b8
server/api: move all io mgmt to context
...
where input/output includes files, JSON metadata and GET parameters.
Additionally, formalize context with a new class, Context.
2016-04-15 23:26:38 +02:00