Skip to content

Commit

Permalink
Feature/docs_fixes (#17)
Browse files Browse the repository at this point in the history
* fix: fix links

Signed-off-by: develop-cs <[email protected]>

* fix: use true YAML boolean values

Signed-off-by: develop-cs <[email protected]>

---------

Signed-off-by: develop-cs <[email protected]>
  • Loading branch information
develop-cs authored Jun 10, 2024
1 parent fe5c31a commit 801aba2
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [0.7.0b] - April, 2024

### New Features
- Beta release implementing what you can find in its [documentation](https://pages.github.com/MAIF/arta/home).
- Beta release implementing what you can find in its [documentation](https://maif.github.io/arta/home/).
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ We follow the standard GitHub [fork & pull](https://help.github.com/articles/usi
- Please make sure to follow the general quality guidelines (specified below) when developing your patch.
- Please write additional tests covering your feature and adjust existing ones if needed before submitting your pull request.
1. Once your feature is complete, prepare the commit with a good commit message, for example: `Adding canary mode support for services #42` (note the reference to the ticket it aimed to resolve).
1. If it's a new feature, or a change of behaviour, document it on the [Arta docs](https://pages.github.com/MAIF/arta/home), remember, an undocumented feature is not a feature.
1. If it's a new feature, or a change of behaviour, document it on the [Arta docs](https://maif.github.io/arta/home/), remember, an undocumented feature is not a feature.
1. Now it's finally time to [submit the pull request](https://help.github.com/articles/using-pull-requests)!
- Please make sure to include a reference to the issue you're solving *in the comment* for the Pull Request, this will cause the PR to be linked properly with the Issue. Examples of good phrases for this are: "Resolves #1234" or "Refs #1234".
1. Now both committers and interested people will review your code. This process is to ensure the code we merge is of the best possible quality, and that no silly mistakes slip through. You're expected to follow-up these comments by adding new commits to the same branch. The commit messages of those commits can be more loose, for example: `Removed debugging using printline`, as they all will be squashed into one commit before merging into the main branch.
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

---

**Documentation:** [https://pages.github.com/MAIF/arta/home](https://pages.github.com/MAIF/arta/home)
**Documentation:** [https://maif.github.io/arta/home/](https://maif.github.io/arta/home/)

**Repository:** [https://github.com/MAIF/arta](https://github.com/MAIF/arta)

Expand Down Expand Up @@ -60,12 +60,12 @@ rules:
simple_condition: input.power=="strength" or input.power=="fly"
action: set_admission
action_parameters:
value: True
value: true
NOT_ADMITTED:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false

actions_source_modules:
- actions
Expand All @@ -74,6 +74,9 @@ actions_source_modules:
`actions.py` :

```python
from typing import Any
def set_admission(value: bool, **kwargs: Any) -> dict[str, bool]:
"""Return a dictionary containing the admission result."""
return {"is_admitted": value}
Expand Down Expand Up @@ -105,11 +108,11 @@ print(result)

You should get: `{"admission": {"is_admitted": True}}`

Check the [A Simple Example](https://pages.github.com/MAIF/arta/a_simple_example/) section for more details.
Check the [A Simple Example](https://maif.github.io/arta/a_simple_example/) section for more details.

## Installation

Install using `pip install -U arta`. See the [Install](https://pages.github.com/MAIF/arta/installation/) section in the documentation for more details.
Install using `pip install -U arta`. See the [Install](https://maif.github.io/arta/installation/) section in the documentation for more details.

## What's New

Expand Down
6 changes: 3 additions & 3 deletions docs/pages/a_simple_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ rules:
simple_condition: input.power=="strength" or input.power=="fly"
action: set_admission
action_parameters:
value: True
value: true
NOT_ADMITTED:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
FRENCH:
simple_condition: input.language=="french" and input.age!=None
Expand Down Expand Up @@ -94,7 +94,7 @@ An **action** is triggered when the conditions are verified (i.e., `True`).
```yaml
action: set_admission # (1)
action_parameters: # (2)
value: True
value: true
```

1. Name of the *python callable object* used as an **action function**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
4 changes: 2 additions & 2 deletions tests/examples/failing_conf/wrong_action/wrong_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: dummy_funct
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
condition: DUMMY_CONDITION
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
dummy: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
4 changes: 2 additions & 2 deletions tests/examples/good_conf/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
condition: IS_SPEAKING_ENGLISH and not(IS_AGE_UNKNOWN)
Expand Down
12 changes: 6 additions & 6 deletions tests/examples/good_conf/rules_bis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
custom_condition: null
condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_FRENCH:
custom_condition: null
Expand Down Expand Up @@ -57,13 +57,13 @@ rules:
condition: HAS_SCHOOL_AUTHORIZED_POWER
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
custom_condition: null
condition: null
action: set_admission
action_parameters:
value: False
value: false
# Fourth rule set
fourth_rule_set:
admission_rules:
Expand All @@ -72,10 +72,10 @@ rules:
condition: null
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
custom_condition: null
condition: null
action: set_admission
action_parameters:
value: False
value: false
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ rules:
simple_condition: input.power=="strength" or input.power=="fly"
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rules:
simple_condition: input.power=="strength" or input.power=="fly"
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rules:
simple_condition: input.power=="strength" or input.power=="fly"
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rules:
simple_condition: input.age=="strength" or dummy
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rules:
simple_condition: input.power=="strength" or input.dummy=="fly"
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rules:
simple_condition: input.power=="strength" or input.dummy=="fly"
action: set_admission
action_parameters:
value: True
value: true
ADM_KO:
simple_condition: null
action: set_admission
action_parameters:
value: False
value: false
course:
COURSE_ENGLISH:
simple_condition: input.language=="english" and input.age!=None
Expand Down

0 comments on commit 801aba2

Please sign in to comment.