Commit graph

144 commits

Author SHA1 Message Date
Shridhar
bf0070f090 feat: added controller required for virtual doctype in boilerplate 2020-12-29 14:00:20 +05:30
Faris Ansari
398451103a fix(customization): Only read .json files from custom folder 2020-10-16 15:43:17 +05:30
Shivam Mishra
3de0c18ab2
Merge pull request #10723 from scmmishra/feat-search-api-changes
feat: Search API changes
2020-08-14 14:00:56 +00:00
Shivam Mishra
0e380510c5 feat: ignore add total when syncing fixtures 2020-08-13 13:57:07 +05:30
Shivam Mishra
602366e285 feat: separate FTS and website search inside frappe.search 2020-08-06 19:47:46 +05:30
Shivam Mishra
19f42d1877 feat: added index all routes function 2020-08-06 19:47:46 +05:30
Shivam Mishra
a60a6fc04a feat: function to get routes from published docitems 2020-08-06 19:47:46 +05:30
Shivam Mishra
59ce616153 chore: added docstrings 2020-08-06 19:47:46 +05:30
Shivam Mishra
8bb473143b refactor: FullTextSearch class 2020-08-06 19:47:46 +05:30
Shivam Mishra
f9b59a7b10 chore: add docstrings 2020-08-06 19:47:46 +05:30
Shivam Mishra
f0547ce0d0 feat: added index hooks to website generator 2020-08-06 19:47:46 +05:30
Shivam Mishra
702a6f103a fix: commit after removing index 2020-08-06 19:47:46 +05:30
Shivam Mishra
9db450f815 feat: add remove index option 2020-08-06 19:47:46 +05:30
Shivam Mishra
32fbab7d18 feat: remove re_index by path
* get_document_to_index sets user to administrator, this is not desirable when running desk, keeping this API available is not wise
2020-08-06 19:47:46 +05:30
Shivam Mishra
ac88787593 fix: syntax 2020-08-06 19:47:46 +05:30
Shivam Mishra
f33c05d128 chore: better comments 2020-08-06 19:47:46 +05:30
Shivam Mishra
aa0cf2bad4 feat: added re-index method 2020-08-06 19:47:46 +05:30
Shivam Mishra
91d0e47f1d feat: optimize while storing index 2020-08-06 19:47:46 +05:30
prssanna
3aa3832bd3 feat: sync dashboards from json files 2020-07-06 12:11:57 +05:30
Faris Ansari
2cfe7d4457 fix: Sider issues 2020-06-05 15:52:11 +05:30
Faris Ansari
2056de1132 fix: Per site Full Text Search
- Create indexes in sites folder
- Ability to limit searches to a path using scope
2020-06-05 15:37:15 +05:30
Faris Ansari
6bba7595d7 fix: Doc search
- Fix styling
- Show only 5 results
- Search title and content
2020-05-31 23:30:13 +05:30
Faris Ansari
3a20187715 fix: Build search index for web pages after migrate 2020-05-30 18:03:38 +05:30
Faris Ansari
b17b0d9077 feat: Doc search 2020-05-27 18:02:16 +05:30
Faris Ansari
75cafdc359 wip 2020-05-19 02:14:44 +05:30
Shivam Mishra
48382fdca0 refactor: rename onboarding to module onboarding 2020-05-12 16:23:26 +05:30
Shivam Mishra
4be2ebbcd0 fix: add ignore_doctypes list 2020-04-28 22:30:37 +05:30
Shivam Mishra
5c8a63f0bc feat: ignore status fields in onboarding and onboarding steps 2020-04-28 22:17:42 +05:30
Rucha Mahabal
19c69e5316 fix: anti-pattern code 2020-01-27 12:26:12 +05:30
Rucha Mahabal
739b033489 feat: implemented pull trigger in follower nodes 2019-10-11 02:16:31 +05:30
mergify[bot]
36deebec10
Merge pull request #8480 from Mangesh-Khairnar/fix-boilerplate-creation
fix: boilerplate creation
2019-09-24 17:11:48 +00:00
Mangesh-Khairnar
46af75f2ea
Update frappe/modules/utils.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-09-24 10:16:04 +05:30
Mangesh-Khairnar
0d6b8072df fix: boilerplate creation 2019-09-23 16:36:35 +05:30
ci2014
a8b53deb75
Fix loop error in utils.py
Property Setters got deleted on bench migrate and haven't been readded, because data was passed instead of d. Now it works.
2019-09-21 15:41:54 +02:00
Faris Ansari
bff94703cf feat: Create NestedSet doctypes via configuration 2019-09-02 15:58:52 +05:30
Faris Ansari
d06abbd852
feat: Option to skip failing patches in migrate (#7959) 2019-07-23 16:46:15 +05:30
Saif Ur Rehman
dd5385e94b style: Rename prepare_docdict_for_import to prepare_for_import 2019-04-24 17:06:46 +05:00
Saif Ur Rehman
6b427705be fix: codacy 2019-04-24 17:06:24 +05:00
Saif Ur Rehman
a496e5b91c feat: Remove null and empty attributes from DocType JSON file on export 2019-04-24 17:05:34 +05:00
Saif Ur Rehman
fc410ee950 fix: Move field_order sync logic to DocType controller and introduce hooks
before_export, before_import and prepare_docdict_for_import
2019-04-24 17:05:21 +05:00
Saif Ur Rehman
d30ec73d43 feat: Use field_order attr in DocType JSON file for cleaner git diffs 2019-04-24 17:05:01 +05:00
Frappe Bot
629a5e502a Merge branch 'master' into develop 2019-04-07 09:03:27 +00:00
Suraj Shetty
d22206a992 fix: Fix export customisation (#7198)
convert `sync_on_migrate` and `with_permissions` from string to Int
2019-04-04 14:49:52 +05:30
Saurabh
a01f1c80f8 fix:too many arguments 2019-02-14 11:18:05 +05:30
Saurabh
dae4b958fe fix: do not delete existing custom fields while importing new custom fields 2019-02-13 13:18:07 +05:30
Sagar Vora
ef82f39f99 Merge branch 'staging' into develop 2019-01-29 18:24:11 +05:30
Aditya Hase
837bfc0995 fix(unicode): Import unicode_literals in every file (#6805)
* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
2019-01-25 11:56:27 +05:30
Aditya Hase
6b72faf44f style: Linting fixes (#6809)
* style: Remove unused imports

* style: Remove unused local variables
2019-01-23 16:39:55 +05:30
Rushabh Mehta
2e6a202652 Postgres support for Frappe (#5919)
* [start] postgres

* [wip] started refactoring db_schema

* Add psycopg2 to requirements.txt

* Add support for Postgres SQL

- Separate frameworkSQL, database, schema, setup_db file for
mariaDB and postgres
- WIP

* Remove quotes from sql to make it compatible with postgres as well

* Moved some code from db_schema to database.py

* Move code from db_schema to schema.py

Add other required refactoring

* Add schema chages

* Remove redundant code in file

* Add invalid column name exception class to exceptions.py

* Add back tick in query wherever needed and replace ifnull with coalesce

* Update get_column_description code in database.py file

* Remove a print statement

* Add keys to get on_duplicate query

* Add bactick wherever necessary

- Remove db_schema.py file

* Remove DATE_SUB as it is incompatible with postgres

- Fix prepare_filter_condition

* Add backtick and quotes wherever necessary
- Move get_database_size to frappe.db namespace
- fix some left out bugs and errors

* Add code to create key and unique index
- added mysql and posgres in their respective database.py

* Add more bacticks in queries and fix some errors
- Pass keys to on_duplicate_update method
- Replace MONTH with EXTRACT function
- Remove DATEDIFF and CURDATE usage

* Cast state value to int in toggle_two_factor_auth
- since two_factor_auth has the datatype of Int

* Refactor
- Replace Timediff with normal arithmetic operator
- Add MAX_COLUMN_LENGTH
- Remove Redundant code
- Add regexp character constant
- Move create_help_table to database.py
- Add get_full_text_search_condition method
- Inherit MariaDBTable from DBTable

* Replace Database instance with get_db method

* Move db_manager to separate file

* Refactor
- Remove some unwanted code
- Separate alter table code for postgres and mysql
- Replace data_type with column_type in database.py

* Make fulltext search changes in global_search.py

* Add empty string check

* Add root_password to site config

* Create cli command for postgres console

* Move setup of help database to setup_db.py

* Add get_database_list method

* Fix exception handling
- Replace bad_field handler with missing_column handler

* Fix tests and sql queries

* Fix import error

* Fix typo db -> database

* Fix error with make_table in help.py

* Try test for postgres

* Remove pyhton 2.7 version to try postgres travis test

* Add test fixes

* Add db_type to the config of test_site_postgres

* Enable query debug to check the reason for travis fail

* Add backticks to check if the test passes

* Update travis.yml
- Add postgres addon

* Try appending 'd_' to hash for db_name
- since postgres does not support dbname starting with a number

* Try adding db_type for global help to make travis work

* Add print statements to debug travis failure

* Enable transaction and remove debug flag

* Fix help table creation query (postgres)

* Fix import issue

* Add some checks to prevent errors
- Some doctypes used to get called even before they are created

* Try fixes

* Update travis config

* Fix create index for help table

* Remove unused code

* Fix queries and update travis config

* Fix ifnull replace logic (regex)

* Add query fixes and code cleanup

* Fix typo
- get_column_description -> get_table_columns_description

* Fix tests
- Replace double quotes in query with single quote

* Replace psycopg2 with psycopg2-binary to avoid warnings
- http://initd.org/psycopg/docs/install.html#binary-install-from-pypi

* Add multisql api

* Add few multisql queries

* Remove print statements

* Remove get_fulltext_search_condition method and replace with multi query

* Remove text slicing in create user

* Set default for 'values' argument in multisql

* Fix incorrect queries and remove few debug flags
- Fix multisql bug

* Force delete user to fix test
- Fix Import error
- Fix incorrect query

* Fix query builder bug

* Fix bad query

* Fix query (minor)

* Convert boolean text to int since is_private has datatype of int
- Some query changes like removed double quotes
and replace with interpolated string to pass multiple
value pass in one of the query

* Extend database class from an object to support python 2

* Fix query
- Add quotes around value passed to the query for variable comparision

* Try setting host_name for each test site
- To avoid "RemoteDisconnected" error while testing data migration test
- Update travis.yml to add hosts
- Remove unwanted commit in setup_help_database

* Set site hostname to data migration connector (in test file)
- To connect the same site host

* Fix duplicate entry issue
- the problem is in naming series file.
In previous commits I unknowingly changed a part of a series query
due to which series were not getting reset

* Replace few sql queries with orm methods

* Fix codacy

* Fix 'Doctype Sessions not found' issue

* Fix bugs induced during codacy fixes

* Fix Notification Test

- Use ORM instead of raw sql

* Set Date fallback value to 0001-01-01

- 0000-00-00 is invalid date in Postgres
- 0001-01-01 works in both

* Fix date filter method

* Replace double quotes with single quote for literal value

* Remove print statement

* Replace double quotes with single

* Fix tests

- Replace few raw sql with ORM

* Separate query for postgres

- update_fields_to_fetch_query

* Fix tests

- replace locate with strpos for postgres

* Fix tests

- Skip test for datediff
- convert bytes to str in escape method

* Remove TestBot

* Skip fieldname extraction

* Replace docshare raw sql with ORM

* Fix typo

* Fix ancestor query test

* Fix test data migration

* Remove hardcoded hostname

* Add default option and option list for db_type

* Remove frappe.async module

* Remove a debug flag from test

* Fix codacy

* fix import issue

* Convert classmethod to static method

* Convert few instance methods to static methods

* Remove some unused imports

* Fix codacy

- Add exception type
- Replace few instance methods with static methods
- Remove unsued import

* Fix codacy

* Remove unused code

* Remove some unused codes

- Convert some instance methods to static function

* Fix a issue with query modification

* Fix add_index query

* Fix query

* Fix update_auth patch

* Fix a issue with exception handling

* Add try catch to a reload_doc

* Add try-catch to file_manager_hook patch

* import update_gravatar to set_user_gravatar patch

* Undo all the wrong patch fixes

* Fix db_setup code 😪
- previously it was not restoring db from source SQL
which is why few old patched were breaking
(because they were getting different schema structure)

* Fix typo !

* Fix exception(is_missing_column) handling

* Add deleted code
- This code is only used in a erpnext patch.
Can be moved to that patch file

* Fix codacy

* Replace a mariadb specific function in a query used in validate_series

* Remove a debug flag

* Revert changes (rename_parent_and_child)

* Fix validate_one_root method

* Fix date format issue

* Fix codacy
- Disable a pylint for variable argument warning
- Convert an instance method to static method

* Add bandit.yml

The Codacy seems to use Bandit which generates
warning for every subprocess import and its usage during pytest
Since we have carefully used subprocess (avoided user input),
warnings needs to be avoided.
This can be removed if we have any alternative for subprocess usage.

* Skip start_process_with_partial_path check

* Fix typo

* Add python 2.7 test

* Move python versions in travis.yml

* Add python versions to jobs

* Overwrite python version inheritance for postgres in travis.yml

* Add quotes around python version in .travis.yml

* Add quotes around the name of the job

* Try a travis fix

* Try .travis.yml fix

* Import missing subprocess

* Refactor travis.yml

* Refactor travis.yml
- move install and tests commands to separate files
- Use matrix to build combination of python version and db type

* Make install.sh and run-tests.sh executable

* Add sudo required to travis.yml to allow sudo cmmands in shell files

* Load nvm

* Remove verbose flag from scripts

* Remove command-trace-print flag

* Change to build dir in before script

* Add absolute path for scripts

* Fix tests

* Fix typo

* Fix codacy
- fixes - "echo won't expand escape sequences." warning

* Append (_) underscore instead of 'd' for db_name

* Remove printf and use mysql execute flag
2018-09-21 10:20:48 +05:30
Rushabh Mehta
be61b74c2a [minor] remove check from update password, default dropbox broker 2018-07-17 18:14:57 +05:30