Skip to content

Commit 67aa20e

Browse files
committed
Merge branch 'staging' into v5.x
2 parents aae3ffc + fe045d1 commit 67aa20e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1653
-1091
lines changed

.flake8

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[flake8]
2+
ignore =
3+
E121,
4+
E126,
5+
E127,
6+
E128,
7+
E203,
8+
E225,
9+
E226,
10+
E231,
11+
E241,
12+
E251,
13+
E261,
14+
E265,
15+
E302,
16+
E303,
17+
E305,
18+
E402,
19+
E501,
20+
E741,
21+
W291,
22+
W292,
23+
W293,
24+
W391,
25+
W503,
26+
W504,
27+
F403,
28+
B007,
29+
B950,
30+
W191,
31+
E124, # closing bracket, irritating while writing QB code
32+
E131, # continuation line unaligned for hanging indent
33+
E123, # closing bracket does not match indentation of opening bracket's line
34+
E101, # ensured by use of black
35+
B009, # allow usage of getattr
36+
37+
max-line-length = 200

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@ on:
66
jobs:
77
release:
88
name: Release
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout Entire Repository
12-
uses: actions/checkout@v2
11+
- uses: actions/checkout@v2
1312
with:
1413
fetch-depth: 0
15-
- name: Setup Node.js v14
16-
uses: actions/setup-node@v2
14+
- uses: actions/setup-node@v2
1715
with:
1816
node-version: 14
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x'
20+
1921
- name: Setup dependencies
2022
run: |
2123
npm install @semantic-release/git @semantic-release/exec --no-save
22-
pip install wheel twine
24+
python3 -m pip install wheel twine
25+
python3 -m pip install git+https://github.com/pypa/hatch
26+
2327
- name: Create Release
2428
env:
2529
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
exclude: '.git'
2+
default_stages: [commit]
3+
fail_fast: false
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.3.0
8+
hooks:
9+
- id: trailing-whitespace
10+
files: "frappe.*"
11+
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg"
12+
- id: check-yaml
13+
- id: check-merge-conflict
14+
- id: check-ast
15+
- id: check-json
16+
- id: check-toml
17+
- id: check-yaml
18+
- id: debug-statements
19+
20+
- repo: https://github.com/asottile/pyupgrade
21+
rev: v2.34.0
22+
hooks:
23+
- id: pyupgrade
24+
args: ['--py37-plus']
25+
26+
- repo: https://github.com/adityahase/black
27+
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
28+
hooks:
29+
- id: black
30+
additional_dependencies: ['click==8.0.4']
31+
32+
- repo: https://gitlab.com/pycqa/flake8
33+
rev: 3.9.2
34+
hooks:
35+
- id: flake8
36+
additional_dependencies: ['flake8-bugbear',]
37+
args: ['--config', '.flake8']

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
[
1212
"@semantic-release/exec", {
13-
"prepareCmd": "python setup.py bdist_wheel --universal"
13+
"prepareCmd": "hatch build -t sdist -t wheel"
1414
}
1515
],
1616
[

.travis.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ sudo: true
55
git:
66
depth: 1
77

8-
cache:
9-
- pip
10-
- npm
11-
- yarn
12-
138
addons:
149
mariadb: '10.3'
1510

@@ -30,18 +25,18 @@ matrix:
3025
env: TEST=bench
3126
script: python bench/tests/test_init.py TestBenchInit.basic
3227

33-
- name: "Python 3.7 Production Setup"
34-
python: 3.7
28+
- name: "Python 3.10 Basic Setup"
29+
python: "3.10"
3530
env: TEST=bench
36-
script: python bench/tests/test_setup_production.py TestSetupProduction.production
31+
script: python bench/tests/test_init.py TestBenchInit.basic
3732

38-
- name: "Python 3.8 Production Setup"
39-
python: 3.8
33+
- name: "Python 3.7 Production Setup"
34+
python: 3.7
4035
env: TEST=bench
4136
script: python bench/tests/test_setup_production.py TestSetupProduction.production
4237

43-
- name: "Python 3.9 Production Setup"
44-
python: 3.9
38+
- name: "Python 3.10 Production Setup"
39+
python: "3.10"
4540
env: TEST=bench
4641
script: python bench/tests/test_setup_production.py TestSetupProduction.production
4742

@@ -50,31 +45,24 @@ matrix:
5045
env: TEST=bench
5146
script: python -m unittest -v bench.tests.test_utils && python -m unittest -v bench.tests.test_init
5247

53-
- name: "Python 3.8 Tests"
54-
python: 3.8
55-
env: TEST=bench
56-
script: python -m unittest -v bench.tests.test_utils && python -m unittest -v bench.tests.test_init
57-
58-
- name: "Python 3.9 Tests"
59-
python: 3.9
48+
- name: "Python 3.10 Tests"
49+
python: "3.10"
6050
env: TEST=bench
6151
script: python -m unittest -v bench.tests.test_utils && python -m unittest -v bench.tests.test_init
6252

6353
install:
64-
- pip3 install urllib3 pyOpenSSL ndg-httpsclient pyasn1
54+
- python -m pip install -U --no-cache-dir --force-reinstall urllib3 pyOpenSSL ndg-httpsclient pyasn1 wheel setuptools pip
6555

6656
- if [ $TEST == "bench" ];then
67-
wget -q -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz;
68-
tar -xf /tmp/wkhtmltox.tar.xz -C /tmp;
69-
sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf;
70-
sudo chmod o+x /usr/local/bin/wkhtmltopdf;
57+
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
58+
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb;
7159

7260
nvm install 14;
7361
nvm use 14;
7462

7563
mkdir -p ~/.bench;
7664
cp -r $TRAVIS_BUILD_DIR/* ~/.bench;
77-
pip3 install -q -U -e ~/.bench;
65+
python -m pip install -U -e ~/.bench;
7866

7967
mysql -u root -e "SET GLOBAL character_set_server = 'utf8mb4'";
8068
mysql -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'";

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div align="center">
2-
<img src="https://github.com/frappe/design/raw/master/logos/png/bench-logo.png" height="128">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/frappe/design/raw/master/logos/png/bench-logo-dark.png">
4+
<img src="https://github.com/frappe/design/raw/master/logos/png/bench-logo.png" height="128">
5+
</picture>
36
<h2>Bench</h2>
47
</div>
58

0 commit comments

Comments
 (0)