Commit graph

152 commits

Author SHA1 Message Date
barredterra
5558cb0739 fix: linter config in boilerplate 2024-03-10 20:43:39 +01:00
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
barredterra
d67066dfae fix: switch to ruff 2024-02-18 16:42:41 +01:00
barredterra
1aae576b1a Merge branch 'develop' into copy-config-to-new-app 2024-02-16 14:36:58 +01:00
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
barredterra
95d0fb57cd feat: linter workflow for new apps 2024-01-14 17:36:47 +01:00
barredterra
8867e1ec4e Merge remote-tracking branch 'upstream/develop' into copy-config-to-new-app 2023-12-26 16:37:31 +01:00
barredterra
f1f85f63a3 feat: ask for branch name
Default to frappe's branch name (version-15 -> version-15) to clearly communicate compatibility.
2023-12-18 20:11:56 +01:00
barredterra
f2a936c2e1 Revert "refactor: _create_app_boilerplate"
This reverts commit 670d66210b.
2023-12-18 20:04:07 +01:00
barredterra
3efad09123 feat: add info about pre-commit to README 2023-12-18 19:49:29 +01:00
barredterra
670d66210b refactor: _create_app_boilerplate
Loop over dict items instead of copying the same code for each file.
2023-12-18 19:44:24 +01:00
barredterra
0ffa95c73e refactor: README template 2023-12-18 19:39:42 +01:00
barredterra
c522b938d7 feat: create pre-commit config for new app 2023-12-18 19:11:42 +01:00
barredterra
ca1a5ce12d feat: copy config files to new app 2023-12-18 18:57:24 +01:00
Raffael Meyer
99f0745302
style: new app boilerplate (#23847)
* style: add spaces to hooks boilerplate

Black wants comments to start with a space. Adding them here means less formatting later.

* style: init_template

Put version on the first line and use double quotes.
2023-12-18 23:13:13 +05:30
Ankush Menat
c23771475c
refactor: Use hooks to specify default log clearing (#23507) 2023-11-30 13:06:29 +05:30
Hussain Nagaria
f1ba76f5f7 fix: add mariadb-client install step in workflow boilerplate 2023-10-16 19:40:09 +05:30
Akhil Narang
091ebdd8dc
refactor(treewide): use mariadb commands directly instead of mysql (#22620)
This has been done because the mysql command issues a deprecation warning now

mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-10-10 12:49:16 +05:30
Corentin Flr
41d30e7213
feat: Add custom icons with the app_include_icons hook (#22254)
* feat: Add custom icons with the `app_include_icons` hook

These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>

* fix: skip conf for including icons

* test: Fix test_include_icons

---------

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-09-20 20:23:17 +05:30
niraj gautam
fbbdef1e9c
feat: Dynamically generate license text (#22299)
* feat: Add dynamic license dtext

* feat: Validate license name

* fix(DX): Pass options as click.Choice

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-05 05:45:27 +00:00
Ankush Menat
1ad5c0ea86 refactor: Avoid regex for email validation
[skip ci]
2023-09-02 11:38:56 +05:30
Xieyt
98fce7d633
Fix:add Email Validation 2023-08-31 14:04:54 +05:30
Babuuu
173605fe2c
chore: Update boilerplate gitignore (#22220)
Add __pycache__ to .gitignore file of the new app.
2023-08-28 16:54:54 +05:30
Ankush Menat
8436f775a5
feat(DX): PEP517 compatible build in new apps (#21704)
* chore: remove setup.py requirements.txt boilerplate

* feat(DX): PEP517 compatible builds on new apps

closes https://github.com/frappe/frappe/issues/21612
2023-07-17 12:56:41 +05:30
Ankush Menat
e26152f0dc chore: use node18 for github workflow
[skip ci]
2023-06-26 13:29:18 +05:30
Ankush Menat
25c18e486c
Merge pull request #21461 from ruchamahabal/hooks
feat: before/after hooks for any app install/uninstall
2023-06-26 09:50:35 +05:30
barredterra
15396ceb60 fix: add required_apps to hooks boilerplate 2023-06-22 15:48:04 +02:00
barredterra
d044b30522 fix: remove app_version from hooks boilerplate
It's not used by any frappe/erpnext code and linters complain about the
unused import
2023-06-22 15:47:34 +02:00
Rucha Mahabal
ba8f97e789 feat: before/after hooks for any app install/uninstall 2023-06-22 16:07:06 +05:30
Ankush Menat
32f54b6734 chore: remove socketio from boilerplate workflow
[skip ci]
2023-06-12 12:14:05 +05:30
Ankush Menat
6f4a7ddf10 Revert "build(deps)!: Require NodeJS 18 as minimum version (#21303)"
This reverts commit 67cd951013.
2023-06-11 11:40:22 +05:30
Ankush Menat
67cd951013
build(deps)!: Require NodeJS 18 as minimum version (#21303) 2023-06-10 19:22:57 +05:30
Gursheen Kaur Anand
49fe6e0c98
feat: patches.txt template added by default for new apps #21046 (#21070)
* Added patches.txt template in boilerplate

* test: new app patches.txt

* style: formatting

---------

Co-authored-by: Gursheen Anand <gursheen@frappe.io>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-05-24 14:47:06 +05:30
Ankush Menat
5fff6698ad fix: use develop as branch name for new apps
dont ask me why
2023-04-02 15:26:32 +05:30
Gavin D'souza
ea62156a6d fix: Add request, job events in hooks boilerplate 2023-02-10 13:28:50 +05:30
Ankush Menat
87561940a4
feat: Interactively add a new patch (#19722) 2023-01-23 15:04:43 +05:30
Bread Genie
9e79df9802
ci: use $GITHUB_OUTPUT instead of set-output (#19389)
* refactor(boilerplate): use `$GITHUB_OUTPUT` instead of `set-output`

* ci: use `$GITHUB_OUTPUT` instead of `set-output`

* fix: remove unterminated string literal
2022-12-22 14:16:09 +05:30
Bread Genie
211880d693
fix(boilerplate): add redis services in GHA (#19376)
* feat(boilerplate): add redis services

* chore: bump all action versions

[skip ci]

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2022-12-21 12:39:00 +05:30
Daizy Modi
d88ef967b9
feat: hook ignore_links_on_delete to skip doctypes on delete (#19347)
* feat: hook `ignore_links_on_delete` to skip doctypes on delete

* fix: helper comment

* fix: helper comment

* test: test case for `ignore_links_on_delete`

* test: fix test case
2022-12-20 11:17:28 +05:30
Ankush Menat
eebf7e1fff
chore: dead code removal (#18410)
* chore!: Drop dead code related to configs/moduelview

* chore!: Drop dead boilerplate

* chore: drop desktop.py boilerplate

* chore!: Remove report dump
2022-10-13 15:55:40 +05:30
hrwx
476b628a4e chore: revert changes to github workflow template 2022-08-06 10:52:59 +01:00
hrwx
b01929405d refactor: translatable doctypes 2022-08-05 21:38:10 +01:00
Gavin D'souza
65c6914068 ci: Bump mariadb from 10.3 to 10.6 2022-07-04 12:33:29 +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
404d5a3cd7 build!: Bump minimum Python version to 3.10
Given how widespread PY310's usage has become, and how we're just a
few months away from PY311 major release. This is a slightly late
bumping but necessary to ensure smoother updates & maintenance for
Frappe, ERPNext & other apps in the coming years. Almost all people
who participated in the pool from the community as well as Frappe team
voted (via active telegram groups) PY310 as their preferred minimum
requirement for v14.
2022-06-30 13:11:26 +05:30
Gavin D'souza
bd3d7bf3ed ci: Run test builds on min requirement PY38
Since version pinned in pyproject.toml is 38 & we've been running on 39,
we've pushed a few incompatible changes since :crie:
2022-06-29 10:44:55 +05:30
Gavin D'souza
59ab6531c9 ci: Invalidate GHA pip cache on pyproject or setup changes
- Cache invalidated if any of the files change: *requirements.txt,
pyproject.toml, setup.py or setup.cfg
- Updated boilerplate for new apps too
2022-06-15 15:05:37 +05:30
Gavin D'souza
13b18a9118 fix: Regex compilation in boilerplate utils
Flagged via tests in frappe.tests.test_boilerplate
2022-06-09 12:05:07 +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