Commit ee9ddef2 authored by Tanguy Le Carrour's avatar Tanguy Le Carrour
Browse files

Renomme le projet en 'Néobab' et le paquet Python en 'neobab'.

* Met à jour les notices de licence ;
* Met à jour les imports ;
* Met à jour les instructions d'installation et de contribution ;
* Met à jour la liste des données à ignorer.
parent b9256f35
......@@ -3,10 +3,9 @@
dist/
data/attachements/
data/sessions/
mysql_datadir/
ehess_baobab2.egg-info/
*.pyc
*.mo
TODO.md
ehess_baobab2/static/translations/*.js
ehess_baobab2/static/css/custom.css
neobab/static/translations/*.js
neobab/static/css/custom.css
development.ini
......@@ -41,9 +41,9 @@ Pour créer un paquet Python :
Pour générer une nouvelle migration après une modification du schéma :
$ baobab config.ini revision add "Description du changement"
$ neobab config.ini revision add "Description du changement"
$ # la passer en revue
$ baobab config.ini db migrate
$ neobab config.ini db migrate
## Gestion des traductions
......@@ -54,7 +54,7 @@ Quand des chaînes à traduire ont été rajoutées dans le code, il faut les ex
Il faut ensuite procéder à leur traduction avec, par exemple, [Poedit][] :
$ poedit ehess_baobab2/locale/fr_FR/LC_MESSAGES/ehess-baobab2.po
$ poedit neobab/locale/fr_FR/LC_MESSAGES/neobab.po
Poedit devrait générer la version compilée (`.mo`), mais cela peut aussi être fait
manuellement.
......
This diff is collapsed.
Néobab --- Gestion des enseignements
Copyright © 2020, 2021 EHESS, Easter-Eggs
This file is part of Néobab.
Néobab is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Néobab is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
......@@ -2,17 +2,9 @@
## Installation
Malheureusement, tous les paquets nécessaires à l'installation de Néobab ne sont pas (encore)
disponibles sur PyPI. Il faut donc les installer manuellement avant d'installer Néobab :
$ pip install -U pip setuptools
$ pip install wheel
$ pip install https://pypi.easter-eggs.com/ee/packages/pyramid_helpers-1.2-py3-none-any.whl#md5=57f3387205fd50f348224f07c206b9cb
$ pip install https://pypi.easter-eggs.com/ee/packages/PyCAS-0.6-py3-none-any.whl#md5=dabe2898e219c3ec31547720636a13d4
On peut ensuite installer l'application :
$ pip install ehess-baobab2-0.1.5.tar.gz
$ pip install neobab
En fonction de votre environnement, il faudra choisir et installer un pilote pour
la base de données :
......@@ -45,7 +37,7 @@ Les variables suivantes devraient être mise à jour :
Une fois l'application configurée, il faut initialiser la base de données :
$ baobab config.ini db init
$ neobab config.ini db init
## Lancement
......@@ -63,8 +55,8 @@ Il est possible, pour des besoins de tests, de la démarrer avec la commande sui
Il est conseillé de faire une sauvegarde des données avant la mise à jour du schéma
de la base de données.
$ pip install --upgrade ehess-baobab2-XXX.tar.gz
$ baobab config.ini db migrate
$ pip install --upgrade neobab
$ neobab config.ini db migrate
$ # redémarrer l'application pour que le nouveau code soit pris en compte
......
......@@ -3,14 +3,14 @@
pipeline = neobab
[app:neobab]
use = egg:ehess_baobab2
use = egg:neobab
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
mako.directories =
ehess_baobab2:templates
neobab:templates
pyramid_helpers:templates
session.type = file
session.data_dir = %(here)s/data/sessions/data
......@@ -24,9 +24,9 @@ i18n.enabled = true
i18n.available_languages = fr_FR
i18n.default_locale_name = fr_FR
i18n.directories =
ehess_baobab2:locale
neobab:locale
formencode:i18n
i18n.domain = ehess-baobab2
i18n.domain = neobab
sqlalchemy.url = sqlite:///%(here)s/db.sqlite
data_dir = %(here)s/data/attachements
; Si `ldap.server` n'est pas renseigné, les appels à LDAP échoueront, ce qui évitera
......@@ -48,7 +48,7 @@ smtp.test = no-reply@neobab.fr
app_url = https://www.neobab.fr
[filter:maintenance]
use = egg:ehess_baobab2#middleware
use = egg:neobab#middleware
neobab.maintenance = false
[filter:app-auth-cas]
......@@ -76,16 +76,16 @@ host = 0.0.0.0
port = 6543
[loggers]
keys = root, ehess_baobab2, sqlalchemy
keys = root, neobab, sqlalchemy
[logger_root]
level = DEBUG
handlers = console
[logger_ehess_baobab2]
[logger_neobab]
level = DEBUG
handlers =
qualname = ehess_baobab2
qualname = neobab
[logger_sqlalchemy]
level = INFO
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2019, 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import logging
import pkg_resources
......@@ -26,9 +26,9 @@ from pyramid.config import Configurator
from pyramid.events import BeforeRender, NewRequest
from pyramid_beaker import session_factory_from_settings
from ehess_baobab2.resources import RootFactory
from ehess_baobab2.ldap import build_user_directory
from ehess_baobab2.email import ServiceSmtp, ServiceCourriel
from neobab.resources import RootFactory
from neobab.ldap import build_user_directory
from neobab.email import ServiceSmtp, ServiceCourriel
__version__ = pkg_resources.get_distribution(__name__).version
......@@ -55,7 +55,7 @@ def main(global_config, **settings):
config.add_subscriber(add_get_email_service(settings), NewRequest)
config.add_subscriber(add_get_public_queries(settings), NewRequest)
config.add_static_view("static", "ehess_baobab2:static", cache_max_age=3600)
config.add_static_view("static", "neobab:static", cache_max_age=3600)
config.add_route("favicon.ico", "/favicon.ico")
config.add_route("robots.txt", "/robots.txt")
......@@ -330,7 +330,7 @@ def main(global_config, **settings):
config.add_route("public.formations", "/{annee}/formations")
config.add_route("public.formation", "/{annee}/formations/{id}")
config.scan("ehess_baobab2.views")
config.scan("neobab.views")
return config.make_wsgi_app()
......@@ -342,7 +342,7 @@ def add_app_version(event):
def add_get_public_queries(settings):
def subscribe_to(event):
def get_public_queries():
from ehess_baobab2.models.repositories import RequetesPubliques
from neobab.models.repositories import RequetesPubliques
return RequetesPubliques(settings["sqlalchemy.url"])
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import datetime
from abc import ABC, abstractmethod
from ehess_baobab2.models import ValidationsMaster
from neobab.models import ValidationsMaster
class IntervenantDejaPresent(Exception):
......
#
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Néobab.
#
# Néobab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Néobab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import logging
import smtplib
from email.message import EmailMessage
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
class ToDictFormatter:
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2019 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema
from pyramid_helpers.forms.validators import DateTime
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2019 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2019, 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema, ForEach, validators
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema, ForEach, validators
from ehess_baobab2.models.entities import Formation
from neobab.models.entities import Formation
class EditerFormation(Schema):
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema, ForEach, validators
from pyramid_helpers.forms.validators import DateTime
from ehess_baobab2.models.entities import Intervenant
from neobab.models.entities import Intervenant
class CreerIntervenant(Schema):
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema, ForEach, validators
from ehess_baobab2.models.entities import (
from neobab.models.entities import (
Centre,
Domaine,
Materiel,
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from formencode import Schema, validators
from ehess_baobab2.models.entities import Page
from neobab.models.entities import Page
class EditerPage(Schema):
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2019, 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import re
import html
......@@ -26,9 +26,9 @@ from unidecode import unidecode
from ldap3.core.exceptions import LDAPSocketOpenError
from ehess_baobab2.ldap import LdapNotConfigured
from ehess_baobab2.models import Profils, StatutsFicheUe, StatutsPlanning
from ehess_baobab2.models.entities import (
from neobab.ldap import LdapNotConfigured
from neobab.models import Profils, StatutsFicheUe, StatutsPlanning
from neobab.models.entities import (
AnneeUniversitaire,
FicheUe,
Formation,
......@@ -36,7 +36,7 @@ from ehess_baobab2.models.entities import (
PlageHoraire,
Utilisateur,
)
from ehess_baobab2.models.repositories import (
from neobab.models.repositories import (
AiresCulturelles,
AnneesUniversitaires,
Centres,
......
# Baobab2
# By: Tanguy Le Carrour <tlecarrour@easter-eggs.com>
#
# Copyright (C) 2020 EHESS, Easter-eggs
# Néobab --- Gestion des enseignements
# Copyright © 2020, 2021 EHESS, Easter-Eggs
#
# This file is part of Baobab2
# This file is part of obab.
#
# Baobab is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# obab is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Baobab is distributed in the hope that it will be useful,
# obab is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU Affero General Public License