Skip to content

Dumach/vir_conto

Repository files navigation

VIR Conto

Business Intelligence for C-Conto

vir-ui-wireframe

VIR Conto

VIR Conto is an app which integrates data coming from C-Conto to Frappe Framework and utilise Frappe's Insights to create insightful charts.

Requirements

Recommendend Python version: 3.10+

  1. Install Frappe Framework - docs
  2. In order to visualize data, install Frappe Insights with bench get-app insights
  3. We recommend switching to stable versions in all Frappe products (Framework, Insights) as well with VIR Conto

Installation

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

Installing on a Frappe site

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.

  1. To install VIR Conto on a site:
bench --site your.site.com install-app vir_conto
  1. Find key.json inside your site folder your-bench-path/sites/your.site.com which stores the API key and API secret.
  2. 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.

Using VIR Conto

  1. 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 documents
  • insights_dashboard_v3.json - default dashboard documents
  • insights_query_v3.json - default query documents
  • insights_workbook.json - default workbook documents
  1. Use bench migrate to update the default charts. The process called Updating Default Charts will run after every migrate and update process, ensuring the default charts will be in sync every time.

Contributing

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

License

agpl-3.0