Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Matrix
Commits
259f5387
Commit
259f5387
authored
1 year ago
by
Jonathan Weth
Browse files
Options
Downloads
Plain Diff
Merge branch 'check/update-pyproject-toml' into 'master'
Update pyproject.toml See merge request
!29
parents
1590781b
e5275fe8
No related branches found
No related tags found
1 merge request
!29
Update pyproject.toml
Pipeline
#137908
passed with warnings
1 year ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Pipeline: AlekSIS
#137923
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/matrix/models.py
+22
-13
22 additions, 13 deletions
aleksis/apps/matrix/models.py
pyproject.toml
+50
-14
50 additions, 14 deletions
pyproject.toml
with
72 additions
and
27 deletions
aleksis/apps/matrix/models.py
+
22
−
13
View file @
259f5387
...
...
@@ -30,6 +30,13 @@ class MatrixProfile(ExtensibleModel):
change_tracker
=
FieldTracker
()
class
Meta
:
verbose_name
=
_
(
"
Matrix profile
"
)
verbose_name_plural
=
_
(
"
Matrix profiles
"
)
def
__str__
(
self
):
return
self
.
matrix_id
@classmethod
def
build_matrix_id
(
cls
,
username
:
str
,
homeserver
:
Optional
[
str
]
=
None
)
->
str
:
"""
Build a Matrix ID from a username.
"""
...
...
@@ -52,10 +59,6 @@ class MatrixProfile(ExtensibleModel):
new_profile
.
save
()
return
new_profile
class
Meta
:
verbose_name
=
_
(
"
Matrix profile
"
)
verbose_name_plural
=
_
(
"
Matrix profiles
"
)
class
MatrixRoom
(
ExtensiblePolymorphicModel
):
"""
Model for a Matrix room.
"""
...
...
@@ -71,6 +74,14 @@ class MatrixRoom(ExtensiblePolymorphicModel):
change_tracker
=
FieldTracker
([
"
group_id
"
])
class
Meta
:
verbose_name
=
_
(
"
Matrix room
"
)
verbose_name_plural
=
_
(
"
Matrix rooms
"
)
permissions
=
((
"
provision_group_in_matrix
"
,
"
Can provision group in Matrix
"
),)
def
__str__
(
self
):
return
self
.
room_id
@classmethod
def
get_queryset
(
cls
):
"""
Get a queryset for only Matrix rooms.
"""
...
...
@@ -267,17 +278,19 @@ class MatrixRoom(ExtensiblePolymorphicModel):
if
get_site_preferences
()[
"
matrix__use_spaces
"
]:
self
.
sync_space
()
class
Meta
:
verbose_name
=
_
(
"
Matrix room
"
)
verbose_name_plural
=
_
(
"
Matrix rooms
"
)
permissions
=
((
"
provision_group_in_matrix
"
,
"
Can provision group in Matrix
"
),)
class
MatrixSpace
(
MatrixRoom
):
children
=
models
.
ManyToManyField
(
to
=
MatrixRoom
,
verbose_name
=
_
(
"
Child rooms/spaces
"
),
blank
=
True
,
related_name
=
"
parents
"
)
class
Meta
:
verbose_name
=
_
(
"
Matrix space
"
)
verbose_name_plural
=
_
(
"
Matrix spaces
"
)
def
__str__
(
self
):
return
self
.
room_id
@classmethod
def
get_queryset
(
cls
):
"""
Get a queryset with only Matrix spaces.
"""
...
...
@@ -355,7 +368,3 @@ class MatrixSpace(MatrixRoom):
self
.
ensure_children
()
self
.
sync_children
()
self
.
sync_profiles
()
class
Meta
:
verbose_name
=
_
(
"
Matrix space
"
)
verbose_name_plural
=
_
(
"
Matrix spaces
"
)
This diff is collapsed.
Click to expand it.
pyproject.toml
+
50
−
14
View file @
259f5387
...
...
@@ -9,10 +9,7 @@ include = ["CHANGELOG.rst", "LICENCE.rst", "aleksis/**/*.mo"]
description
=
"AlekSIS (School Information System) — App Matrix (Integration with Matrix/Element)"
authors
=
[
"Jonathan Weth <dev@jonathanweth.de>"
]
maintainers
=
[
"Jonathan Weth <wethjo@katharineum.de>"
,
"Dominik George <dominik.george@teckids.org>"
]
maintainers
=
[
"Jonathan Weth <dev@jonathanweth.de>"
,
"Dominik George <dominik.george@teckids.org>"
]
license
=
"EUPL-1.2-or-later"
homepage
=
"https://aleksis.org"
repository
=
"https://edugit.org/AlekSIS/official/AlekSIS-App-Matrix"
...
...
@@ -25,29 +22,68 @@ classifiers = [
"Typing :: Typed"
,
]
[[tool.poetry.source]]
name
=
"PyPI"
priority
=
"primary"
[[tool.poetry.source]]
name
=
"gitlab"
url
=
"https://edugit.org/api/v4/projects/461/packages/pypi/simple"
secondary
=
true
priority
=
"supplemental"
[tool.poetry.dependencies]
python
=
"^3.9"
aleksis-core
=
"^3.0"
[tool.poetry.dev-dependencies]
aleksis-builddeps
=
">
=
2023.1
.dev
0
"
matrix-synapse
=
"^1.49.2"
pytest-xprocess
=
"^0.19.0"
pytest-mock
=
"^3.7.0"
[tool.poetry.plugins."aleksis.app"]
matrix
=
"aleksis.apps.matrix.apps:DefaultConfig"
[tool.poetry.group.dev.dependencies]
django-stubs
=
"^4.2"
safety
=
"^2.3.5"
flake8
=
"^6.0.0"
flake8-django
=
"^1.0.0"
flake8-fixme
=
"^1.1.1"
flake8-mypy
=
"^17.8.0"
flake8-bandit
=
"^4.1.1"
flake8-builtins
=
"^2.0.0"
flake8-docstrings
=
"^1.5.0"
flake8-rst-docstrings
=
"^0.3.0"
black
=
">
=
21.0
"
flake8-black
=
"^0.3.0"
isort
=
"^5.0.0"
flake8-isort
=
"^6.0.0"
curlylint
=
"^0.13.0"
[tool.poetry.group.test.dependencies]
pytest
=
"^7.2"
pytest-django
=
"^4.1"
pytest-django-testing-postgresql
=
"^0.2"
pytest-cov
=
"^4.0.0"
pytest-sugar
=
"^0.9.2"
selenium
=
"<4.10.0"
freezegun
=
"^1.1.0"
[tool.poetry.group.docs]
optional
=
true
[tool.poetry.group.docs.dependencies]
sphinx
=
"^7.0"
sphinxcontrib-django
=
"^2.3.0"
sphinxcontrib-svg2pdfconverter
=
"^1.1.1"
sphinx-autodoc-typehints
=
"^1.7"
sphinx_material
=
"^0.0.35"
[tool.black]
line-length
=
100
exclude
=
"/migrations/"
[build-system]
requires
=
["poetry>
=
1.0
"]
build-backend
=
"poetry.masonry.api"
requires
=
["poetry
-core
>
=
1.0
.
0
"]
build-backend
=
"poetry.
core.
masonry.api"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment