appsembler / figures

Reporting and data retrieval app for Open edX
MIT License
44 stars 37 forks source link

======= Figures

|travis-badge| |codecov-badge|

Reporting and data retrieval app for Open edX <https://open.edx.org/>__.

.. _notice_section:

Figures is on PyPI <https://pypi.org/project/Figures/>__

Oct 13, 2022 - Figures release 0.4.4

This release includes a performance fix for the site-monthly-metric API.

Aug 15, 2022 - Figures release 0.4.3

This release includes bug fixes. Of note:

Also includes a foundational update for MAU 2:

Mar 3, 2022 - Figures release 0.4.2

This release adds an optionan new pipeline workflow

For details, please read here <https://github.com/appsembler/figures/issues/428>__

To enable this feature, you need to update the LMS settings (aka 'server-vars.yml') as follows:

server-vars.yml::

FIGURES: DAILY_TASK: 'figures.tasks.populate_daily_metrics_next'

In Django settigs, you would check the var here::

from django.conf import settings settings.ENV_TOKENS['FIGURES'].get('DAILY_TASK')

PR about the workflow update:

Other PRs

Feb 4, 2022 - Main Branch

main is the new default branch

Jan 28, 2022 - Figures release 0.4.1

Figures 0.4.1 is finally here. After several development releases, we realized it was time to just move to production releases.

Figures 0.4.x release series supports Open edX Juniper, Hawthorn, and Ginkgo

Please visit Figures releases page <https://github.com/appsembler/figures/releases>__ for details on specific releases.

30 Oct 2020 - Figures release 0.3.19

26 Oct 2020 - Figures release 0.3.18

16 Oct 2020 - Figures release 0.3.17

28 Sep 2020 - Figures release 0.3.16

11 Sep 2020 - Figures release 0.3.15

24 Aug 2020 - Figures release 0.3.14

14 Aug 2020 - Figures release 0.3.13

15 Jul 2020 - Figures release 0.3.12

29 Jun 2020 - Figures release 0.3.11

21 May 2020 - Figures release 0.3.10

24 Apr 2020 - Figures release 0.3.9

10 Apr 2020 - Figures release 0.3.8

8 Apr 2020 - Figures release 0.3.7

16 Feb 2020 - Figures release 0.3.6

20 Feb 2020 - Figures release 0.3.5

Client (UI and API) facing updates

Developer facing updates

29 Jan 2020 - Figures release 0.3.4


Overview

Figures is a reporting and data retrieval app. It plugs into the edx-platform LMS app server. Its goal is to provide site-wide and cross-course analytics that compliment Open edX's traditional course-centric analytics.

To evolve Figures to meet community needs, we are keeping in mind as principles the following features, which Jill Vogel outlined in her lightweight analytics <https://edxchange.opencraft.com/t/analytics-lighter-faster-cheaper/202>__ post on ed Xchange:

Please refer to the Figures design document <https://docs.google.com/document/d/16orj6Ag1R158-J-zSBfiY31RKQ5FuSu1O5F-zpSKOg4/>__ for more details on goals and architecture.


Requirements

For all Open edX releases:

For Hawthorn:

For Ginkgo:

.. _installation:


Installation

NOTICE: Installation instructions are out of date and backlogged for update

Devstack

Go here <docs/source/devstack.rst>__ for instructions to install and run Figures in devstack.

Production

Go here <docs/source/install.rst>__ for instructions to install Figures in production.


Project Architecture

Front-end

The Figures user interface is a JavaScript Single Page Application (SPA) built with React and uses the create-react-app <https://github.com/facebook/create-react-app>_ build scaffolding generator.

Back-end

The Figures back-end is a reusable Django app. It contains a set of REST API endpoints that serve a dual purpose of providing data to the front-end and to remote clients.


Testing

TODO: Improve the testing instructions

The unit tests should be able to run on any OS that supports Python 2.7.x

Clone the repo:

::

git@github.com:appsembler/figures.git

Go to the project directory:

::

cd figures

Create a virtualenv <https://virtualenv.pypa.io/en/stable/>__ for Python 2.7.x.

Install required Python packages:

::

pip install -r devsite/requirements.txt

From the figures repository root directory:

::

py.test

If all goes well, the Figures unit tests will all complete succesfully


Configuration

Figures can be configured via Django settings' FIGURES key. Open edX reads configuration from the /edx/etc/lms.yml file both in devstack and production servers. In releases before Juniper it was the lms.env.json file.

A Figures configuration may look like the following:

::

FEATURES:  # The standard Open edX feature flags
    # ... other features goes here ...
    FIGURES_IS_MULTISITE: True
    # ... more features goes there ...

FIGURES:  # Other Figures configurations
    SITES_BACKEND: 'openedx.core.djangoapps.appsembler.sites.utils:get_active_sites'
    REQUESTED_SITE_BACKEND: 'tahoe_figures_plugins.sites:get_current_site_or_by_uuid'
    FIGURES_PIPELINE_TASKS_ROUTING_KEY: 'edx.lms.core.high'
    DAILY_METRICS_IMPORT_HOUR: 13
    DAILY_METRICS_IMPORT_MINUTE: 0

Settings like SITES_BACKEND require a path to a Python function or class. The path is consists of two parts: a Python module e.g. my_plugin_package.helpers and an object e.g my_helper separated by a colon e.g. my_plugin_package.helpers:my_helper.

This object would be imported by the import_from_path helper in the figures/helpers.py <https://github.com/appsembler/figures/blob/932eeab84c469a34dfcb94232bbe6f7c08146b3f/figures/helpers.py#L84-L98>__ module.

..................... Configuration options .....................

TBD: Document FIGURES_PIPELINE_TASKS_ROUTING_KEY, DAILY_METRICS_IMPORT_HOUR and DAILY_METRICS_IMPORT_MINUTE.


Future


How to Contribute

TODO: Add details here or separate CONTRIBUTING file to the root of the repo

.. _reporting_issues:


Reporting Issues

If you find bugs or run into issues, please submit an issue ticket to the Figures issue tracker <https://github.com/appsembler/figures/issues>__ on Github.

.. _reporting_security_issues:

Reporting Security Issues

Please do not report security issues in public. Please email security@appsembler.com.

.. |travis-badge| image:: https://travis-ci.org/appsembler/figures.svg?branch=master :target: https://travis-ci.org/appsembler/figures/ :alt: Travis

.. |codecov-badge| image:: http://codecov.io/github/appsembler/figures/coverage.svg?branch=master :target: http://codecov.io/github/appsembler/figures?branch=master :alt: Codecov