Skip to content

Commit

Permalink
feat!: use publicodes v1
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileRolley committed Feb 16, 2024
1 parent 0f675d1 commit 147711c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 50 deletions.
6 changes: 3 additions & 3 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"eject": "react-scripts eject"
},
"dependencies": {
"@publicodes/react-ui": "^1.0.1",
"@types/node": "^16.18.46",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"publicodes-react": "^1.0.0-beta.77",
"publicodes": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.7",
Expand All @@ -21,8 +22,7 @@
"typescript": "^4.9.5"
},
"devDependencies": {
"gh-pages": "^6.0.0",
"publicodes": "1.0.0-beta.77"
"gh-pages": "^6.0.0"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion doc/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Engine from "publicodes"
import "./App.css"
import { RulePage } from "publicodes-react"
import { RulePage } from "@publicodes/react-ui"
import { Link, Route, Routes, useParams } from "react-router-dom"
import { ComponentProps, useRef } from "react"
import ReactMardown from "react-markdown"
Expand Down
24 changes: 12 additions & 12 deletions doc/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,13 @@
schema-utils "^3.0.0"
source-map "^0.7.3"

"@publicodes/react-ui@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@publicodes/react-ui/-/react-ui-1.0.1.tgz#6f86e5960a094bc4311e44b7f77a0e929cfa0f19"
integrity sha512-+fByE6jAnnn2tvhTMWjwzJRl6BUdj6YnrDCfeSvQTL3UGcaFniNf9zfMOrmlcFae5g4949Ew8MH1rB7To7YTtA==
dependencies:
styled-components "^6.1.1"

"@remix-run/[email protected]":
version "1.15.0"
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.15.0.tgz#461a952c2872dd82c8b2e9b74c4dfaff569123e2"
Expand Down Expand Up @@ -7937,17 +7944,10 @@ psl@^1.1.33:
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==

publicodes-react@^1.0.0-beta.77:
version "1.0.0-beta.77"
resolved "https://registry.yarnpkg.com/publicodes-react/-/publicodes-react-1.0.0-beta.77.tgz#da9550b4fd8cbebc330336a11e6831317ece7db1"
integrity sha512-6DigDTzhiSDWG3MPuHe022ef7Vs1JLxezeH41bbjHT91I7xh2x2zTAFVlanyFSMm8QO0GhA9micCHkBUzfAIsw==
dependencies:
styled-components "^6.0.8"

[email protected]:
version "1.0.0-beta.77"
resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.0-beta.77.tgz#45e3c4d2a46bfadcc932e1405ea037e659c28134"
integrity sha512-F8U3WGUWMo3/rxhWYS1gWIiG20g1Yy/+PpXdHM99d6ZHKWnnyh/4txVEuyVE75glgDs+mTjwZPnmoKWsTMXluA==
publicodes@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.1.tgz#07c1e5d94b3609a2fe09b531490969c9f4960086"
integrity sha512-vrgnLCKeu3orxmBhyjll8/rxnL3k2EYtIYa7D7GiJVYWmOE08J5S6c/1j15LnC3cQkYqYgOJR5JnX5gxooQGLA==

punycode@^2.1.0, punycode@^2.1.1:
version "2.3.1"
Expand Down Expand Up @@ -9001,7 +9001,7 @@ style-to-object@^0.4.0:
dependencies:
inline-style-parser "0.1.1"

styled-components@^6.0.8:
styled-components@^6.1.1:
version "6.1.8"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-6.1.8.tgz#c109d36aeea52d8f049e12de2f3be39a6fc86201"
integrity sha512-PQ6Dn+QxlWyEGCKDS71NGsXoVLKfE1c3vApkvDYS5KAK+V8fNWGhbSUEo9Gg2iaID2tjLXegEW3bZDUGpofRWw==
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"main": "index.js",
"module": "index.js",
"devDependencies": {
"@incubateur-ademe/nosgestesclimat": "^1.5.2",
"@incubateur-ademe/publicodes-commun": "^0.1.4",
"@publicodes/tools": "^0.4.7",
"publicodes": "1.0.0-beta.77"
"@incubateur-ademe/nosgestesclimat": "^2.0.0-rc.1",
"@incubateur-ademe/publicodes-commun": "^1.0.0",
"@publicodes/tools": "^1.0.0-rc.1",
"publicodes": "^1.0.1"
},
"authors": [
"Clément Auger <[email protected]>",
Expand Down
18 changes: 7 additions & 11 deletions rules/alimentation/artistes.publicodes
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ alimentation . artistes:
Par défaut, on considère que les artistes consomment un repas sur place, un petit déjeuner s'ils sont hébergés.
alimentation . artistes . repas:
formule:
recalcul:
règle: alimentation . repas
avec:
informations . nombre de repas total: informations . nombre artistes * 1 repas
alimentation . repas . proposition: alimentation . artistes . repas . type
valeur: alimentation . repas
contexte:
informations . nombre de repas total: informations . nombre artistes * 1 repas
alimentation . repas . proposition: alimentation . artistes . repas . type

alimentation . artistes . repas . type:
titre: Régime alimentaire des artistes
Expand All @@ -40,11 +38,9 @@ alimentation . artistes . repas . type . viande uniquement:

alimentation . artistes . petits déjeuners:
applicable si: hébergement . artistes présent
formule:
recalcul:
règle: alimentation . petits déjeuners
avec:
alimentation . petits déjeuners . nombre: informations . nombre artistes * 1 repas
valeur: alimentation . petits déjeuners
contexte:
alimentation . petits déjeuners . nombre: informations . nombre artistes * 1 repas

alimentation . artistes . eau en bouteille:
applicable si: eau en bouteille présent
Expand Down
1 change: 1 addition & 0 deletions rules/transport/transport.publicodes
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ transport . train . empreinte par km . TER:
note: |
Facteur d'émission issu de la base empreinte "TER/2022/Traction moyenne".
transport . commun:
transport . commun . empreinte par km:
formule:
moyenne:
Expand Down
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
# yarn lockfile v1


"@incubateur-ademe/nosgestesclimat@^1.5.2":
version "1.5.2"
resolved "https://registry.yarnpkg.com/@incubateur-ademe/nosgestesclimat/-/nosgestesclimat-1.5.2.tgz#9f9aded3d564292c4064003be80fbe67fc316f4d"
integrity sha512-YN+RhI1oN731pV3Mitvpi8z9hTD5kQHA6oIzjBU2eyN2caq0G6MmcTqbhSc2UC7YBukyjm0HIYiEvKFMZyHIgw==
"@incubateur-ademe/nosgestesclimat@^2.0.0-rc.1":
version "2.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@incubateur-ademe/nosgestesclimat/-/nosgestesclimat-2.0.0-rc.1.tgz#00514276d96fd243ce842a7d89cbb86582558322"
integrity sha512-mQKApRDeCkS4suGoCmOFrju0BPHjwhI3s6+SCjzgN46anbs4dtw3r8O0dMh1xy2N6iPtIqQrlpIAFwqiyVcSwg==
dependencies:
csv-parser "^3.0.0"
futureco-data "^0.1.0"
glob "^8.0.3"
http-server "^14.1.1"
nodemon "^3.0.1"
prettier "^3.1.0"
publicodes "1.0.0-beta.77"
publicodes "^1.0.1"
yaml "^2.2.2"

"@incubateur-ademe/publicodes-commun@^0.1.4":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@incubateur-ademe/publicodes-commun/-/publicodes-commun-0.1.5.tgz#9720644ae83bb4331d447624988a5f4c34b1a7c4"
integrity sha512-VMrbYX2tpMccGU8nnyWjeogri0PPOMbEBace40Kek7KT4SbJKFaX6+HU/RnTkGCgkYz0Mb5acfuaoUHqAcXbpA==
"@incubateur-ademe/publicodes-commun@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@incubateur-ademe/publicodes-commun/-/publicodes-commun-1.0.0.tgz#c2b947e26058733a1716ea5c51cdc4bfb3e605ea"
integrity sha512-tqT32fCizW9LbEDy8sRu9QmlM1170Ag2In2AyCZiyJXP6xlQBOAZK8UV22mMusxw/h81S8lhBPp5TW9o8ty2wA==
dependencies:
publicodes "1.0.0-beta.77"
publicodes "^1.0.1"

"@publicodes/tools@^0.4.7":
version "0.4.7"
resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-0.4.7.tgz#a9dd113d3569b180b02aae656823ff260c99aaf3"
integrity sha512-ujg4Dppcraxc0J955EEnHVk5PWhIOp9VBKMEYggdQtI1U83OQK59nofZkvjgfSK+GwELqZ1+VoQkKIeBbmeUqA==
"@publicodes/tools@^1.0.0-rc.1":
version "1.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-1.0.0-rc.1.tgz#ee38395e4ac3756b4a44814b2ff34bd7311d3fa0"
integrity sha512-LVxwS9LV9qTcP7SsbosoKinlgyIHSKTztXI34B6easx6xts0XJF+TNwRcAoeRt04BCr3PZVViWx9wmG7kExMXw==
dependencies:
"@types/node" "^18.11.18"
publicodes "1.0.0-beta.77"
publicodes "^1.0.1"

"@types/node@^18.11.18":
version "18.19.14"
Expand Down Expand Up @@ -534,10 +534,10 @@ pstree.remy@^1.1.8:
resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==

[email protected].0-beta.77:
version "1.0.0-beta.77"
resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.0-beta.77.tgz#45e3c4d2a46bfadcc932e1405ea037e659c28134"
integrity sha512-F8U3WGUWMo3/rxhWYS1gWIiG20g1Yy/+PpXdHM99d6ZHKWnnyh/4txVEuyVE75glgDs+mTjwZPnmoKWsTMXluA==
publicodes@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.1.tgz#07c1e5d94b3609a2fe09b531490969c9f4960086"
integrity sha512-vrgnLCKeu3orxmBhyjll8/rxnL3k2EYtIYa7D7GiJVYWmOE08J5S6c/1j15LnC3cQkYqYgOJR5JnX5gxooQGLA==

qs@^6.4.0:
version "6.11.2"
Expand Down

0 comments on commit 147711c

Please sign in to comment.