Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/frappe/frappe into print…
Browse files Browse the repository at this point in the history
…-format-builder-beta
  • Loading branch information
netchampfaris committed Oct 20, 2021
2 parents 18b3651 + 9f0fe09 commit 5345d4c
Show file tree
Hide file tree
Showing 287 changed files with 8,036 additions and 7,215 deletions.
3 changes: 2 additions & 1 deletion .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [ "$TYPE" == "server" ]; then
fi

if [ "$DB" == "mariadb" ];then
sudo apt install mariadb-client-10.3
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL character_set_server = 'utf8mb4'";
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'";

Expand Down Expand Up @@ -58,4 +59,4 @@ cd ../..
bench start &
bench --site test_site reinstall --yes
if [ "$TYPE" == "server" ]; then bench --site test_site_producer reinstall --yes; fi
bench build --app frappe
CI=Yes bench build --app frappe
13 changes: 13 additions & 0 deletions .github/helper/semgrep_rules/frappe_correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,16 @@ rules:
key `$X` is uselessly assigned twice. This could be a potential bug.
languages: [python]
severity: ERROR

- id: frappe-using-db-sql
pattern-either:
- pattern: frappe.db.sql(...)
- pattern: frappe.db.sql_ddl(...)
- pattern: frappe.db.sql_list(...)
paths:
exclude:
- "test_*.py"
message: |
The PR contains a SQL query that may be re-written with frappe.qb (https://frappeframework.com/docs/user/en/api/query-builder) or the Database API (https://frappeframework.com/docs/user/en/api/database)
languages: [python]
severity: ERROR
32 changes: 32 additions & 0 deletions .github/try-on-f-cloud-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/docs-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: 'Setup Environment'
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7

- name: 'Clone repo'
uses: actions/checkout@v2
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/patch-mariadb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

name: Patch Test

Expand All @@ -29,7 +29,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.9'

- name: Check if build should be run
id: check-build
Expand Down Expand Up @@ -102,4 +102,25 @@ jobs:
cd ~/frappe-bench/
wget https://frappeframework.com/files/v10-frappe.sql.gz
bench --site test_site --force restore ~/frappe-bench/v10-frappe.sql.gz
source env/bin/activate
cd apps/frappe/
git remote set-url upstream https://github.com/frappe/frappe.git
git fetch --all --tags
taglist=$(git tag --sort version:refname | grep -v "beta")
last_release=$(echo "$taglist" | tail -1 | cut -d . -f 1 | cut -c 2-)
for version in $(seq 12 "$last_release")
do
last_tag=$(echo "$taglist" | grep "v$version" | tail -1)
echo "Updating to $last_tag"
git checkout -q -f "$last_tag"
pip install -q -r requirements.txt
bench --site test_site migrate
done
echo "Updating to last commit"
git checkout -q -f "$GITHUB_SHA"
bench setup requirements --python
bench --site test_site migrate
2 changes: 1 addition & 1 deletion .github/workflows/publish-assets-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: 14
- uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.9'
- name: Set up bench and build assets
run: |
npm install -g yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-assets-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: '12.x'
- uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.9'
- name: Set up bench and build assets
run: |
npm install -g yarn
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/server-mariadb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.9'

- name: Check if build should be run
id: check-build
Expand Down Expand Up @@ -121,9 +121,11 @@ jobs:
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io

- name: Upload coverage data
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
uses: codecov/codecov-action@v2
with:
name: MariaDB
fail_ci_if_error: true
files: /home/runner/frappe-bench/sites/coverage.xml
verbose: true
flags: server
6 changes: 4 additions & 2 deletions .github/workflows/server-postgres-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.9'

- name: Check if build should be run
id: check-build
Expand Down Expand Up @@ -124,9 +124,11 @@ jobs:
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io

- name: Upload coverage data
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
uses: codecov/codecov-action@v2
with:
name: Postgres
fail_ci_if_error: true
files: /home/runner/frappe-bench/sites/coverage.xml
verbose: true
flags: server
22 changes: 0 additions & 22 deletions .github/workflows/translation_linter.yml

This file was deleted.

30 changes: 27 additions & 3 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.9'

- name: Check if build should be run
id: check-build
Expand Down Expand Up @@ -122,12 +122,36 @@ jobs:
DB: mariadb
TYPE: ui

- name: Instrument Source Code
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
run: cd ~/frappe-bench/apps/frappe/ && npx nyc instrument -x 'frappe/public/dist/**' -x 'frappe/public/js/lib/**' -x '**/*.bundle.js' --compact=false --in-place frappe

- name: Build
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
run: cd ~/frappe-bench/ && bench build --apps frappe

- name: Site Setup
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
run: cd ~/frappe-bench/ && bench --site test_site execute frappe.utils.install.complete_setup_wizard

- name: UI Tests
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
run: cd ~/frappe-bench/ && bench --site test_site run-ui-tests frappe --headless --parallel --ci-build-id $GITHUB_RUN_ID
run: cd ~/frappe-bench/ && bench --site test_site run-ui-tests frappe --with-coverage --headless --parallel --ci-build-id $GITHUB_RUN_ID
env:
CYPRESS_RECORD_KEY: 4a48f41c-11b3-425b-aa88-c58048fa69eb

- name: Check If Coverage Report Exists
id: check_coverage
uses: andstor/file-existence-action@v1
with:
files: "/home/runner/frappe-bench/apps/frappe/.cypress-coverage/clover.xml"

- name: Upload Coverage Data
if: ${{ steps.check-build.outputs.build == 'strawberry' && steps.check_coverage.outputs.files_exists == 'true' }}
uses: codecov/codecov-action@v2
with:
name: Cypress
fail_ci_if_error: true
directory: /home/runner/frappe-bench/apps/frappe/.cypress-coverage/
verbose: true
flags: ui-tests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
.cypress-coverage

# Translations
*.mo
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ core/ @surajshetty3416
database @gavindsouza
model @gavindsouza
requirements.txt @gavindsouza
query_builder/ @gavindsouza
commands/ @gavindsouza
workspace @shariquerik
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,44 @@
<img src='https://www.codetriage.com/frappe/frappe/badges/users.svg'>
</a>
<a href="https://codecov.io/gh/frappe/frappe">
<img src="https://codecov.io/gh/frappe/frappe/branch/develop/graph/badge.svg?token=XoTa679hIj"/>
<img src="https://codecov.io/gh/frappe/frappe/branch/develop/graph/badge.svg?token=XoTa679hIj&flag=server"/>
</a>
</div>



Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for [ERPNext](https://erpnext.com)

### Table of Contents
* [Installation](https://frappeframework.com/docs/user/en/installation)
* [Documentation](https://frappeframework.com/docs)
<div align="center">
<a href="https://frappecloud.com/deploy?apps=frappe&source=frappe_readme">
<img src=".github/try-on-f-cloud-button.svg" height="40">
</a>
</div>

## Table of Contents
* [Installation](#installation)
* [Contributing](#contributing)
* [Resources](#resources)
* [License](#license)

### Installation
## Installation

* [Install via Docker](https://github.com/frappe/frappe_docker)
* [Install via Frappe Bench](https://github.com/frappe/bench)
* [Offical Documentation](https://frappeframework.com/docs/user/en/installation)
* [Managed Hosting on Frappe Cloud](https://frappecloud.com/deploy?apps=frappe&source=frappe_readme)

## Contributing

1. [Code of Conduct](CODE_OF_CONDUCT.md)
1. [Contribution Guidelines](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
1. [Security Policy](SECURITY.md)
1. [Translations](https://translate.erpnext.com)

### Website
## Resources

For details and documentation, see the website
[https://frappeframework.com](https://frappeframework.com)
1. [frappeframework.com](https://frappeframework.com) - Official documentation of the Frappe Framework.
1. [frappe.school](https://frappe.school) - Pick from the various courses by the maintainers or from the community.

### License
## License
This repository has been released under the [MIT License](LICENSE).
22 changes: 20 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
codecov:
require_ci_to_pass: yes

coverage:
status:
patch: off
project:
default:
default: false
server:
target: auto
threshold: 0.5%
flags:
- server

comment:
layout: "diff, flags, files"
layout: "diff, flags"
require_changes: true

flags:
server:
paths:
- ".*\\.py"
carryforward: true
ui-tests:
paths:
- ".*\\.js"
carryforward: true
Loading

0 comments on commit 5345d4c

Please sign in to comment.