Un répertoire collaboratif des noms de rues du canton de Genève. | Read-only mirror of https://github.com/republique-et-canton-de-geneve/noms-geographiques — République et canton de Genève. Issues & pull requests at the source.
  • Twig 58.4%
  • CSS 28.5%
  • php 7.5%
  • JavaScript 2.9%
  • SCSS 2%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-07 17:17:34 +02:00
.github/workflows Update SonarCloud workflow configuration 2026-08-07 17:13:55 +02:00
config Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
docker Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
features/bootstrap Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
htdocs fix: #36 - Update translations. 2026-07-22 14:32:18 +02:00
images Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
media Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
ngeo_assets Stop tracking htaccess files from htdocs. 2026-07-22 11:33:13 +02:00
node_modules Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
patches Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
tests Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
.editorconfig Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
.gitattributes Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
.gitignore Stop tracking htaccess files from htdocs. 2026-07-22 11:33:13 +02:00
CODE_OF_CONDUCT.md Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
composer.json Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
composer.lock Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
CONTRIBUTING.md Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
drupal-fresh-install.dump Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
LICENSE Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
psalm.xml Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
README.md Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00
sonar-project.properties Correction de sonar.organization 2026-08-07 17:17:34 +02:00
yarn.lock Clean initial commit (history removed) 2026-07-22 10:51:52 +02:00

NGEO

Un répertoire collaboratif des noms de rues du canton de Genève.

Analyse SonarCloud :

Bugs Vulnerabilities Code Smells Duplicated Lines (%) Coverage

Licence :

License: AGPL v3

Page d'accueil

Prérequis

Docker ou Docker desktop.

Installation

Installation basée sur la ligne de commande PowerShell, à l'exception des commandes git faites via Git Bash.

Récupérer le projet Git

Copier l'URL dans Github :

Github clone project

Cloner le projet chez soi :

$ git clone https://github.com/republique-et-canton-de-geneve/noms-geographiques.git

Préparer l'environnement local

Modifier le fichier hosts de la machine hôte (C:\Windows\System32\drivers\etc\hosts) :

127.0.0.1  noms-geographiques.local.ge.ch
127.0.0.1  cmsadmin-noms-geographiques.local.ge.ch
127.0.0.1  portainer.ngeo.local.ge.ch
127.0.0.1  pma.noms-geographiques.local.ge.ch
127.0.0.1  webgrind.ngeo.local.ge.ch
127.0.0.1  mailhog.noms-geographiques.local.ge.ch
127.0.0.1  idp.ngeo.local.ge.ch

Lancer le projet Docker :

cd 10677-ngeo/docker
docker-compose -p ngeo up -d

Se connecter au conteneur PHP :

cd 10677-ngeo/docker
docker exec -it ngeo_php /bin/sh

Initialisation Drupal

Aller voir le site : En Anonyme: http://noms-geographiques.local.ge.ch:8099/ Mode Connecté : http://cmsadmin-noms-geographiques.local.ge.ch:8099/ => les comptes SAML locaux sont décrits dans le fichier {project_root}/docker/comptes_locaux_saml.php

Composer

Exécuter les commandes composer souhaitées. Ex :

# pour lancer l'installation des 'vendor' qui ne seraient pas présents :
$ composer install

# pour ajouter un module drupal contrib ou autre composant (--dev si c'est un composant utile au développement, ex devel)
$ composer require drupal/mon-module

# avoir un statut sur les composants drupal
$ composer outdated 'drupal/*'

# faire une mise à jour => cf les bonnes pratiques de mise à jour (todo wiki ?)
$ composer update drupal/mon-module-a-mettre-a-jour

Développement NGEO : bon à savoir

Titres de page

Pour ne pas utiliser le bloc de titre proposé de base dans les différentes pages :

  1. Aller sur : Structure > Mise en page des blocs.
  2. Bloc "Titre de page": configurer.
  3. Dépend du type de page, mais paramétrer ici pour le désactiver. Exemple : /search => aller sur Page.
  4. Sauvegarder.

Vérification du code

PHPCS

PHP CodeSniffer sert à vérifier si les standards de code Drupal sont respectés.

  1. Ajout de Coder via composer :
    composer update --prefer-source drupal/coder
    
  2. Ajouter les dossiers pour les standards de code Drupal :
    phpcs --config-set installed_paths /var/www/html/vendor/drupal/coder/coder_sniffer,/var/www/html/vendor/sirbrillig/phpcs-variable-analysis,/var/www/html/vendor/slevomat/coding-standard
    
  3. Tester si tout est bien configuré :
    php vendor/bin/phpcs -i
    
  4. Tester le code (ici : dans le module 'ngeo_core') :
    php vendor/bin/phpcs --standard=Drupal,DrupalPractice htdocs/modules/custom/ngeo_core
    
  5. Corriger le code automatiquement avec phpcbf (ici : dans le module 'ngeo_core') :
    php vendor/bin/phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md htdocs/modules/custom/ngeo_core
    
    

Contributeurs

Avatar e-mail adress
Didier.Beux didier.beux@etat.ge.ch
Auriana.Hug auriana.hug@etat.ge.ch
Benjamin.Roy benjamin.roy@etat.ge.ch
Kévin.Notari kevin.notary@etat.ge.ch
Zeqiri.Erblin erblin.zeqiri@etat.ge.ch