1
0
mirror of https://github.com/ae-utbm/sith.git synced 2025-07-09 19:40:19 +00:00
Commit Graph

2365 Commits

Author SHA1 Message Date
4f9d5ae7b1 Revert "[PARTENARIAT] Ajout vitrine d'achat billets eurockéennes 2023 ()"
This reverts commit b12e8dc147.
2023-07-02 18:22:14 +02:00
259337dff1 [FIX] Fix cached groups () 2023-05-12 13:29:16 +02:00
84768eb74e [FIX] Fix cached groups () 2023-05-12 13:27:51 +02:00
8852ef990e [UPDATE] Bump libsass from 0.21.0 to 0.22.0 ()
Bumps [libsass](https://github.com/sass/libsass-python) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/sass/libsass-python/releases)
- [Changelog](https://github.com/sass/libsass-python/blob/main/docs/changes.rst)
- [Commits](https://github.com/sass/libsass-python/compare/0.21.0...0.22.0)

---
updated-dependencies:
- dependency-name: libsass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 14:19:19 +02:00
87295ad9b7 Galaxy improvements ()
* galaxy: improve logging and performance reporting

* galaxy: add a full galaxy state test

* galaxy: optimize user self score computation

* galaxy: add 'generate_galaxy_test_data' command for development at scale

* galaxy: big refactor

Main changes:
  - Multiple Galaxy objects can now exist at the same time in DB. This allows for ruling a new galaxy while still
    displaying the old one.
  - The criteria to quickly know whether a user is a possible citizen is now a simple query on picture count. This
    avoids a very complicated query to database, that could often result in huge working memory load. With this change,
    it should be possible to run the galaxy even on a vanilla Postgres that didn't receive fine tuning for the Sith's
    galaxy.

* galaxy: template: make the galaxy graph work and be usable with a lot of stars

- Display focused star and its connections clearly
- Display star label faintly by default for other stars to avoid overloading the graph
- Hide non-focused lanes
- Avoid clicks on non-highlighted, too far stars
- Make the canva adapt its width to initial screen size, doesn't work dynamically

* galaxy: better docstrings

* galaxy: use bulk_create whenever possible

This is a big performance gain, especially for the tests.

Examples:

----

`./manage.py test galaxy.tests.GalaxyTest.test_full_galaxy_state`

Measurements averaged over 3 run on *my machine*™:
Before: 2min15s
After: 1m41s

----

`./manage.py generate_galaxy_test_data --user-pack-count 1`

Before: 48s
After: 25s

----

`./manage.py rule_galaxy` (for 600 citizen, corresponding to 1 user-pack)

Before: 14m4s
After: 12m34s

* core: populate: use a less ambiguous 'timezone.now()'

When running the tests around midnight, the day is changing, leading to some values being offset to the next day
depending on the timezone, and making some tests to fail. This ensure to use a less ambiguous `now` when populating
the database.

* write more extensive documentation

- add documentation to previously documented classes and functions and refactor some of the documented one, in accordance to the PEP257 and ReStructuredText standards ;
- add some type hints ;
- use a NamedTuple for the `Galaxy.compute_users_score` method instead of a raw tuple. Also change a little bit the logic in the function which call the latter ;
- add some additional parameter checks on a few functions ;
- change a little bit the logic of the log level setting for the galaxy related commands.

* galaxy: tests: split Model and View for more efficient data usage

---------

Co-authored-by: maréchal <thgirod@hotmail.com>
2023-05-10 12:47:02 +02:00
288764b551 Mise à jour d'avril () 2023-05-10 11:56:33 +02:00
5ab5ef681c Remove duplicated css 2023-05-09 23:08:32 +02:00
c9e70889dd Merge branch 'master' into taiste 2023-05-09 22:37:49 +02:00
b30ee0a27a [FIX] Correction de bugs ()
* Fix 

* Fix 

* Fixes & améliorations du nouveau CSS ()

* Fix 

* should fix 

* Fix 

* Update core/views/site.py

Co-Authored-By: thomas girod <56346771+imperosol@users.noreply.github.com>

* Added back the permission denied

* Should fix 

* Fix failing test when 2 user are merged

* Should fix 

* Should fix 

* Should fix 

Block les URLs suivantes lorsque le fichier se trouve dans le dir `profiles` ou `SAS` :
- `/file/<id>/`
- `/file/<id>/[delete|prop|edit]`

> Les urls du SAS restent accessiblent pour les roots & les admins SAS
> Les urls de profiles sont uniquement accessiblent aux roots

* Fix root dir of SAS being unnaccessible for sas admins

⚠️ need to edit the SAS directory & save it (no changes required in sas directory properties)

* Remove overwritten code

* Should fix duplicated albums in user profile (wtf)

* Fix typo

* Extended profiles picture access to board members

* Should fix 

* Fix keyboard navigation not working properly

* Fix user tagged pictures section inside python rather than in the template

* Update utils.py

* Apply suggested changes

* Fix 

* Fix 

* Added back the permission denied

* Should fix duplicated albums in user profile (wtf)

* Fix user tagged pictures section inside python rather than in the template

* Apply suggested changes

---------

Co-authored-by: thomas girod <56346771+imperosol@users.noreply.github.com>
2023-05-02 13:07:36 +02:00
ef968f3673 Better usage of cache for groups and clubs related operations ()
* Better usage of cache for group retrieval

* Cache clearing on object deletion or update

* replace signals by save and delete override

* add is_anonymous check in is_owned_by

Add in many is_owned_by(self, user) methods that user is not anonymous. Since many of those functions do db queries, this should reduce a little bit the load of the db.

* Stricter usage of User.is_in_group

Constrain the parameters that can be passed to the function to make sure only a str or an int can be used. Also force to explicitly specify if the group id or the group name is used.

* write test and correct bugs

* remove forgotten populate commands

* Correct test
2023-05-02 12:36:59 +02:00
96dede5077 Speed up tests () 2023-05-02 11:00:23 +02:00
66fcb76cb5 Merge pull request from ae-utbm/dependabot/pip/taiste/sentry-sdk-1.21.0
[UPDATE] Bump sentry-sdk from 1.19.1 to 1.21.0
2023-04-26 22:17:13 +02:00
63c8e51137 [UPDATE] Bump sentry-sdk from 1.19.1 to 1.21.0
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.19.1 to 1.21.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/1.19.1...1.21.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-26 09:08:06 +00:00
12bec5c553 [UPDATE] Bump django-countries from 7.5 to 7.5.1 ()
Bumps [django-countries](https://github.com/SmileyChris/django-countries) from 7.5 to 7.5.1.
- [Release notes](https://github.com/SmileyChris/django-countries/releases)
- [Changelog](https://github.com/SmileyChris/django-countries/blob/main/CHANGES.rst)
- [Commits](https://github.com/SmileyChris/django-countries/compare/v7.5...v7.5.1)

---
updated-dependencies:
- dependency-name: django-countries
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-26 02:48:04 +02:00
08460a6964 update link for poetry install 2023-04-22 22:29:43 +02:00
b5a40cfda9 Mise à jour de Black vers la version 23.3 () 2023-04-22 15:32:31 +02:00
c78953b036 [UPDATE] Bump cryptography from 37.0.4 to 40.0.1 ()
* [UPDATE] Bump cryptography from 37.0.4 to 40.0.1

Bumps [cryptography](https://github.com/pyca/cryptography) from 37.0.4 to 40.0.1.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/37.0.4...40.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updated pyOpenSSL to match cryptography requirements

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Julien Constant <julienconstant190@gmail.com>
2023-04-20 14:43:46 +02:00
427f7ceaff [UPDATE] Bump django-debug-toolbar from 3.8.1 to 4.0.0 ()
Bumps [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar) from 3.8.1 to 4.0.0.
- [Release notes](https://github.com/jazzband/django-debug-toolbar/releases)
- [Changelog](https://github.com/jazzband/django-debug-toolbar/blob/main/docs/changes.rst)
- [Commits](https://github.com/jazzband/django-debug-toolbar/compare/3.8.1...4.0.0)

---
updated-dependencies:
- dependency-name: django-debug-toolbar
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 21:37:48 +02:00
1055385bcc [UPDATE] Bump dict2xml from 1.7.2 to 1.7.3 ()
Bumps [dict2xml](https://github.com/delfick/python-dict2xml) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/delfick/python-dict2xml/releases)
- [Commits](https://github.com/delfick/python-dict2xml/compare/release-1.7.2...release-1.7.3)

---
updated-dependencies:
- dependency-name: dict2xml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...
2023-04-09 11:38:58 +02:00
c1022642a2 [FIX] Fixes supplémentaires pour la màj de mars ()
- Les photos de l'onglet de la page utilisateur utilise désormais leur version thumbnail au lieu de leur version HD
- Une des classes du CSS du SAS a été renommée car elle empiétait sur une class de la navbar
- Le profil utilisateur a été revu pour ajouter plus d'espacement entre le tableau des cotisations et le numéro de cotisants
- Les images de forum & blouse sont de nouveau cliquable pour les afficher en grands
- Sur mobile, lorsqu'on cliquait sur le premier élément de la navbar, ce dernier avait un overlay avec des angles arrondis
- Sur mobile, les utilisateurs avec des images de profils non carrées dépassait dans l'onglet Famille
2023-04-08 20:59:43 +02:00
910a6f8b34 [FIX] Fixes supplémentaires pour la màj de mars ()
- Les photos de l'onglet de la page utilisateur utilise désormais leur version thumbnail au lieu de leur version HD
- Une des classes du CSS du SAS a été renommée car elle empiétait sur une class de la navbar
- Le profil utilisateur a été revu pour ajouter plus d'espacement entre le tableau des cotisations et le numéro de cotisants
- Les images de forum & blouse sont de nouveau cliquable pour les afficher en grands
- Sur mobile, lorsqu'on cliquait sur le premier élément de la navbar, ce dernier avait un overlay avec des angles arrondis
- Sur mobile, les utilisateurs avec des images de profils non carrées dépassait dans l'onglet Famille
2023-04-08 20:58:55 +02:00
06253f029c [UPDATE] Bump sentry-sdk from 1.12.1 to 1.19.1 () 2023-04-08 18:50:31 +00:00
fa6527b24f [FIX] Deuxième vague de fixes pour la mise à jour de mars () 2023-04-06 16:09:29 +02:00
0501e6417a Merge branch 'master' into taiste 2023-04-05 20:02:12 +02:00
a198f5252d Fixes & améliorations du nouveau CSS () 2023-04-05 18:03:43 +02:00
d83842af27 Fix problème de cache dans le SAS & améliore le CSS du SAS
Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
2023-04-05 14:32:32 +02:00
f605f7dcc6 Fixes pour la mise à jour de mars () 2023-04-04 22:55:26 +02:00
e638bc04ed Fixes pour la mise à jour de mars () 2023-04-04 22:50:19 +02:00
4830c3ea2d Mise à jour de mars ()
---------

Co-authored-by: Thomas Girod <thgirod@hotmail.com>
Co-authored-by: Théo DURR <git@theodurr.fr>
2023-04-04 19:17:44 +02:00
8e7c025e47 [FIX] Broken link in readme and license fix (& update) () 2023-04-04 18:39:45 +02:00
1bfe929ab3 [CSS] Follow up of () 2023-04-04 15:21:09 +02:00
93cc2c883e Bump django from 3.2.16 to 3.2.18 () 2023-04-04 10:16:55 +02:00
44290a20a6 Create dependabot.yml () 2023-04-03 17:18:16 +02:00
1f10a284f2 Added GA/Clubs Google Calendar to main page ()
* Added GA/Clubs google calendar to main page

* Made tables full width
2023-04-03 15:54:12 +02:00
28f397574f Amélioration des pages utilisateurs pour les petits écrans (, )
- Refonte de l'organisation des pages utilisateurs (principalement du front)
  - Page des parrains/fillots
  - Page d'édition du profil
  - Page du profil
  - Page des outils
  - Page des préférences
  - Page des stats utilisateurs

- Refonte du CSS / organisation de la navbar principale (en haut de l'écran)
- Refonte du CSS de la navbar bleu clair (le menu)
- Refonte du CSS du SAS :
  - Page de photo
  - Page d'albums
2023-03-30 14:38:40 +02:00
6c1fa6de0b remove-useless-queries-counter-stats () 2023-03-24 15:32:05 +01:00
f0a08afd31 Merge branch 'repair_NaN_bug_on_click' into taiste 2023-03-10 10:50:26 +01:00
982fc09908 Repair NaN bug for autocomplete on counter click ()
* Repair NaN bug for autocomplete on counter click
2023-03-10 10:49:14 +01:00
9e0b5b0b82 Merge branch 'partenariat-eurocks' into taiste 2023-03-09 17:14:34 +01:00
b12e8dc147 [PARTENARIAT] Ajout vitrine d'achat billets eurockéennes 2023 ()
* Added eurocks links to eboutic
2023-03-09 17:13:45 +01:00
25c5a3297c Repair NaN bug for autocomplete on counter click 2023-03-09 14:21:12 +01:00
dd3ad42eb5 Mise à jour de février ()
Co-authored-by: Thomas Girod <thgirod@hotmail.com>
Co-authored-by: Julien Constant <julienconstant190@gmail.com>
Co-authored-by: Skia <skia@hya.sk>
2023-03-09 13:39:33 +01:00
5ea181829e Edited unit tests
This test caused a breach in security due to the alert block displaying sensitive data.
2023-03-08 20:47:59 +01:00
0cf203669f fix wording
Co-authored-by: Théo DURR <git@theodurr.fr>
2023-03-08 20:35:24 +01:00
559bfcac60 fix typo 2023-03-08 20:13:12 +01:00
db8a1ed0ab Added eurocks links to eboutic 2023-03-08 20:10:54 +01:00
16150905a0 Fixed broken test 2023-03-08 14:11:10 +01:00
9a376887ac Update 404.jinja 2023-03-08 13:08:23 +01:00
773808fa59 Disabled Galaxy button & Removed 404 exception display 2023-03-08 12:50:52 +01:00
c1e59a0676 Disabled galaxy feature (only visually) 2023-03-07 21:32:37 +01:00