Skip to content

Commit b7b8938

Browse files
authored
Feature/doc_fix (#34)
* docs: fix simple example (#33) Signed-off-by: develop-cs <[email protected]> * docs: update changelog Signed-off-by: develop-cs <[email protected]> --------- Signed-off-by: develop-cs <[email protected]>
1 parent 4f1bf9d commit b7b8938

20 files changed

+77
-62
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,27 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

10-
**Describe the bug**:
9+
### Describe the bug
1110
A clear and concise description of what the bug is.
1211

13-
**To Reproduce**:
12+
### To Reproduce
1413
Steps to reproduce the behavior:
1514
1. Import '...'
1615
2. Call '....'
1716
3. See error
1817

19-
**Expected behavior**:
18+
### Expected behavior
2019
A clear and concise description of what you expected to happen.
2120

22-
**Screenshots**:
21+
### Screenshots
2322
If applicable, add screenshots to help explain your problem.
2423

25-
**Desktop (please complete the following information):**
24+
### Desktop (please complete the following information)
2625
- OS: `[e.g. linux]`
2726
- Python version(s): `[e.g. 3.12]`
2827
- Dependencies versions: `[e.g. pydantic 2.6.4]`
2928

30-
**Additional context**:
29+
### Additional context
3130
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ about: Suggest an idea for this project
44
title: ''
55
labels: enhancement
66
assignees: ''
7-
87
---
98

10-
**Is your feature request related to a problem? Please describe**:
9+
### Is your feature request related to a problem? Please describe
1110
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1211

13-
**Describe the solution you'd like**:
12+
### Describe the solution you'd like
1413
A clear and concise description of what you want to happen.
1514

16-
**Describe alternatives you've considered**:
15+
### Describe alternatives you've considered
1716
A clear and concise description of any alternative solutions or features you've considered.
1817

19-
**Additional context**:
18+
### Additional context
2019
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
## What?
1+
### What?
22
Explain with one or more sentences what this change is doing.
33

4-
## Have you done?
4+
### Have you done?
55
- [ ] Code tests
66
- [ ] Update documentation
77
- [ ] Update [changelog](https://github.com/MAIF/arta/blob/main/CHANGELOG.md)
88

9-
## Details to be checked: (optional)
9+
### Details to be checked: (optional)
1010
If needed, add some details here in order to verify the change (e.g., how to test).
1111

12-
## Linked issues: (optional)
12+
### Linked issues: (optional)
1313
- Close ...
1414
- Close ...

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ repos:
1616
- id: end-of-file-fixer
1717
exclude: ^(docs/)
1818
- id: pretty-format-json
19-
args: ['--autofix']
19+
args: [--autofix]
2020
- id: trailing-whitespace
21-
args: ['--markdown-linebreak-ext=md']
21+
args: [--markdown-linebreak-ext=md]
2222
exclude: ^(docs/)
2323
- id: mixed-line-ending
24-
args: ['--fix=lf']
24+
args: [--fix=lf]
2525
exclude: ^(docs/)
2626
- id: check-added-large-files
27-
args: ['--maxkb=500']
27+
args: [--maxkb=500]
2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.5.4
29+
rev: v0.6.3
3030
hooks:
3131
- id: ruff
32-
args: [ --fix ]
32+
args: [--fix]
3333
- id: ruff-format
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v1.11.0
35+
rev: v1.11.2
3636
hooks:
3737
- id: mypy
3838
args: [--config-file=pyproject.toml]
@@ -46,9 +46,9 @@ repos:
4646
rev: v2.7.3
4747
hooks:
4848
- id: pip-audit
49-
args: ["--skip-editable"]
49+
args: [--skip-editable]
5050
- repo: https://github.com/compilerla/conventional-pre-commit
51-
rev: v3.3.0
51+
rev: v3.4.0
5252
hooks:
5353
- id: conventional-pre-commit
5454
stages: [commit-msg]
@@ -65,6 +65,6 @@ repos:
6565
name: Coverage
6666
language: system
6767
entry: pytest -v --cov=arta --cov-fail-under=90
68-
types: [ python ]
68+
types: [python]
6969
pass_filenames: false
7070
always_run: true

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
7+
## [0.8.1] - September, 2024
88

99
### Fixes
1010

11-
* *Simple condition:* an error occurs when the field is of type camelcase or pascalcase (e.g., `input.streetNumber`, `input.StreetNumber`).
11+
* *Simple condition:* an error occurs (#31) when the field is of type `camelCase` or `PascalCase` (e.g., `input.streetNumber`, `input.StreetNumber`).
12+
13+
### Documentation
1214

15+
* Fixes of code in the [A Simple Example](https://maif.github.io/arta/a_simple_example/) page.
1316

1417
## [0.8.0] - July, 2024
1518

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
## Overview
2525

26-
**Arta** is a simple python rules engine designed for python developers.
26+
**Arta** is an *open source* python rules engine designed for and by python developers.
2727

2828
### Goal
2929

@@ -113,7 +113,13 @@ Check the [A Simple Example](https://maif.github.io/arta/a_simple_example/) sect
113113

114114
## Installation
115115

116-
Install using `pip install -U arta`. See the [Install](https://maif.github.io/arta/installation/) section in the documentation for more details.
116+
Install using `pip install -U`:
117+
118+
```shell
119+
pip install -U arta
120+
```
121+
122+
See the [Install](https://maif.github.io/arta/installation/) section in the documentation for more details.
117123

118124
## What's New
119125

docs/pages/a_simple_example.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Imagine the following use case:
1515

1616
The rules (intentionally simple) are:
1717

18-
``` mermaid
18+
```mermaid
1919
---
2020
title: Simple rule set example
2121
---
@@ -69,17 +69,17 @@ rules:
6969
simple_condition: input.language=="french" and input.age!=None
7070
action: set_course
7171
action_parameters:
72-
value: french
72+
course_id: french
7373
SENIOR:
7474
simple_condition: input.age==None
7575
action: set_course
7676
action_parameters:
77-
value: senior
77+
course_id: senior
7878
INTERNATIONAL:
7979
simple_condition: input.language!="french"
8080
action: set_course
8181
action_parameters:
82-
value: international
82+
course_id: international
8383
favorite_meal:
8484
EMAIL:
8585
simple_condition: input.favorite_meal!=None
@@ -124,6 +124,9 @@ actions_source_modules:
124124
And could be for example (intentionally simple) in `actions.py`:
125125

126126
```python
127+
from typing import Any
128+
129+
127130
def set_admission(value: bool, **kwargs: Any) -> dict[str, bool]:
128131
"""Return a dictionary containing the admission result."""
129132
return {"is_admitted": value}
@@ -134,7 +137,7 @@ def set_course(course_id: str, **kwargs: Any) -> dict[str, str]:
134137
return {"course_id": course_id}
135138
136139
137-
def send_email(mail_to: str, mail_content: str, meal: str, **kwargs: Any) -> bool:
140+
def send_email(mail_to: str, mail_content: str, meal: str, **kwargs: Any) -> str | None:
138141
"""Send an email."""
139142
result: str | None = None
140143

docs/pages/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@
4949
<div class="row contentN2">
5050
<div class="col-md-8 col-xs-12 colDashRight">
5151
<ul class="titleOnLine">
52-
<li>An Open Source</li>
52+
<li>A Python</li>
5353
<li>Rules Engine:</li>
54-
<li>Make rule handling simple</li>
54+
<li>Make rule handling</li>
55+
<li>simple</li>
5556
</ul>
5657
<p class="intro">
57-
Arta is a simple python rules engine designed for python developers.</br></br>
58+
Arta is an open source python rules engine designed for and by python developers.</br></br>
5859
There is one main reason to use <i>Arta</i> and it was the main goal of its development
5960
at <i>MAIF</i>: <b>increase business rules maintainability</b>.
6061
</br>

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "arta"
7-
version = "0.8.0"
7+
version = "0.8.1"
88
requires-python = ">3.8.0"
9-
description = "An Open Source Rules Engine - Make rule handling simple"
9+
description = "A Python Rules Engine - Make rule handling simple"
1010
readme = "README.md"
1111
license = {text = "Apache-2.0"}
1212
authors = [
@@ -34,7 +34,6 @@ classifiers = [
3434
dependencies = [
3535
"omegaconf>=2.0.0",
3636
"pydantic>=1.0.0",
37-
"urllib3!=2.2.1",
3837
]
3938

4039
[project.urls]

0 commit comments

Comments
 (0)