diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3f96014ce44731b99564ecdd3c33ee1403010e3..6873363a8abe95c0196fae3662dc5cc67311ac09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,14 +9,6 @@ cache: paths: - .cache -docformatter: - stage: linting - image: python:3 - before_script: - - pip3 install -U pip docformatter - script: - - docformatter --check -r . - black: stage: linting image: python:3 @@ -40,3 +32,11 @@ flake8: - pip3 install -U pip flake8 script: - flake8 . + +check-manifest: + stage: linting + image: python:3 + before_script: + - pip3 install -U pip check-manifest + script: + - check-manifest . diff --git a/.install-hooks.sh b/.install-hooks.sh index d95267ecf73e48947d916d83b8b2bbf6ee7382bd..2e423ff1aceb44b2b2563a9ec548c770dba9a924 100755 --- a/.install-hooks.sh +++ b/.install-hooks.sh @@ -10,7 +10,6 @@ fi echo "#!/bin/sh" >> $GIT_DIR/hooks/pre-commit echo "set -e" >> $GIT_DIR/hooks/pre-commit echo "source $VENV_ACTIVATE" >> $GIT_DIR/hooks/pre-commit -echo "docformatter --check -r ." >> $GIT_DIR/hooks/pre-commit echo "black --check ." >> $GIT_DIR/hooks/pre-commit echo "isort -c ." >> $GIT_DIR/hooks/pre-commit echo "flake8 ." >> $GIT_DIR/hooks/pre-commit diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d5b8e3e89609ac7ea676521a733a9374b60c42c..82e9f3431bd890f9664ccf40b6a0bbd3cc8fc84a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Apply updated pretix plugin cookiecutter ## [1.5.0] - 2022-10-09 ### Added @@ -60,6 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Configuration panel - Ask for Matrix ID in selected products - Invite Pretix participants to configured Matrix room +- <!-- markdownlint-disable-file MD022--> +- <!-- markdownlint-disable-file MD024--> +- <!-- markdownlint-disable-file MD032--> [1.5.0]: https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/compare/v1.4.1...v1.5.0 [1.4.1]: https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/compare/v1.4.0...v1.4.1 @@ -71,7 +76,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [1.2.0]: https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/compare/v1.1.0...v1.2.0 [1.1.0]: https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/compare/v1.0.0...v1.1.0 [1.0.0]: https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/tags/v1.0.0 - -<!-- markdownlint-disable-file MD022--> -<!-- markdownlint-disable-file MD024--> -<!-- markdownlint-disable-file MD032--> diff --git a/LICENSE b/LICENSE index 57c3a03abab36ff14012542061aa0b578ff645b4..4236d08fe5d1fdb1cebfd7ceab3d6951f54d4ce6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Felix Schäfer +Copyright (c) 2022-2023 Felix Schäfer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index db6b6463399a2423bda90b83f90094b35c181e33..2aae08e9dc50ec8ff53d60074ca0b6189e9fbc4e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Matrix Inviter +# Pretix Matrix Inviter This is a plugin for [pretix](https://github.com/pretix/pretix). @@ -36,18 +36,16 @@ invited to. This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed: - pip install flake8 isort black docformatter + pip install flake8 isort black To check your plugin for rule violations, run: - docformatter --check -r . black --check . isort -c . flake8 . You can auto-fix some of these issues by running: - docformatter -r . isort . black . @@ -56,6 +54,6 @@ To automatically check for these issues before you commit, you can run ## License -Copyright 2022 Felix Schäfer +Copyright 2022-2023 Felix Schäfer Released under the terms of the MIT License diff --git a/pretix_matrix_inviter/__init__.py b/pretix_matrix_inviter/__init__.py index cb429b1a81addca77a2fb28aa1ba767af4ab9be7..5b601886131b044f9738fb1a32022bb045a52787 100644 --- a/pretix_matrix_inviter/__init__.py +++ b/pretix_matrix_inviter/__init__.py @@ -1,30 +1 @@ -from django.utils.translation import gettext_lazy - -try: - from pretix.base.plugins import PluginConfig -except ImportError: - raise RuntimeError("Please use pretix 2.7 or above to run this plugin!") - __version__ = "1.5.0" - - -class PluginApp(PluginConfig): - name = "pretix_matrix_inviter" - verbose_name = "Matrix inviter" - - class PretixPluginMeta: - name = gettext_lazy("Matrix inviter") - author = "Felix Schäfer" - description = gettext_lazy( - "Invite Pretix participants to a Matrix Room or Space." - ) - visible = True - version = __version__ - category = "FEATURE" - compatibility = "pretix>=2.7.0" - - def ready(self): - from . import signals # NOQA - - -default_app_config = "pretix_matrix_inviter.PluginApp" diff --git a/pretix_matrix_inviter/apps.py b/pretix_matrix_inviter/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..bc7273d1a66ea65503216d394723cac0f80462ab --- /dev/null +++ b/pretix_matrix_inviter/apps.py @@ -0,0 +1,28 @@ +from django.utils.translation import gettext_lazy + +from . import __version__ + +try: + from pretix.base.plugins import PluginConfig +except ImportError: + raise RuntimeError("Please use pretix 2.7 or above to run this plugin!") + + +class PluginApp(PluginConfig): + default = True + name = "pretix_matrix_inviter" + verbose_name = "Pretix Matrix Inviter" + + class PretixPluginMeta: + name = gettext_lazy("Pretix Matrix Inviter") + author = "Felix Schäfer" + description = gettext_lazy( + "Invite Pretix participants to a Matrix Room or Space." + ) + visible = True + version = __version__ + category = "FEATURE" + compatibility = "pretix>=2.7.0" + + def ready(self): + from . import signals # NOQA diff --git a/pretixplugin.toml b/pretixplugin.toml new file mode 100644 index 0000000000000000000000000000000000000000..eac8f95a5df6886b23981e87ccabe45360460ea1 --- /dev/null +++ b/pretixplugin.toml @@ -0,0 +1,5 @@ +[plugin] +package = "pretix-matrix-inviter" +modules = [ "pretix_matrix_inviter" ] +marketplace_name = "matrix-inviter" + diff --git a/setup.cfg b/setup.cfg index ff57bd59a9fe4433e1b82638c3f3f3ac11f1594b..b445915a6763d395e205488f678c6d0a3513ec48 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,6 +36,9 @@ exclude_lines = ignore = .update-locales.sh .install-hooks.sh + pretixplugin.toml Makefile manage.py tests/* + *.po + .gitkeep