diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c229add51d..e74b7d06f2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,15 +1,15 @@ --- name: Bug Report -description: Report a bug encountered while using Frappe Health +description: Report a bug encountered while using Marley Health labels: ["bug"] body: - type: markdown attributes: value: | - Welcome to Frappe Health issue tracker! Before creating an issue, please consider the following: + Welcome to Marley Health issue tracker! Before creating an issue, please consider the following: - 1. This tracker should only be used to report bugs and request features / enhancements to Frappe Health + 1. This tracker should only be used to report bugs and request features / enhancements to Marley Health - For questions and general support, checkout the [documentation](https://frappehealth.com/docs) or use the [forum](https://discuss.frappe.io/c/healthcare/58) to get inputs from the open source community. - For documentation issues, propose edit on the [documentation site](https://frappehealth.com/docs) directly. 2. When making a bug report, make sure you provide all required information. The easier it is for @@ -29,7 +29,7 @@ body: id: module attributes: label: Module - description: Select the affected module of Frappe Health. + description: Select the affected module of Marley Health. multiple: true options: - Outpatient Module @@ -48,11 +48,11 @@ body: id: exact-version attributes: label: Version - description: Share exact version number of Frappe, ERPNext and Frappe Health you are using. + description: Share exact version number of Frappe, ERPNext and Marley Health you are using. placeholder: | Frappe version - ERPNext version - - Frappe Health version - + Marley Health version - validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 51613bba40..c7a34bb31c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -1,15 +1,15 @@ --- name: Feature Request -description: Suggest an idea to improve Frappe Health +description: Suggest an idea to improve Marley Health labels: ["feature-request"] body: - type: markdown attributes: value: | - Welcome to Frappe Health issue tracker! Before submitting a request, please consider the following: + Welcome to Marley Health issue tracker! Before submitting a request, please consider the following: - 1. This tracker should only be used to report bugs and request features / enhancements to Frappe Health + 1. This tracker should only be used to report bugs and request features / enhancements to Marley Health - For questions and general support, checkout the [documentation](https://frappehealth.com/docs) or use the [forum](https://discuss.frappe.io/c/healthcare/58) to get inputs from the open source community. 2. Use the search function before creating a new issue. Duplicates will be closed and directed to the original discussion. @@ -22,7 +22,7 @@ body: 1. Certified Frappe partners: https://frappe.io/partners 2. Healthcare Category on Frappe forum: https://discuss.frappe.io/c/healthcare/58 2. Developer community on Frappe forum: https://discuss.frappe.io/c/developers/5 - 3. Telegram group for Frappe Health development work: https://t.me/frappehealth + 3. Telegram group for Marley Health development work: https://t.me/frappehealth - type: textarea id: problem-info diff --git a/.github/workflows/initiate_release.yml b/.github/workflows/initiate_release.yml new file mode 100644 index 0000000000..da630f84fc --- /dev/null +++ b/.github/workflows/initiate_release.yml @@ -0,0 +1,32 @@ +# This workflow is agnostic to branches. Only maintain on develop branch. +# To add/remove versions just modify the matrix. + +name: Create weekly release pull requests +on: + schedule: + # 9:30 UTC => 3 PM IST Tuesday + - cron: "30 9 * * 2" + workflow_dispatch: + +jobs: + stable-release: + name: Release + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ["14", "15"] + + steps: + - uses: octokit/request-action@v2.x + with: + route: POST /repos/{owner}/{repo}/pulls + owner: earthians + repo: marley + title: |- + "chore: release v${{ matrix.version }}" + body: "Automated release." + base: version-${{ matrix.version }} + head: version-${{ matrix.version }}-hotfix + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index e08917aa43..e6873584a4 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -22,7 +22,7 @@ jobs: run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules - name: Download semgrep - run: pip install semgrep==0.97.0 + run: pip install semgrep - name: Run Semgrep rules run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness \ No newline at end of file diff --git a/.github/workflows/release_notes.yml b/.github/workflows/release_notes.yml new file mode 100644 index 0000000000..97a8d7c548 --- /dev/null +++ b/.github/workflows/release_notes.yml @@ -0,0 +1,38 @@ +# This action: +# +# 1. Generates release notes using github API. +# 2. Strips unnecessary info like chore/style etc from notes. +# 3. Updates release info. + +# This action needs to be maintained on all branches that do releases. + +name: 'Release Notes' + +on: + workflow_dispatch: + inputs: + tag_name: + description: 'Tag of release like v14.0.0' + required: true + type: string + release: + types: [released] + +permissions: + contents: read + +jobs: + regen-notes: + name: 'Regenerate release notes' + runs-on: ubuntu-latest + + steps: + - name: Update notes + run: | + NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' ) + RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/tags/$RELEASE_TAG | jq -r '.id') + gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/earthians/marley/releases/$RELEASE_ID -f body="$NEW_NOTES" + + env: + GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} + RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }} \ No newline at end of file diff --git a/healthcare/hooks.py b/healthcare/hooks.py index 046ae411b7..354490a724 100644 --- a/healthcare/hooks.py +++ b/healthcare/hooks.py @@ -3,9 +3,9 @@ from . import __version__ as app_version # noqa app_name = "healthcare" -app_title = "Healthcare" -app_publisher = "healthcare" -app_description = "healthcare" +app_title = "Marley Health" +app_publisher = "earthians Health Informatics Pvt. Ltd." +app_description = "Modern, Open Source HIS built on Frappe and ERPNext" app_icon = "octicon octicon-file-directory" app_color = "grey" app_email = "contact@frappe.io" diff --git a/healthcare/patches/v15_0/check_version_compatibility_with_frappe.py b/healthcare/patches/v15_0/check_version_compatibility_with_frappe.py new file mode 100644 index 0000000000..7553329e0c --- /dev/null +++ b/healthcare/patches/v15_0/check_version_compatibility_with_frappe.py @@ -0,0 +1,19 @@ +import click +import frappe + + +def execute(): + frappe_v = frappe.get_attr("frappe" + ".__version__") + healthcare_v = frappe.get_attr("healthcare" + ".__version__") + + WIKI_URL = "https://github.com/frappe/health/wiki/changes-to-branching-and-versioning" + + if frappe_v.startswith("14") and healthcare_v.startswith("15"): + message = f""" + The `develop` branch of Marley Health is no longer compatible with Frappe & ERPNext's `version-14`. + Since you are using ERPNext/Frappe `version-14` please switch Marley Health app's branch to `version-14` and then proceed with the update.\n\t + You can switch the branch by following the steps mentioned here: {WIKI_URL} + """ + click.secho(message, fg="red") + + frappe.throw(message) # nosemgrep diff --git a/healthcare/uninstall.py b/healthcare/uninstall.py index d9058e6f96..47bf5d2641 100644 --- a/healthcare/uninstall.py +++ b/healthcare/uninstall.py @@ -6,20 +6,20 @@ def before_uninstall(): try: - print("Removing customizations created by Frappe Health...") + print("Removing customizations created by Marley Health...") remove_customizations() except Exception as e: BUG_REPORT_URL = "https://github.com/frappe/health/issues/new" click.secho( - "Removing Customizations for Frappe Health failed due to an error." + "Removing Customizations for Marley Health failed due to an error." " Please try again or" f" report the issue on {BUG_REPORT_URL} if not resolved.", fg="bright_red", ) raise e - click.secho("Frappe Health app customizations have been removed successfully...", fg="green") + click.secho("Marley Health app customizations have been removed successfully...", fg="green") def after_uninstall():