Skip to content

Commit

Permalink
Merge pull request #25097 from frappe/version-15-hotfix
Browse files Browse the repository at this point in the history
chore: release v15
  • Loading branch information
ankush committed Feb 28, 2024
2 parents aab8947 + 0cf2de6 commit aeff7b0
Show file tree
Hide file tree
Showing 232 changed files with 1,935 additions and 1,004 deletions.
75 changes: 0 additions & 75 deletions .flake8

This file was deleted.

15 changes: 3 additions & 12 deletions .github/helper/documentation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import requests
from urllib.parse import urlparse

import requests

WEBSITE_REPOS = [
"erpnext_com",
Expand Down Expand Up @@ -36,11 +36,7 @@ def is_documentation_link(word: str) -> bool:


def contains_documentation_link(body: str) -> bool:
return any(
is_documentation_link(word)
for line in body.splitlines()
for word in line.split()
)
return any(is_documentation_link(word) for line in body.splitlines() for word in line.split())


def check_pull_request(number: str) -> "tuple[int, str]":
Expand All @@ -53,12 +49,7 @@ def check_pull_request(number: str) -> "tuple[int, str]":
head_sha = (payload.get("head") or {}).get("sha")
body = (payload.get("body") or "").lower()

if (
not title.startswith("feat")
or not head_sha
or "no-docs" in body
or "backport" in body
):
if not title.startswith("feat") or not head_sha or "no-docs" in body or "backport" in body:
return 0, "Skipping documentation checks... 🏃"

if contains_documentation_link(body):
Expand Down
8 changes: 3 additions & 5 deletions .github/helper/roulette.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import sys
import time
import urllib.request
from functools import lru_cache
from functools import cache
from urllib.error import HTTPError


@lru_cache(maxsize=None)
@cache
def fetch_pr_data(pr_number, repo, endpoint=""):
api_url = f"https://api.github.com/repos/{repo}/pulls/{pr_number}"

Expand Down Expand Up @@ -82,9 +82,7 @@ def is_ci(file):


def is_frontend_code(file):
return file.lower().endswith(
(".css", ".scss", ".less", ".sass", ".styl", ".js", ".ts", ".vue", ".html")
)
return file.lower().endswith((".css", ".scss", ".less", ".sass", ".styl", ".js", ".ts", ".vue", ".html"))


def is_docs(file):
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/patch-mariadb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
- name: Run Patch Tests
run: |
cd ~/frappe-bench/
sed -i 's/^worker:/# worker:/g' Procfile
wget https://frappeframework.com/files/v13-frappe.sql.gz
bench --site test_site --force restore ~/frappe-bench/v13-frappe.sql.gz
Expand All @@ -126,6 +127,7 @@ jobs:
git checkout -q -f $branch_name
pgrep honcho | xargs kill
sleep 3
rm -rf ~/frappe-bench/env
bench -v setup env
bench start &>> ~/frappe-bench/bench_start.log &
Expand All @@ -137,6 +139,7 @@ jobs:
echo "Updating to last commit"
pgrep honcho | xargs kill
sleep 3
rm -rf ~/frappe-bench/env
git checkout -q -f "$GITHUB_SHA"
bench -v setup env
Expand Down
16 changes: 2 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@ repos:
- id: check-yaml
- id: debug-statements

- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
hooks:
- id: pyupgrade
args: ['--py310-plus']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: ruff
name: "Sort Python imports"
args: ["--select", "I", "--fix"]
name: "Run ruff linter and apply fixes"
args: ["--fix"]

- id: ruff-format
name: "Format Python code"
Expand Down Expand Up @@ -72,12 +66,6 @@ repos:
frappe/public/js/lib/.*
)$
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ['flake8-bugbear',]

ci:
autoupdate_schedule: weekly
skip: []
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ context("Form", () => {
);
});

cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="is_primary_phone"]')
.should("be.hidden");
cy.get("@table-form").find(".grid-footer-toolbar").click();

// set property on form_render event of child table
cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get("@table")
.find('[data-idx="1"]')
.invoke("attr", "data-name")
Expand Down
16 changes: 8 additions & 8 deletions cypress/integration/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ context("Grid", () => {
let field = frm.get_field("phone_nos");
field.grid.update_docfield_property("is_primary_phone", "hidden", true);

cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="is_primary_phone"]')
.should("be.hidden");
cy.get("@table-form").find(".grid-footer-toolbar").click();

cy.get("@table").find('[data-idx="2"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="2"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="is_primary_phone"]')
Expand All @@ -48,14 +48,14 @@ context("Grid", () => {
let field = frm.get_field("phone_nos");
field.grid.toggle_display("is_primary_mobile_no", false);

cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="is_primary_mobile_no"]')
.should("be.hidden");
cy.get("@table-form").find(".grid-footer-toolbar").click();

cy.get("@table").find('[data-idx="2"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="2"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="is_primary_mobile_no"]')
Expand All @@ -72,14 +72,14 @@ context("Grid", () => {
let field = frm.get_field("phone_nos");
field.grid.toggle_enable("phone", false);

cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="phone"] .control-value')
.should("have.class", "like-disabled-input");
cy.get("@table-form").find(".grid-footer-toolbar").click();

cy.get("@table").find('[data-idx="2"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="2"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get("@table-form")
.find('.frappe-control[data-fieldname="phone"] .control-value')
Expand All @@ -96,14 +96,14 @@ context("Grid", () => {
let field = frm.get_field("phone_nos");
field.grid.toggle_reqd("phone", false);

cy.get("@table").find('[data-idx="1"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="1"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get_field("phone").as("phone-field");
cy.get("@phone-field").focus().clear().wait(500).blur();
cy.get("@phone-field").should("not.have.class", "has-error");
cy.get("@table-form").find(".grid-footer-toolbar").click();

cy.get("@table").find('[data-idx="2"] .edit-grid-row').click();
cy.get("@table").find('[data-idx="2"] .btn-open-row').click();
cy.get(".grid-row-open").as("table-form");
cy.get_field("phone").as("phone-field");
cy.get("@phone-field").focus().clear().wait(500).blur();
Expand Down

0 comments on commit aeff7b0

Please sign in to comment.