dvdl16 / csf_za

South Africa Customizations - Country Specific Functionality for South Africa
MIT License
1 stars 1 forks source link
erpnext frappe south-africa

South Africa Customisations

CI workflow codecov

Country Specific Functionality for South Africa

This is a Frappe app, intended to be used with ERPNext (version 15).

License

MIT

Features

  1. Value-added Tax Return: This makes submitting your VAT201 returns to SARS much easier

User documentation

User documentation is hosted at csf-za-docs.finfoot.tech

Development

Tests

To run unit tests:

bench --site test_site run-tests --app csf_za --coverage

To run UI/integration tests:

The following depencies are required

sudo apt update
# Dependencies for cypress: https://docs.cypress.io/guides/continuous-integration/introduction#UbuntuDebian
sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

sudo apt-get install chromium
bench --site test_site run-ui-tests csf_za --headless --browser chromium

Contributing

We use pre-commit for linting. First time setup may be required:

# Install pre-commit
pip install pre-commit

# Install the git hook scripts
pre-commit install

#(optional) Run against all the files
pre-commit run --all-files

We use Semgrep rules specific to Frappe Framework

# Install semgrep
python3 -m pip install semgrep

# Clone the rules repository
git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules

# Run semgrep specifying rules folder as config 
semgrep --config=/workspace/development/frappe-semgrep-rules/rules apps/csf_za

The documentation has been generated using mdBook

Make sure you have mdbook installed/downloaded. To modify and test locally:

cd docs
mdbook serve --open