VIR Conto is an app which integrates data coming from C-Conto to Frappe Framework and utilise Frappe's Insights to create insightful charts.
Recommendend Python version: 3.10+
- Install Frappe Framework - docs
- In order to visualize data, install Frappe Insights with
bench get-app insights
- We recommend switching to stable versions in all Frappe products (Framework, Insights) as well with VIR Conto
You can install vir_conto app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app https://github.com/Dumach/vir_conto --branch main
To install a specific version:
cd $PATH_TO_YOUR_BENCH
bench get-app https://github.com/Dumach/vir_conto --branch version-0.1.0
Sometimes extra dependencies needed or JavaScirpt files missing, we recommend to run:
bench setup requirements
Before installing VIR Conto on a site, you will need to provide a .env
file in the site folder (your-bench-path/sites
).
We provide an example environment variable called example.env
, We recommend to change the VIR_CONTO system user email address to your domain.
- To install VIR Conto on a site:
bench --site your.site.com install-app vir_conto
- Find
key.json
inside your site folderyour-bench-path/sites/your.site.com
which stores the API key and API secret. - Update SYS.ini in C-Conto with the API key, secret and your domain(
http://your.site.com
)
When successfully installed, VIR Conto will create a system user which will be used to send data from C-Conto to your site.
- Export default charts with:
bench --site your.site.com export-default-charts
VIR Conto will place the JSON output in the vir_conto/vir_conto/charts
folder. We use the same exporting mechanism that Frappe uses with fixtures.
Content of /charts
:
insights_chart_v3.json
- default chart documentsinsights_dashboard_v3.json
- default dashboard documentsinsights_query_v3.json
- default query documentsinsights_workbook.json
- default workbook documents
- Use
bench migrate
to update the default charts. The process calledUpdating Default Charts
will run after every migrate and update process, ensuring the default charts will be in sync every time.
This app uses pre-commit
for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/vir_conto
pre-commit install
Pre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
agpl-3.0