GithubHelp home page GithubHelp logo

betagouv / aplus Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 12.0 9.04 MB

Administration+

Home Page: https://beta.gouv.fr/startup/aplus.html

License: MIT License

Scala 69.57% HTML 18.59% CSS 2.73% JavaScript 0.53% Shell 0.28% Dockerfile 0.14% TypeScript 8.11% Python 0.05%

aplus's Introduction

Administration+

Code

Commandes

⚙️ Pré-requis ⚙️

  • Java
  • Docker
  • SBT
  • L'extension VSCode metals pour scala (non obligatoire mais conseillée !)

🗝️ Installer le projet clés en main 🗝️

Cloner le projet :

git clone https://github.com/betagouv/aplus
cd aplus

Pour lancer le projet aller dans le dossier develop/aplus puis lancer une base de donnée PostgreSQL avec docker-compose :

cd develop/aplus
docker-compose up db

Se connecter à la base de données avec Docker (pour connaître le nom du container, exécuter la commande docker ps):

docker exec -it <NOM_DU_CONTAINER_DE_LA_BD> psql -U aplus

Dans la console PSQL lancer la commande \d pour vérifier si des relations existent. Si aucune relation n'existe lancer la commande suivante puis quitter la console PSQL:

CREATE EXTENSION IF NOT EXISTS "unaccent";
\q

Ajouter un dump de la base de données à votre projet. Pour cela prendre contact avec l'équipe Administration+ qui vous enverra le fichier correspondant ([email protected] ou directement sur Mattermost). Ajouter le fichier à la racine du projet puis lancer la commande suivante (des erreurs apparaîtront, ne les prenez pas en compte !):

docker exec -i <NOM_DU_CONTAINER_DE_LA_BD> pg_restore -U aplus -d aplus < <NOM_FICHIER_DUMP>

Copier run.sh.example dans run.sh :

cp run.sh.example run.sh

Lancer le projet :

npm install
chmod +x run.sh
./run.sh
run

✨ Enjoy ✨ (si vous tombez sur l'erreur "database 'default' needs evolution", cliquez sur "apply this script now") !

http://localhost:9000

aplus's People

Contributors

aurelie-j avatar danielbmy avatar dependabot[bot] avatar dlequepeys avatar duniaach avatar jdauphant avatar lpereir4 avatar mdulac avatar monbocal avatar niladic avatar pmombs avatar rebeccadumazert avatar scala-steward avatar simonpineau avatar tanguyyan avatar tibo-aplus avatar tumulte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aplus's Issues

[Bug] Double Validation des demandes : duplicate key value violates unique constraint "application_pkey"

"UnexpectedException: Unexpected exception[PSQLException: ERROR: duplicate key value violates unique constraint "application_pkey"
Detail: Key (id)=(9f953077-154d-4c6a-8d67-0f7d709c1228) already exists.]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:355)
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:261)
at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:429)
at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:421)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:453)
...
(11 additional frame(s) were not displayed)

PSQLException: ERROR: duplicate key value violates unique constraint "application_pkey"
Detail: Key (id)=(REDACTED) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
...
(39 additional frame(s) were not displayed)"

Relecture / Page de stats

En relisant la page de stats, j'ai sorti mon stylo rouge de correcteur. Le plus gros changement est sur l'utilisation du verbe clôturer / clore. Après vérification, c'est un peu plus correcte d'utiliser clore que clôturer.

@jdauphant , je peux prendre en charge les corrections (faire la PR) si tu me pointe le ou les fichiers à modifier

Répartition des demandes :
Close
Consultée
Répondue
Nouvelle

Pertinence des demandes :
Pertinente
Non-pertinente

Temps de résolution :
Temps de résolution médian

Demandes déposées

  • Démo

Demandes closes

  • Demandes closes

Demandes par administration réceptrice (version béta)

Demandes par territoire

  • Total close
  • Total non pertinente

Territoire :

  • Nouvelles demandes
  • Demandes closes non évaluées
  • Demandes closes non utiles
  • Demandes closes utilité inconnue
  • Demandes closes utiles
  • Demandes closes non pertinentes
  • Détail des demandes closes

Option "Répondre et clore" ?

Actuellement en train de gérer le flux des demandes encore ouvertes à fermer, une option "Répondre et clore" permettrait de gagner en fluidité dans l'outil, à la manière de ce qui est proposé sur Github.

Actuellement, je répond à une demande, je suis balancé sur la page toutes les demandes, je dois retrouver la demande que je suis en train de traiter pour l'ouvrir et la clore.

Scala Steward public instance is failing

Hi, I recently went through all the logs for the public Scala Steward jobs and it seems it's failing for your repo:

java.io.IOException: 'sbt -Dsbt.color=false -Dsbt.log.noformat=true -Dsbt.supershell=false ;+ stewardDependencies;reload plugins;stewardDependencies' exited with code 1
[info] welcome to sbt 1.8.0 (Eclipse Adoptium Java 11.0.16.1)
[info] loading global plugins from /root/.sbt/1.0/plugins
[info] compiling 1 Scala source to /root/.sbt/1.0/plugins/target/scala-2.12/sbt-1.0/classes ...
[info] done compiling
[info] loading settings for project aplus-build from plugins.sbt ...
[info] loading project definition from /opt/workspace/repos/betagouv/aplus/project
[warn] 
[warn] 	Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn] 		com.typesafe.sbt:sbt-gzip:1.0.2 (sbtVersion=1.0, scalaVersion=2.12)
[warn] 
[warn] 	Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-gzip;sbtVersion=1.0;scalaVersion=2.12:1.0.2
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-gzip_2.12_1.0/1.0.2/sbt-gzip-1.0.2.pom
[error]   not found: /root/.ivy2/localcom.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[error]   download error: Caught java.net.UnknownHostException (repo.scala-sbt.org) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[error] 	at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:344)
[error] 	at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:313)
[error] 	at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] 	at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:313)
[error] 	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] 	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error] 	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error] 	at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error] 	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] 	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error] 	at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3687)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-gzip;sbtVersion=1.0;scalaVersion=2.12:1.0.2
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-gzip_2.12_1.0/1.0.2/sbt-gzip-1.0.2.pom
[error]   not found: /root/.ivy2/localcom.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[error]   download error: Caught java.net.UnknownHostException (repo.scala-sbt.org) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-gzip/scala_2.12/sbt_1.0/1.0.2/ivys/ivy.xml
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)

	at org.scalasteward.core.io.process$.$anonfun$slurp$9(process.scala:54)
	at org.scalasteward.core.io.process$.$anonfun$slurp$9$adapted(process.scala:50)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at modify @ fs2.internal.Scope.close(Scope.scala:262)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at rethrow$extension @ fs2.Compiler$Target.$anonfun$compile$1(Compiler.scala:157)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Pull$.$anonfun$compile$21(Pull.scala:1209)
	at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:224)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)

Let me know if we can help out with solving it!

[Bug] Demande - sélectionnez une information à ajouter

good 4 me pour les champs optionnels qui devenaient obligatoires.

Si ma curiosité me pousse à ouvrir le menu déroulant de "Ajouter une autre information (facultatif)", une fois que j'ai fait bouger la sélection ailleurs que "sélectionnez une information à ajouter", je ne peux jamais revenir sur l'absence de sélection initiale...

je chipote ? :D

Originally posted by @DanielBMY in #710 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.