Commit graph

55 commits

Author SHA1 Message Date
Ankush Menat
d389fffbb7
feat: inter-process file locks (#19133) 2022-12-06 16:31:51 +05:30
Anand Baburajan
bc0abd9cfd
feat(util): add is_last_day_of_the_month (#18835)
* feat: add is_last_day_of_the_month
2022-11-10 15:18:49 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Ankush Menat
53af10a064 refactor!: python pretty_date consistent with JS
Python pretty date was ceiling month and week instead of flooring them,
this is incorrect AND inconsistent with popular JS library pretty date
that we use on client side
2022-08-16 10:53:28 +05:30
Ankush Menat
9de31d03c1 refactor!: timespan utils consistent output
BREAKING CHANGE:

- `get_year_ending` returns datetime.date instead of str
- `get_timespan_date_range` will always return datetime.date ranges
2022-08-16 10:53:28 +05:30
Ankush Menat
3fa4ec1bd6 refactor: container utils and misc tests 2022-08-16 10:53:28 +05:30
Ankush Menat
ad4cb710f2 refactor: duplication in gravatar code 2022-08-16 10:53:28 +05:30
Ankush Menat
9bf9256049 test: validate name 2022-08-16 10:53:28 +05:30
Ankush Menat
26bf65b87c test: phone number validation 2022-08-16 10:53:28 +05:30
Gavin D'souza
fca29b8f19 test: Add tests for Identicon & gravatar utils 2022-08-11 23:53:21 +05:30
Gavin D'souza
3968c32fa9 test: Add test for lazy_import 2022-08-11 23:53:21 +05:30
Gavin D'souza
0b15f8f9db test: Add tests for make_random module 2022-08-11 23:53:21 +05:30
Ankush Menat
28fc208b51 test: sanitize_html attributes behaviour 2022-08-09 14:47:18 +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
Ankush Menat
59a9be4caf refactor: simplify timegrain conditions
All special handling for timegrains is same as general handling, no idea why it's done
like this.
2022-06-08 11:53:14 +05:30
Ankush Menat
4085646495 fix: identify varkw in get_newargs 2022-05-29 17:11:58 +05:30
Ankush Menat
c3918e8e34 test: test get_newargs 2022-05-29 16:26:02 +05:30
Faris Ansari
d94d30dacc test: set name to create client script 2022-04-13 18:36:44 +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
saxenabhishek
1507751a01 test: test_app_name_parser 2022-03-22 14:17:01 +05:30
Ankush Menat
588fbe24ef feat: testing utilities 2022-02-28 16:20:51 +05:30
ChillarAnand
89b0181a8a test: Fix flaky permission test 2022-02-25 19:08:22 +05:30
Saqib Ansari
92aee42cf7 test: link titles are added to the doctype on getdoc 2022-02-12 13:01:35 +05:30
Saqib Ansari
de76ef6518 test: doctypes are added to link_title_map in boot_info 2022-02-12 13:01:06 +05:30
Gavin D'souza
1b7fa5e180 fix(test): Update test according to API behaviour 2022-02-02 20:22:43 +05:30
Gavin D'souza
2b4cb2e1c7 test: Add tests for get_time, get_timedelta 2022-02-02 19:45:10 +05:30
Gavin D'souza
885c86bedb Merge branch 'develop' of github.com:frappe/frappe into set_value-refactor 2022-01-31 11:53:59 +05:30
Ankush Menat
eda052529b
fix: calling non-exisitng unescape method on HTML2Text (#15796)
test: xlsxutils
2022-01-30 12:17:02 +05:30
Gavin D'souza
e080eab06b style: Sort imports 2022-01-28 18:38:13 +05:30
Gavin D'souza
4990a59c48 test: Added unit tests for format_timedelta, parse_timedelta,
json_handler
2022-01-28 18:35:27 +05:30
Suraj Shetty
5d5ad78789 refactor: Rename week_starts_on to first_day_of_the_week
For consistency
2022-01-05 14:54:46 +05:30
Suraj Shetty
4a5d9a02e3 test: Update date utils test cases 2022-01-04 13:04:10 +05:30
Suraj Shetty
85360ef4c0 test: Add cases to check date utilities 2022-01-03 13:37:11 +05:30
Ankush Menat
18ba79222c test: unit tests for diff.py utils 2021-11-09 18:40:51 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
8e96d8d522 test: Add tests for str fieldstypes cast 2021-08-31 12:55:31 +05:30
Gavin D'souza
be72397bca test: Add tests for frappe.utils.data.cast 2021-08-30 18:51:36 +05:30
Mitul David
4f86cdb8f8
Merge branch 'develop' into image-processing 2021-08-06 18:45:59 +05:30
MitulDavid
14fac949af test: Add test for optimize_image utility 2021-08-06 18:43:14 +05:30
Ankush
257723cb0a
feat: PythonExpression and Python option with syntax validation for Code field types (#13707)
* feat: `PythonExpression` and `Python` options for `Code` fields

* fix: check python expressions in assignment rule

* fix: replace server script syntax validation

* fix: validate condition in workflow transition

Add PythonExpression in Options.
2021-08-06 04:10:09 +00:00
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
Abhishek Balam
f4e4fc98f9 fix: remove unnecessary schemes and minor changes 2021-05-02 00:32:01 +05:30
Hussain Nagaria
024e759a70 refactor: Add optional URL scheme validation 2021-05-01 00:34:19 +05:30
Hussain Nagaria
3e229e931a test: Email and URL validate functions 2021-04-30 15:37:55 +05:30
Abhishek Balam
e306f5601c fix: made requested changes 2020-11-30 18:58:53 +05:30
Faris Ansari
8fb2a538ec test: Add UI test for Link control (#7809)
* test: Add UI test for Link control

- Add API cy.call
- Add API cy.create_records
- Add ui_test_helpers.py

* style: Missing semicolon

* style: Missing semicolon

* style: Missing semicolon

* style: Remove unused imports

* test: Robust test for setting invalid value

* style: Remove unused import
2019-07-03 07:55:36 +05:30
Suraj Shetty
b887091cbd fix: Clear cache after creating workflow 2019-06-03 12:05:33 +05:30
Suraj Shetty
8528298b55 test: Init bulk approval test 2019-05-31 13:44:15 +05:30
Faris Ansari
f63ac68510 test: Fix Cypress tests 2019-02-19 15:24:18 +05:30
sahil28297
3644f5f4cd feat: relative timeframe filters (#6792)
* feat: relative timeframe filters

* fix: resolve syntax errors

* fix: Translated options
2019-01-21 16:02:40 +05:30