Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug Report
about: Report a bug to help us improve ERP Core
title: "[Bug]: "
labels: bug
assignees: ''
---

## Description

A clear and concise description of the bug.

## Steps to Reproduce

1. Go to '...'
2. Click on '...'
3. Run '...'
4. See error

## Expected Behavior

What you expected to happen.

## Actual Behavior

What actually happened.

## Error Logs / Traceback

If applicable, paste the traceback or error logs (from `bench --site <site> console` or the error log) to help explain the problem.

## Environment

- **ERP Core Version**: [e.g. 0.0.1]
- **Frappe Version**: [e.g. 16.x.x]
- **ERPNext Version**: [e.g. 16.x.x]
- **Python Version**: [e.g. 3.14]
- **OS**: [e.g. Ubuntu 22.04]

## Additional Context

Add any other context about the problem here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature Request
about: Suggest a new feature or enhancement for ERP Core
title: "[Feature]: "
labels: enhancement
assignees: ''
---

## Problem Statement

A clear description of the problem or limitation you're experiencing.
Example: "I'm always frustrated when [...]"

## Proposed Solution

A clear description of what you'd like to happen.

## Alternatives Considered

Any alternative solutions or features you've considered.

## Use Case

Describe the business scenario or compliance requirement where this feature would be useful.

## Additional Context

Add any references (e.g. ZATCA specifications, regulations) that help illustrate the request.
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Description


## Type of Change


- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)

## Related Issue

Fixes #

## How Has This Been Tested?


- [ ] Lint passes (`ruff check erpcore/`)
- [ ] Unit tests pass (`bench --site <site> run-tests --app erpcore`)
- [ ] Manual testing on a site

## Checklist

- [ ] My code follows the project's coding style
- [ ] I have run `pre-commit` hooks locally
- [ ] My commits follow the [Conventional Commits](https://www.conventionalcommits.org/) format
- [ ] I have added/updated tests for my changes (if applicable)
- [ ] I have updated documentation (if applicable)
- [ ] My changes do not introduce new warnings or errors
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
# GitHub Actions used by the workflows
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: ci
labels:
- dependencies
- github-actions

# Python backend (Frappe app)
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: chore
labels:
- dependencies
- python
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Find tests
run: |
echo "Finding tests"
grep -rn "def test" > /dev/null

- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: '3.14'

Expand All @@ -55,7 +55,7 @@ jobs:
check-latest: true

- name: Cache pip
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py', '**/setup.cfg') }}
Expand All @@ -67,7 +67,7 @@ jobs:
id: yarn-cache-dir-path
run: 'echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT'

- uses: actions/cache@v4
- uses: actions/cache@v6
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -88,9 +88,11 @@ jobs:
- name: Install
working-directory: /home/runner/frappe-bench
run: |
bench get-app --branch version-16 erpnext
bench get-app erpcore $GITHUB_WORKSPACE
bench setup requirements --dev
bench new-site --db-root-password root --admin-password admin test_site
bench --site test_site install-app erpnext
bench --site test_site install-app erpcore
bench build
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.14'
cache: pip
- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1

- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
Expand All @@ -38,14 +38,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7
with:
python-version: '3.14'

- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Cache pip
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py') }}
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Generate Semantic Release

on:
push:
branches:
- develop

permissions:
contents: write
issues: write
pull-requests: write

concurrency:
group: release-erpcore
cancel-in-progress: false

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RELEASE_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN != '' && secrets.RELEASE_TOKEN || github.token }}
steps:
- name: Checkout Entire Repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: true
token: ${{ env.RELEASE_AUTH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 20

- name: Setup dependencies
run: |
npm install semantic-release @semantic-release/git @semantic-release/exec @semantic-release/github @semantic-release/commit-analyzer @semantic-release/release-notes-generator --no-save

- name: Show token source
run: |
set -e
if [ -n "${{ secrets.RELEASE_TOKEN }}" ]; then
echo "Using RELEASE_TOKEN secret for semantic-release"
else
echo "RELEASE_TOKEN is not set; falling back to github.token"
fi

- name: Create Release
env:
GH_TOKEN: ${{ env.RELEASE_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ env.RELEASE_AUTH_TOKEN }}
GIT_AUTHOR_NAME: "ERP Core Bot"
GIT_AUTHOR_EMAIL: "hello@kodlyft.com"
GIT_COMMITTER_NAME: "ERP Core Bot"
GIT_COMMITTER_EMAIL: "hello@kodlyft.com"
run: npx semantic-release
30 changes: 30 additions & 0 deletions .github/workflows/semantic-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Semantic Commits

on:
pull_request: {}

permissions:
contents: read

concurrency:
group: commitcheck-erpcore-${{ github.event.number }}
cancel-in-progress: true

jobs:
commitlint:
name: Check Commit Titles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 200

- uses: actions/setup-node@v6
with:
node-version: 20
check-latest: true

- name: Check commit titles
run: |
npm install @commitlint/cli @commitlint/config-conventional
npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
32 changes: 31 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,37 @@ repos:
erpcore/public/js/lib/.*
)$

- repo: local
hooks:
- id: frappe-semgrep-rules
name: "Run Frappe semgrep rules"
entry: semgrep
language: python
additional_dependencies: ['semgrep==1.168.0']
args:
- '--config=.semgrep'
- '--error'
- '--quiet'
- '--metrics=off'
- '--disable-version-check'
types_or: [python, javascript]
pass_filenames: true
exclude: |
(?x)^(
erpcore/public/dist/.*|
.*node_modules.*|
.*boilerplate.*|
erpcore/public/js/lib/.*
)$

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']

ci:
autoupdate_schedule: weekly
skip: []
skip: [frappe-semgrep-rules, commitlint]
submodules: false
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
build
dist
*.min.js
*.min.css
erpcore/public/dist
erpcore/templates/includes
erpcore/public/js/lib
*.svg
*.md
21 changes: 21 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"printWidth": 110,
"tabWidth": 4,
"useTabs": true,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"vueIndentScriptAndStyle": false,
"overrides": [
{
"files": "*.json",
"options": {
"useTabs": false,
"tabWidth": 2
}
}
]
}
24 changes: 24 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"branches": ["develop"],
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"releaseRules": [
{"breaking": true, "release": "major"}
]
}],
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec", {
"prepareCmd": "sed -ir \"s/[0-9]*\\.[0-9]*\\.[0-9]*/${nextRelease.version}/\" erpcore/__init__.py"
}
],
[
"@semantic-release/git", {
"assets": ["erpcore/__init__.py"],
"message": "chore(release): Bumped to Version ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
Loading
Loading