Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • renovate/devdependencies-(non-major)
  • renovate/major-react-monorepo
  • renovate/nginxinc-nginx-unprivileged-1.x
4 results

Target

Select target project
  • web-et-numerique/factory/llle_project/self-data-technical-doc
1 result
Select Git revision
  • master
  • renovate/devdependencies-(non-major)
  • renovate/major-react-monorepo
  • renovate/nginxinc-nginx-unprivileged-1.x
4 results
Show changes
Commits on Source (2)
Showing
with 69 additions and 46 deletions
No preview for this file type
......@@ -28,4 +28,4 @@ for questions and suggestions.
## Why we use it ?
Without that stack we are not able to properly interact with all cozy apps and data. That's why we are using it. For local developpment we are using the official cozy-stack repo with some packaging updates, and for our test env we are using [Easy cozy](../easycozy/index.md)
\ No newline at end of file
Without that stack we are not able to properly interact with all cozy apps and data. That's why we are using it. For local development we are using the official cozy-stack repo with some packaging updates, and for our test env we are using [Easy cozy](../easycozy/index.md)
\ No newline at end of file
......@@ -2,11 +2,11 @@
[Gitlab Repo](https://forge.grandlyon.com/web-et-numerique/llle_project/cozy-stack)
### Why are we clonning the official repo ?
### Why are we cloning the official repo ?
Because of some political choice Cozy Cloud are not maintaining there official [docker image](https://hub.docker.com/r/cozy/cozy-app-dev) properly. That's why we have a mirroring version of there official repository with some custom docker configuration improving :
* CouchDb version. Officialy Cozy Cloud use CouchDb 3.2.2, but in there official image it's not the case yet.
* CouchDb version. Officially Cozy Cloud use CouchDb 3.2.2, but in there official image it's not the case yet.
### What change should be done by cozy in order to upgrade there image ?
......
......@@ -46,6 +46,30 @@ git push --follow-tags origin dev
Don't forget to add release notes in gitlab in *your project -> repository -> tags -> edit release notes *
You can copy paste the last changelogs in the release notes.
### Annotated Tags
If you see a bug in the Changelog (the last version doesn't compare without the previous version correctly or you have plenty of undesired commits from previous versions), it means you made something wrong when you pushed your commit (basically you may have made a classical git push instead of git push --follow-tags origin dev), and you tag is not correctly annotated or annotated with the wrong commit.
You can list the annotated tag with the following command
```
git tag -n
```
A normal tag should have its related commit like this :
```
v2.1.3 chore(release): 2.1.3
v2.2.0 chore(release): 2.2.0
```
If you see some mistakes in tag annotation you can change it with the following command :
```
git tag -a v2.1.3 COMMIT_SHA -m 'chore(release): 2.1.3' -f
```
This command will annotate an existing tag (v2.1.3 with chore(release): 2.1.3 here) to the right commit. You'll have to pass the commit_sha from the related chore commit.
## Useful links
[Conventional commit doc](https://www.conventionalcommits.org/en/v1.0.0/)
......
......@@ -171,7 +171,7 @@ Exploration is a feature where the user has to do an action in order to help him
They are 4 types of actions:
- DECLARATIVE : The user has to do something outside of the app => No way for the app to know if the user did it so we trust him.
- ACTION : Action whitin the app. When the user finishes he gets a notification.
- ACTION : Action within the app. When the user finishes he gets a notification.
- CONSUMPTION : He has to do something in his consumption view.
- ECOGESTURE : He needs to look at a specific Ecogesture.
......@@ -213,12 +213,12 @@ If the user has completed his profile, the application will purpose him a list o
1. First we look for the action that haven't been done yet
2. We pick only the actions that are available for the user's connected fluids
3. We pick the action that are appliable during the current season. At this moment, if the list is smaller than 3, we complete it with actions whose value for property **Season** is _NONE_
3. We pick actions that are applicable during the current season. At this moment, if the list is smaller than 3, we complete it with actions whose value for property **Season** is _NONE_
4. If the list is still smaller than 3 after this, we complete with default actions (This case is rare)
5. Finally, we sort the list of action by efficency and then difficulty. We put the most efficient actions and with the lowest difficulty in first.
5. Finally, we sort the list of action by efficiency and then difficulty. We put the most efficient actions and with the lowest difficulty in first.
At any moment of an action, a user can consult his progress through a clock icon and the ending date of his action.
The accomplishment of an action is only conditionned by the duration. Once the user completes an action, he'll see a notification on the app and then win his five stars when he comes back to the action screen.
The accomplishment of an action is only conditioned by the duration. Once the user completes an action, he'll see a notification on the app and then win his five stars when he comes back to the action screen.
## Duel
......@@ -230,14 +230,14 @@ We check the most recent period first if it's complete and then we go farther an
We also define a threshold for a maximum old period
!!! note "6 months for the moment - hard coded."
If the thresold is reached and no valid period was found, we alert the user that he can't launch the duel and have to wait before he can retry this process.
If the threshold is reached and no valid period was found, we alert the user that he can't launch the duel and have to wait before he can retry this process.
### On going
Every time the user goes into the duel mode, we are checking if the duel is finished.
if we have retrieved all data to calculate the user consumption on the duel duration, the duel is done.
!!! info "In order to not block the user if a value is mising, we are also setting the duel as done when we reach the startDate + delay in day to retrieve the data (based on the fluid) + 1 day. In this case the user consumption is done on known values."
!!! info "In order to not block the user if a value is missing, we are also setting the duel as done when we reach the startDate + delay in day to retrieve the data (based on the fluid) + 1 day. In this case the user consumption is done on known values."
### On finish
......
......@@ -2,8 +2,8 @@
Ecolyo allow user to see its consumption in two way:
- globally with the mutlifluid view that displays euro consumption
- more specifcally, fluid by fluid, by selecting the wanted fluid in the submenu
- globally with the multifluid view that displays euro consumption
- more specifically, fluid by fluid, by selecting the wanted fluid in the submenu
All consumption information are retrieved and calculated by services from the application.
......@@ -72,7 +72,7 @@ The component allows the user to navigate through the different fluid views (mul
### Rules
1. If a Konnector is errored or its data is outdated, we show a red cross on the fluid icon
1. If a Konnector is on error or its data is outdated, we show a red cross on the fluid icon
2. If the fluid is not connected we show a "turn on" icon
3. Icons have an active state. (They are coloured when selected)
......@@ -81,7 +81,7 @@ The component allows the user to navigate through the different fluid views (mul
### Description
This component is the one that shows the user its consumption, according to the selected fluid, timestep and date.
It is splitted in 3 distinct parts:
It is split in 3 distinct parts:
- The ConsumptionVisualier
- The FluidSlides
......@@ -92,7 +92,7 @@ It is splitted in 3 distinct parts:
| Component | Rules |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ConsumptionVisualizer | <ul><li>Calls the _DataloadConsumptionVisualizer_ component that shows the dataload of the selected timeStep and fluid</li><li>For multifluid, we show the total consumption of all connected fluid, and the consumption fluid by fluid, all in €</li><li>We display a message according to the data state as explained in the [DataLoad Consumption Visualizer](./#dataload-consumption-visualizer)</li></ul> |
| FluidSlides | This component calls the fluidSwipe component which is handled by the library _react-swipeable-views_, and allows the user to swipe accross the selected timestep. This library loads the slides before and after the current slide, so we reduce the loading time between slides. |
| FluidSlides | This component calls the fluidSwipe component which is handled by the library _react-swipeable-views_, and allows the user to swipe across the selected timestep. This library loads the slides before and after the current slide, so we reduce the loading time between slides. |
| TimeStepSelector | This component allows the user to change the current Timestep, or to return to today's date with a button |
## DataLoad Consumption Visualizer
......@@ -131,7 +131,7 @@ The data state is define in the "ConsumptionFormatter" service following theses
### Display of the specific cases (component: DataloadNoValue)
This display appear instead of the traditionnal one (described below). It is used to display a general message which override the value. Here are the rules :
This display appear instead of the traditional one (described below). It is used to display a general message which override the value. Here are the rules :
| Condition | Displayed label | Comments |
| --- | --- | --- |
......@@ -200,12 +200,12 @@ The chart scale will adapt to the max load displayed between the _actualData_ an
## Konnector Viewer Card
This component shows the konnector's state and allows the user to connect, delete, or update a konnector
This component shows the konnector state and allows the user to connect, delete, or update a konnector
### Rules
- If the fluid is connected, this component will shows the konnector state at the end of the consumption page
- If the fluid is not connected, it will show the connection form
- If the konnector is in error or its data is outdated, it will display the number of days since the data is outdated
- If the error is a login error (eg: user consent is revocated), it will show a specific message
- If the error is a login error (eg: user consent is revoked), it will show a specific message
- If the data is outdated but the user has already triggered an update today, we will show a message that informs the user that the issue is probably related to the energy provider
......@@ -4,7 +4,7 @@ What is DACC ? A cozy blackbox where apps can send data in order to be anonymise
## Infrastructure workflow
We have two environements, a dev one and a production. Both of them look like the following schema :
We have two environments, a dev one and a production. Both of them look like the following schema :
![dacc](/img/architecture/dacc.png)
......@@ -142,9 +142,9 @@ with:
| PROFILE_COUNT_MONTHLY | profile-count-monthly |
| KONNECTOR_ATTEMPTS_MONTHLY | konnector-attempts-monthly |
### Environnements
### Environments
There is two remote doctypes pointing to two differents mode. `dacc-dev` is used on alpha.
There is two remote doctypes pointing to two different mode. `dacc-dev` is used on alpha.
```json
"dacc": {
......@@ -168,7 +168,7 @@ First you need to modify the service in order to be able to see data in local :
.getStackClient()
.fetchJSON(
'POST',
environementService.isProduction()
environments.isProduction()
? 'http://localhost:8081'
: '/remote/cc.cozycloud.dacc.dev',
{
......
......@@ -92,7 +92,7 @@ Once user has completed his profile ecogesture through the form, he has the poss
- User can go back and correct his answer at any time
- User can stop the process at any time, hist answer will be saved ad the next time he will open the selection, a new stack of 10 ecogesture is made (for example, user stops at 4/10, the next time he opens the selection it will be 4/14)
- If user chooses to select manually an ecogesture outside of the selection tunnel (through the 'all' tab), this ecogesture will be removed from the list it was existing in it.
- If user choses to remove manually an ecogesture outside of the selection tunnel (through the 'doing' and 'objective' tab), these ecogestures won't be purposes again in the selection tunnel.
- If user chooses to remove manually an ecogesture outside of the selection tunnel (through the 'doing' and 'objective' tab), these ecogestures won't be purposes again in the selection tunnel.
- User can't use the back arrow on the first ecogesture of selection list
Once the whole process is done, the user has no possibility to do it again through the tinder-like selection, but he can still edit his ecogestures manually from the various tabs.
......
......@@ -142,7 +142,7 @@ UserDuelEntity {
### Loader
The initialization process displays progression steps in the splash screen so the user can see what is happening while it is loading. Each initialization function set an error if it fails, which is shown on the Splash error screnn.
The initialization process displays progression steps in the splash screen so the user can see what is happening while it is loading. Each initialization function set an error if it fails, which is shown on the Splash error screen.
Available loading steps are the followings :
......
......@@ -19,7 +19,7 @@ _For our development, every alpha instance points to the REC project. That way,
### Matomo server
Matomo is disabled by default on local development to optimize performances. To develop specific features related to matomo withtout having to deploy to alpha, follow theses instructions.
Matomo is disabled by default on local development to optimize performances. To develop specific features related to matomo without having to deploy to alpha, follow theses instructions.
```bash
cd docker
......@@ -38,7 +38,7 @@ On step 5, create a super user with the credentials you want, for example
On step6, enter dummy values and select a time zone.
Once you finish the setup and access the server, you should see a warning telling you that matomo has not been configured with the correct port. To fix this problem follow these instrcutions.
Once you finish the setup and access the server, you should see a warning telling you that matomo has not been configured with the correct port. To fix this problem follow these instructions.
```
docker ps
# copy container id of matomo
......
......@@ -8,7 +8,7 @@ When the user connects for the first time to Ecolyo, onboarding screens will be
### GCU screen
First of all, we display the GCU screen, which allows user to read the General Condition of Use and the Legal Notive. The user should consent to all the terms to go further in the application.
First of all, we display the GCU screen, which allows user to read the General Condition of Use and the Legal Notice. The user should consent to all the terms to go further in the application.
!!! note "About terms"
More details are available on the (term section)[/ecolyo/functionalities/terms.md].
......
......@@ -4,8 +4,8 @@ This section explains the price calculation process.
## Description
Since version `1.6.0` of the app, we have a database storing fluid prices evolution sincre 2012 for the following fluids :
* Elecricity
Since version `1.6.0` of the app, we have a database storing fluid prices evolution since 2012 for the following fluids :
* Electricity
* Gas
Before this version, the app was applying a hard coded price for each fluid without taking care of the time period. Now, there is a service running every night that process fresh data in order to apply the current price to this data, but also apply the most relevant price for a fluid doctype.
......@@ -87,7 +87,7 @@ This service is running every night at 02:00 AM.
### Init
A migration job has been setup to init the database with json data store inside the app. This job should be run once and will init electricy and gas prices.
A migration job has been setup to init the database with json data store inside the app. This job should be run once and will init electricity and gas prices.
### New price
......@@ -102,7 +102,7 @@ In case of price update the following procedure must be done :
### Prices Data
We store in databse a collection of prices with the following info :
We store in database a collection of prices with the following info :
* StartDate
* EndDate
* fluidType
......@@ -131,7 +131,7 @@ In a shell run a build and test service with le following command line :
yarn build-dev:browser; yarn run cozy-konnector-dev -m .\manifest.webapp .\build\services\monthlyReport\ecolyo.js
```
### Evolutions
### Future Changes
We might consider a more dynamic process for fallback price calculation in the future:
* Get last price for a given price in database
......
......@@ -164,4 +164,4 @@ Useful tips while working with this API :
"source": {}
}
```
- In case of bad request (wrong parameters for example), the API will return an error in _xml_ format so you'll get exaclty the same error as above in your cozy instance.
- In case of bad request (wrong parameters for example), the API will return an error in _xml_ format so you'll get exactly the same error as above in your cozy instance.
......@@ -32,7 +32,7 @@ All events are stored with the _aggregated_ flag to false to allow the identific
## Usage events aggregator service
## Functionnalities
## Functionalities
The service will retrieve all new events by filter on the _aggregated_ flag to **false** and the event date before than today.
For each aggregator type we will defined the right calculation to apply to create the appropriate indicator:
......@@ -75,5 +75,5 @@ with:
- source: contains "ecolyo" value.
- name: contains the indicator type
- startDate and endDate: used to defined a period or if not relevant, it contains both the date of the events.
- value: contains aggreated value (example: number of page viewed on a day).
- value: contains aggregated value (example: number of page viewed on a day).
- groups: contains all other attribute useful for the indicator (example: context, target, result)
......@@ -48,15 +48,14 @@ A Powershell window will open. Wait until the success message:
> Everything is setup. Go to http://ecolyo.cozy.tools:8080/
> To exit, press ^C
Once successfull you can launch your local cozy with following url: [Cozy local url](http://cozy.tools:8080/)
Once successful you can launch your local cozy with following url: [Cozy local url](http://cozy.tools:8080/)
Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/)
## Import mock data
!!! info "Requirement"
Your dev stack should be running to import the moke data
Your dev stack should be running to import the mock data
First install ACH using yarn :
```
......
......@@ -139,7 +139,7 @@ This doctype is used to store ecogestures.
| efficiency | number | efficiency of the ecogesture |
| difficulty | number | difficulty of the ecogesture |
| room | Room | room affected by the ecogesture<br><br>_Room enum:_<br>- _ALL = 0_<br>- _BATHROOM = 1_<br>- _KITCHEN = 2_<br>- _LAUNDRY = 3_<br>- _TOILET = 4_ |
| season | Season | season suited to the ecogesture<br><br>_Season enum:_<br>- _NONE = 'Sans saison'_<br>- _WINTER = 'Hiver'_<br>- _SUMMER = 'Eté'_ |
| season | Season | season suited to the ecogesture<br><br>_Season enum:_<br>- _NONE = 'Sans saison'_<br>- _WINTER = 'Hiver'_<br>- _SUMMER = 'Été'_ |
| equipment | boolean | used to know if one or more equipment are affected by the ecogesture |
| equipmentType | EquipmentType[] | equipment affected by the ecogesture<br><br>_EquipmentType enum:_<br>- _AIR_CONDITIONING = 0_<br>- _COMPUTER = 1_<br>- _MICROWAVE = 2_<br>- _OVEN = 3_<br>- _WASHING_MACHINE = 4_<br>- _DISHWASHER = 5_<br>- _COOKING_PLATES = 6_<br>- _DRYER = 7_<br>- _REFREGIRATOR = 8_<br>- _GARDEN = 9_<br>- _WATER_HEATER = 10_<br>- _FAN = 11_<br>- _CURTAIN = 12_<br>- _INTERNET_BOX = 13_<br>- _VENTILATION = 14_<br>- _FREEZER = 15_<br>- _BOILER = 16_<br>- _HYDRAULIC_HEATING = 17_ |
| equipmentInstallation | boolean | used to know if it is required an installation |
......
......@@ -21,14 +21,14 @@ A swagger documentation can be consulted at [http://localhost:3000/api/doc/](htt
- `/api/beneficiaire`: Get all usager known from Postgre database.
- `/api/beneficiaire/create'`: This route is used in order to store Usager domain and his trigger proccess from Cozy. This route is protected by a COZY_SECRET env variable token. This token is generated by us. If you change it, you need to inform Cozy team because this token is store in their side also.
- `/api/beneficiaire/create'`: This route is used in order to store Usager domain and his trigger process from Cozy. This route is protected by a COZY_SECRET env variable token. This token is generated by us. If you change it, you need to inform Cozy team because this token is store in their side also.
- `/api/beneficiaire/remove'`: This route is used in order to remove Usager domain and his trigger proccess. Only availabe by POST. This route is not accessible from any part of TS FRONT application. Protected rout by the same token of create route.
- `/api/beneficiaire/remove'`: This route is used in order to remove Usager domain and his trigger process. Only availabe by POST. This route is not accessible from any part of TS FRONT application. Protected rout by the same token of create route.
## Add one benificiary by Postman
## Add one beneficiary by Postman
- Create a POST request
- Entry the URL: http://localhost:3020/api/beneficiaire/create or https://pilote-agent-rec.grandlyon.com/api/beneficiaire/create
- Push in Authorizathion/ Bearer Token => the token use by "process.env.COZY_SECRET"
- Push in Authorization/ Bearer Token => the token use by "process.env.COZY_SECRET"
- In Body, as JSON format example :
- ``
{"cozy_name":"pilote-rec.cozy.self-data.alpha.grandlyon.com","trigger":"https://pilote-rec.cozy.self-data.alpha.grandlyon.com/jobs/webhooks/d010bf3fa2aed6f3c6584ea93a54affc"}
......@@ -39,7 +39,7 @@ A swagger documentation can be consulted at [http://localhost:3000/api/doc/](htt
# Cozy
- `api/redirect/cozy`: Allow to send information to the cozy-stack in order to run smsProccess on cozy-stask side.
- `api/redirect/cozy`: Allow to send information to the cozy-stack in order to run smsProcess on cozy-stack side.
# Users
......
......@@ -74,7 +74,7 @@ await client.getStackClient().fetchJSON('GET','/remote/org.mps.share?token=eyJhb
```
## POST
1/ In the request file created. Specify the methode and the route to your target URL :
1/ In the request file created. Specify the method and the route to your target URL :
POST https://pilote-agent-dev.grandlyon.com/api/auth/token/check
Content-Type: application/json
......
### Use services in local
## Configure the cozy-stack on local
In order to be able to use your sercice, follow these steps:
In order to be able to use your service, follow these steps:
1/ clone [cozy-doctypes](https://github.com/cozy/cozy-doctypes) repository into your system.
Then, push it into your root project.
......
......@@ -9,7 +9,7 @@ Pilote aims to help people in various administrative processes, allowing them to
## ![gitlab](../img/gitlab-logo.svg) Repositories
[MPS group](https://forge.grandlyon.com/solidarite/monparcourssocial) contains the following repos:
[MPS group](https://forge.grandlyon.com/solidarite/monparcourssocial) contains the following repositories:
* [pilote usager](https://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager)
* travailleur social
......