Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Ankush Menat
0aa3b51faa
fix: single global search sync
...
closes https://github.com/frappe/frappe/issues/23106
2023-11-06 20:29:16 +05:30
mergify[bot]
6ad2e762d3
Merge pull request #23064 from frappe/bulk-insert-search-sync
...
perf(GlobalSearch): bulk insert queued items
2023-11-03 05:10:31 +00:00
Ankush Menat
8c74d542d5
perf: don't check len before popping
...
rpop is atomic and yields None when nothing is found. No need to check length.
2023-11-03 10:20:31 +05:30
Ankush Menat
eba499a9ba
refactor: misc changes
...
- make internal function explicit
- dont delete keys which is immediately being replaced.
- deprecate `sync_value`
2023-11-03 10:15:52 +05:30
18alantom
3d7ba41583
fix(sync_values): use EXCLUDED for postgres
...
removing the second arg from `do_update` causes
EXCLUDE to be auto added
2023-11-02 18:57:51 +05:30
18alantom
aa690553cf
refactor: undo use of count in redis pop
...
count param in rpop and lpop was introduced in 6.20
at the time of this commit we are using an older
version that does not include it
2023-11-02 18:22:50 +05:30
18alantom
ee3776f38f
refactor: move inner for to function
2023-11-02 17:02:49 +05:30
18alantom
64adf49706
refactor: use rpop count to pop in batches
...
- fix: dedupe items in a batch
- fix: reassign `query` cause it does not hold state
_fkn ORMs man 🙄 _
2023-11-02 16:58:10 +05:30
18alantom
2742746ced
perf(GlobalSearch): bulk insert queued items
...
Fixes #14660
2023-11-02 13:30:56 +05:30
Ankush Menat
db01c05eb8
fix: enforce perms on global search
2023-10-31 21:37:30 +05:30
barredterra
88c8baa9ee
refactor: for append to extend, merge list extend
...
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache ( #21282 )
2023-06-08 11:47:17 +05:30
Gavin D'souza
d357af1533
refactor: Add a maxsplit limit to string splits
2023-01-24 19:22:51 +05:30
Gavin D'souza
06cf18d0aa
chore: Add optional typing hints for params with default None
2022-12-15 13:47:05 +05:30
Gavin D'souza
d3250f6504
refactor(whitelisted): Add typing hints to APIs
...
* Refactor type checks defined in APIs
* Remove dead/deprecated kwargs usages
* Added appropriate hints to APIs and consecutive utils defined in the following modules:
- frappe.realtime
- frappe.translate
- frappe.utils.global_search
- frappe.www.third_party_apps
- frappe.www.search
- frappe.www.printview
2022-12-15 13:47:05 +05:30
Gavin D'souza
3863d9bb80
fix(global_search): Trigger rebuilding on Custom Field's property change
2022-08-02 14:49:04 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features ( #17367 )
...
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
b696fa6da5
perf: Pre-compile and re-use regexp pattern
...
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.
Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
2022-06-08 14:07:38 +05:30
chillaranand
1d763a6659
refactor: Fix flake8 issues
2022-05-19 15:34:35 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black ( #16453 )
...
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Suraj Shetty
42643c3faa
fix: Follow FIFO while inserting global search record
...
the latest enqueued value should override the value of the existing document
2022-04-01 18:47:05 +05:30
phot0n
bebc8058b6
feat: integer primary keys
2022-03-11 23:46:00 +05:30
Gavin D'souza
65864c027f
chore: Update module license header
...
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
2021-09-03 11:51:01 +05:30
Gavin D'souza
30cf8fd58d
refactor: Use run instead of frappe.db.sql
2021-08-12 18:36:43 +05:30
Gavin D'souza
1015283731
fix(global_search): Typecast variable for comparision
...
Previously start was being type casted with int. That was reverted by refactoring query to use new Query Builder
This bug was introduced via ee3c84beef
2021-08-12 16:23:40 +05:30
saxenabhishek
7671e78487
style: minor fixes and improvements
2021-07-30 11:29:41 +05:30
saxenabhishek
ce10e36725
refactor: move all pypika functions to a module
2021-07-30 11:00:35 +05:30
saxenabhishek
ee3c84beef
style: typecast to string inside db.sql
2021-07-30 11:00:35 +05:30
saxenabhishek
c05a032811
refactor: qb in global_search.search
2021-07-30 11:00:34 +05:30
Aradhya-Tripathi
84ff1d0af9
style: removed frappe.db.sql comments
2021-07-28 13:48:01 +05:30
Aradhya-Tripathi
8887836820
refactor: Moved util queries to
...
frappe orm
2021-07-21 23:31:15 +05:30
Bhavesh Maheshwari
68930a022a
fix: Duplicate if condition remove
2021-07-13 15:55:24 +05:30
Suraj Shetty
2d8c6c1710
Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website
2021-06-03 11:43:28 +05:30
Gavin D'souza
e407b78506
chore: Drop dead and deprecated code
...
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
68aa1805aa
fix: Exception handling
2021-05-19 14:03:31 +05:30
Suraj Shetty
c5b9815248
fix: Add get_response_content to get page content
2021-05-14 23:43:36 +05:30
Suraj Shetty
18497989dc
refactor: Remove render_page from render.py
...
& replace all usages of render_page with get_response
2021-05-14 21:30:28 +05:30
Suraj Shetty
3c4306c87a
refactor: Fix regex to avoid deprecation warnings
2021-05-10 09:18:50 +05:30
Aditya Hase
637aa059b9
perf: Remove BeautifulSoup from import tree
2021-02-19 21:01:55 +05:30
Karthikeyan Singaravelan
3a146580a8
fix: Use html.unescape for Python 3.9 compatibility.
2020-11-26 13:30:58 +00:00
Faris Ansari
f7158ad5f6
fix: Obey config for global search of web routes
2020-06-05 15:39:25 +05:30
Faris Ansari
d918d13f40
fix: Print message when global search is updated
2020-05-30 18:03:53 +05:30
Himanshu Warekar
6ea8881b29
fix: remove exact phrase search
2020-05-06 12:48:15 +05:30
Chinmay D. Pai
10e939d012
chore: update global_search and add test
...
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-30 10:46:00 +05:30
Chinmay D. Pai
063def052e
chore: remove trailing closing bracket
...
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-27 18:54:18 +05:30
Chinmay D. Pai
708248baf9
fix: avoid sqli inside global web search
...
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-27 16:04:11 +05:30
mergify[bot]
710ac6b194
Merge pull request #9186 from benknowles/patch-3
...
fix: global search index breaking on long titles
2020-01-11 04:35:54 +00:00