Skip to content

Commit

Permalink
refactor: replace Frappe Health references with Marley Health
Browse files Browse the repository at this point in the history
(cherry picked from commit 0fc0e5f)
  • Loading branch information
Sajinsr committed Jul 23, 2024
1 parent f47c35c commit 2bf02f1
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/initiate_release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 38 additions & 0 deletions .github/workflows/release_notes.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 3 additions & 3 deletions healthcare/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions healthcare/uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 2bf02f1

Please sign in to comment.