From 0b48bb178ce65d595bcb2a1d0b73953e928969f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net>
Date: Wed, 8 Feb 2023 12:07:51 +0100
Subject: [PATCH] Apply updateded pretix plugin cookiecutter

https://github.com/pretix/pretix-plugin-cookiecutter
---
 .gitlab-ci.yml                    | 16 ++++++++--------
 .install-hooks.sh                 |  1 -
 CHANGELOG.md                      |  9 +++++----
 LICENSE                           |  2 +-
 README.md                         |  8 +++-----
 pretix_matrix_inviter/__init__.py | 29 -----------------------------
 pretix_matrix_inviter/apps.py     | 28 ++++++++++++++++++++++++++++
 pretixplugin.toml                 |  5 +++++
 setup.cfg                         |  3 +++
 9 files changed, 53 insertions(+), 48 deletions(-)
 create mode 100644 pretix_matrix_inviter/apps.py
 create mode 100644 pretixplugin.toml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b3f9601..6873363 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 d95267e..2e423ff 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 2d5b8e3..82e9f34 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 57c3a03..4236d08 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 db6b646..2aae08e 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 cb429b1..5b60188 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 0000000..bc7273d
--- /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 0000000..eac8f95
--- /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 ff57bd5..b445915 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
-- 
GitLab