Skip to content

Commit

Permalink
Merge branch 'release/v1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
RamezIssac committed Sep 25, 2023
2 parents da57d62 + 26814c9 commit f17bf6a
Show file tree
Hide file tree
Showing 37 changed files with 600 additions and 555 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Django CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Run Tests
run: |
python runtests.py
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
tools:
python: "3.8"
python: "3.11"

# Build from the docs/ directory with Sphinx
sphinx:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [1.1.1] - 2023-09-25
- Change settings to be a dict , adding support JQUERY_URL and FONT AWESOME customization #79 & #81
- Fix issue with chartjs not being loaded #80
- Remove `SLICK_REPORTING_FORM_MEDIA`

## [1.1.0] -
- Breaking: changed ``report_title_context_key`` default value to `report_title`
- Breaking: Renamed simple_report.html to report.html
Expand Down
50 changes: 24 additions & 26 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ Let's start by a "Group by" report. This will generate a report how much quantit
group_by = "product"
columns = [
"name",
ComputationField.create(Sum, "quantity", verbose_name="Total quantity sold", is_summable=False),
ComputationField.create(Sum, "value", name="sum__value", verbose_name="Total Value sold $"),
ComputationField.create(
Sum, "quantity", verbose_name="Total quantity sold", is_summable=False
),
ComputationField.create(
Sum, "value", name="sum__value", verbose_name="Total Value sold $"
),
]
chart_settings = [
Expand All @@ -83,6 +87,7 @@ Let's start by a "Group by" report. This will generate a report how much quantit
),
]
# then, in urls.py
path("total-sales-report", TotalProductSales.as_view())
Expand Down Expand Up @@ -122,7 +127,7 @@ Example: How much was sold in value for each product monthly within a date perio
time_series_columns = [
ComputationField.create(
Sum, "value", verbose_name=_("Sales Value"), name="value"
) # what will be calculated for each month
) # what will be calculated for each month
]
chart_settings = [
Expand All @@ -133,12 +138,13 @@ Example: How much was sold in value for each product monthly within a date perio
title_source=["name"],
plot_total=True,
),
Chart("Total Sales [Area chart]",
Chart.AREA,
data_source=["value"],
title_source=["name"],
plot_total=False,
)
Chart(
"Total Sales [Area chart]",
Chart.AREA,
data_source=["value"],
title_source=["name"],
plot_total=False,
),
]
Expand Down Expand Up @@ -233,28 +239,20 @@ You can also use locally
the ``create_entries`` command will generate data for the demo app

Documentation
-------------

Batteries Included
------------------

Slick Reporting comes with

* An auto-generated, bootstrap-ready Filter Form
* Carts.js Charting support `Chart.js <https://www.chartjs.org/>`_
* Highcharts.js Charting support `Highcharts.js <https://www.highcharts.com//>`_
* Datatables `datatables.net <https://datatables.net/>`_
Available on `Read The Docs <https://django-slick-reporting.readthedocs.io/en/latest/>`_

A Preview:
You can run documentation locally

.. image:: https://i.ibb.co/SvxTM23/Selection-294.png
:target: https://i.ibb.co/SvxTM23/Selection-294.png
:alt: Shipped in View Page
.. code-block:: console
<activate your virtual environment>
cd docs
pip install -r requirements.txt
sphinx-build -b html source build
Documentation
-------------

Available on `Read The Docs <https://django-slick-reporting.readthedocs.io/en/latest/>`_
Road Ahead
----------
Expand Down
11 changes: 5 additions & 6 deletions demo_proj/demo_app/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
("product-sales-per-country-crosstab", reports.ProductSalesPerCountryCrosstab),
("last-10-sales", reports.LastTenSales),
("total-product-sales-with-custom-form", reports.TotalProductSalesWithCustomForm),

]

GROUP_BY = [
Expand All @@ -27,7 +26,7 @@
("time-series-with-custom-dates", reports.TimeSeriesReportWithCustomDates),
("time-series-with-custom-dates-and-title", reports.TimeSeriesReportWithCustomDatesAndCustomTitle),
("time-series-without-group-by", reports.TimeSeriesWithoutGroupBy),
('time-series-with-group-by-custom-queryset', reports.TimeSeriesReportWithCustomGroupByQueryset),
("time-series-with-group-by-custom-queryset", reports.TimeSeriesReportWithCustomGroupByQueryset),
]

CROSSTAB = [
Expand All @@ -38,14 +37,14 @@
("crosstab-report-custom-verbose-name", reports.CrossTabReportWithCustomVerboseName),
("crosstab-report-custom-verbose-name-2", reports.CrossTabReportWithCustomVerboseNameCustomFilter),
("crosstab-report-with-time-series", reports.CrossTabWithTimeSeries),

]
OTHER = [
("chartjs-examples", reports.ChartJSExample),
]


def get_urls_patterns():
urls = []
for name, report in TUTORIAL + GROUP_BY + TIME_SERIES + CROSSTAB:
for name, report in TUTORIAL + GROUP_BY + TIME_SERIES + CROSSTAB + OTHER:
urls.append(path(f"{name}/", report.as_view(), name=name))
return urls


Loading

0 comments on commit f17bf6a

Please sign in to comment.