Skip to content
Snippets Groups Projects
Verified Commit 36247f34 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Build pypi package and reformat

parent 5c27658f
No related branches found
No related tags found
1 merge request!50Build pypi package and reformat. AlekSIS/official/AlekSIS-Core#317
Pipeline #4420 passed
...@@ -5,3 +5,5 @@ include: ...@@ -5,3 +5,5 @@ include:
file: /ci/test.yml file: /ci/test.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/build_dist.yml file: /ci/build_dist.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/deploy_pypi.yml
...@@ -75,10 +75,7 @@ class FeedbackForm(forms.Form): ...@@ -75,10 +75,7 @@ class FeedbackForm(forms.Form):
) )
performance_rating = forms.ChoiceField( performance_rating = forms.ChoiceField(
label=_("Speed"), label=_("Speed"), choices=ratings, widget=forms.RadioSelect(), required=True,
choices=ratings,
widget=forms.RadioSelect(),
required=True,
) )
usability_rating = forms.ChoiceField( usability_rating = forms.ChoiceField(
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
from rules import add_perm from rules import add_perm
from aleksis.core.util.predicates import ( from aleksis.core.util.predicates import has_global_perm, has_person, is_site_preference_set
has_global_perm,
has_person,
is_site_preference_set,
)
# Show Hjelp menu # Show Hjelp menu
show_hjelp_menu = is_site_preference_set("hjelp", "public_faq") | ( show_hjelp_menu = is_site_preference_set("hjelp", "public_faq") | (
has_person & has_person
( & (
has_global_perm("hjelp.view_faq") | has_global_perm("hjelp.view_faq")
has_global_perm("hjelp.ask_faq") | | has_global_perm("hjelp.ask_faq")
has_global_perm("hjelp.report_issue") | | has_global_perm("hjelp.report_issue")
has_global_perm("hjelp.send_feedback") | has_global_perm("hjelp.send_feedback")
) )
) )
add_perm("hjelp.show_menu", show_hjelp_menu) add_perm("hjelp.show_menu", show_hjelp_menu)
......
...@@ -104,10 +104,14 @@ def report_issue(request): ...@@ -104,10 +104,14 @@ def report_issue(request):
# Send mail # Send mail
context = { context = {
"categories": add_arrows([category_1, category_2, category_3, free_text, ]), "categories": add_arrows(
"categories_single": [category_1, category_2, category_3, free_text,]
(element for element in [category_1, category_2, category_3, free_text, ] ),
if element and element != "None"), "categories_single": (
element
for element in [category_1, category_2, category_3, free_text,]
if element and element != "None"
),
"short_description": short_description, "short_description": short_description,
"long_description": long_description, "long_description": long_description,
"user": request.user, "user": request.user,
......
This diff is collapsed.
...@@ -23,9 +23,14 @@ classifiers = [ ...@@ -23,9 +23,14 @@ classifiers = [
"Typing :: Typed", "Typing :: Typed",
] ]
[[tool.poetry.source]]
name = "gitlab"
url = "https://edugit.org/api/v4/projects/461/packages/pypi/simple"
secondary = true
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.7" python = "^3.7"
AlekSIS = { git = "https://edugit.org/AlekSIS/official/AlekSIS" } aleksis-core = "^2.0a3.dev0+20201114132749.88d92354"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
sphinx = "^3.0" sphinx = "^3.0"
......
...@@ -22,9 +22,9 @@ setenv = ...@@ -22,9 +22,9 @@ setenv =
[testenv:lint] [testenv:lint]
commands = commands =
- poetry run black --check --diff aleksis/ --exclude "migrations" - poetry run black --check --diff aleksis/
- poetry run isort -c --diff --stdout -rc -s migrations aleksis/ - poetry run isort -c --diff --stdout aleksis/
- poetry run flake8 {posargs} --exclude-from-doctest migrations aleksis/ poetry run flake8 {posargs} aleksis/
[testenv:security] [testenv:security]
commands = commands =
...@@ -40,7 +40,7 @@ commands = poetry run make -C docs/ html {posargs} ...@@ -40,7 +40,7 @@ commands = poetry run make -C docs/ html {posargs}
[testenv:reformat] [testenv:reformat]
commands = commands =
poetry run isort -rc aleksis/ poetry run isort aleksis/
poetry run black aleksis/ poetry run black aleksis/
[flake8] [flake8]
...@@ -52,10 +52,10 @@ ignore = BLK100,E203,E231,W503,D100,D101,D102,D103,D104,D105,D106,D107,RST215,RS ...@@ -52,10 +52,10 @@ ignore = BLK100,E203,E231,W503,D100,D101,D102,D103,D104,D105,D106,D107,RST215,RS
line_length = 100 line_length = 100
multi_line_output = 3 multi_line_output = 3
include_trailing_comma = 1 include_trailing_comma = 1
use_parantheses = 1
default_section = THIRDPARTY default_section = THIRDPARTY
known_first_party = aleksis known_first_party = aleksis
known_django = django known_django = django
skip = migrations
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[mypy] [mypy]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment