From 8df5102d3588d26c29706c8c4a95c5197d58f651 Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 19:29:59 -0700 Subject: [PATCH 1/9] feat: deprecate old django versions; fix: randomize urls with method...replace videos which couldn't be found --- .github/workflows/main.yml | 38 +++++++++------------------- .gitignore | 1 + README.md | 15 +++++------ demo/demo/settings.py | 6 ++--- demo/demo/urls.py | 8 +----- demo/requirements.pip | 3 +-- django_spam/enums.py | 51 +++++++++++++++++++------------------- django_spam/urls.py | 17 +++++++------ setup.py | 11 ++++---- tests/test_enums.py | 4 +-- 10 files changed, 69 insertions(+), 85 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11887dd..ad68a86 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,31 +16,20 @@ jobs: fail-fast: false matrix: python-version: - - "3.4" - "3.5" - "3.6" - "3.7" - "3.8" - "3.9" + - "3.10" django-version: - - "2.0" - - "2.1" - "2.2" # LTS - "3.0" - "3.1" - "3.2" # LTS + - "4.0" + - "4.1" exclude: - # Python 3.4 is not compatible with Django 2.0+ - - python-version: "3.4" - django-version: "2.1" - - python-version: "3.4" - django-version: "2.2" - - python-version: "3.4" - django-version: "3.0" - - python-version: "3.4" - django-version: "3.1" - - python-version: "3.4" - django-version: "3.2" # Python 3.5 is not compatible with Django 2.2+ - python-version: "3.5" django-version: "3.0" @@ -48,20 +37,17 @@ jobs: django-version: "3.1" - python-version: "3.5" django-version: "3.2" - # Python 3.8 is compatible with Django 2.2+ - - python-version: "3.8" - django-version: "2.0" - - python-version: "3.8" - django-version: "2.1" - # Python 3.9 is compatible with Django 3.1+ - - python-version: "3.9" - django-version: "2.0" - - python-version: "3.9" - django-version: "2.1" - - python-version: "3.9" + - python-version: "3.5" + django-version: "4.0" + - python-version: "3.5" + django-version: "4.1" + # Python 3.10 is compatible with Django 3.2+ + - python-version: "3.10" django-version: "2.2" - - python-version: "3.9" + - python-version: "3.10" django-version: "3.0" + - python-version: "3.10" + django-version: "3.1" steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 70da374..1ba516e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ var/ demo/django_spam .vscode *.sqlite3 +pyvenv.cfg # Installer logs pip-log.txt diff --git a/README.md b/README.md index e2b61c8..7983c1c 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,15 @@ solution for your django application. django_spam simply adds common admin urls for that matter) try and access them, they will get redirected... -| | Django 2.0 | Django 2.1 | Django 2.2 | Django 3.0 | Django 3.1 | Django 3.2 | +| | Django 2.2 | Django 3.0 | Django 3.1 | Django 3.2 | Django 4.0 | Django 4.1 | | -- | -- | -- | -- | -- | -- | -- | -| Python 3.4 | :heavy_check_mark: | | | | | | -| Python 3.5 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | -| Python 3.6 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Python 3.8 | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Python 3.9 | | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Python 3.4 | | | | | | | +| Python 3.5 | :heavy_check_mark: | | | | | | +| Python 3.6 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | +| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | +| Python 3.8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Python 3.9 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Python 3.10| | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | To install: diff --git a/demo/demo/settings.py b/demo/demo/settings.py index 8e0a47c..a0d4849 100644 --- a/demo/demo/settings.py +++ b/demo/demo/settings.py @@ -4,10 +4,10 @@ Generated by 'django-admin startproject' using Django 1.11.8. For more information on this file, see -https://docs.djangoproject.com/en/1.11/topics/settings/ +https://docs.djangoproject.com/en/4.1/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.11/ref/settings/ +https://docs.djangoproject.com/en/4.1/ref/settings/ """ import os @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["*"] # Application definition diff --git a/demo/demo/urls.py b/demo/demo/urls.py index d421eee..968c2be 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -1,11 +1,5 @@ -from django.conf.urls import url, include from django.contrib import admin - - -try: - from django.urls import re_path as url # Django >= 2.0 -except ImportError: - from django.conf.urls import url # Django < 2.0 +from django.urls import include, re_path as url urlpatterns = [ diff --git a/demo/requirements.pip b/demo/requirements.pip index db46893..6ebc624 100644 --- a/demo/requirements.pip +++ b/demo/requirements.pip @@ -1,2 +1 @@ -django>=2.0 -django_spam>=1.0.0 \ No newline at end of file +django>=2.2.17 diff --git a/django_spam/enums.py b/django_spam/enums.py index 865f467..0ece397 100644 --- a/django_spam/enums.py +++ b/django_spam/enums.py @@ -1,78 +1,77 @@ -class SpamBase: - name = "" - url = "" +import abc - def __init__(self): - raise NotImplementedError +class AbstractSpam(abc.ABC): + name: str = "" + url: str = "" @classmethod def to_readable(cls) -> str: return cls.name.lower().replace(" ", "_") -class VaderBreathing(SpamBase): +class VaderBreathing(AbstractSpam): name = "Darth Vader Breathing" url = "https://www.youtube.com/watch?v=un8FAjXWOBY" -class Yodelling(SpamBase): - name = "Yodelling" - url = "https://www.youtube.com/watch?v=Lxt0_YrQs0M" +class BouncingDVDLogo(AbstractSpam): + name = "Bouncing DVD Logo" + url = "https://www.youtube.com/watch?v=5mGuCdlCcNM" -class MulletGuy(SpamBase): +class MulletGuy(AbstractSpam): name = "Whistling Mullet Guy" url = "https://www.youtube.com/watch?v=Sbhoym9yzVQ" -class ScreamingGuy(SpamBase): +class ScreamingGuy(AbstractSpam): name = "Screaming Guy" url = "https://www.youtube.com/watch?v=CRcYlE3i_-4" -class FaceSong(SpamBase): +class FaceSong(AbstractSpam): name = "Awesome Face Song" url = "https://www.youtube.com/watch?v=WNeni1lbzgY" -class ScreamingSheep(SpamBase): +class ScreamingSheep(AbstractSpam): name = "Screaming Sheep" url = "https://www.youtube.com/watch?v=SjHUb7NSrNk" -class SaxGuy(SpamBase): +class SaxGuy(AbstractSpam): name = "Epic Sax Guy" url = "https://www.youtube.com/watch?v=kxopViU98Xo" -class CrabRave(SpamBase): +class CrabRave(AbstractSpam): name = "Crab Rave" url = "https://www.youtube.com/watch?v=-50NdPawLVY" -class WiiMusic(SpamBase): +class WiiMusic(AbstractSpam): name = "Wii Theme Music" url = "https://www.youtube.com/watch?v=Twi92KYddW4" -class NyonCat(SpamBase): - name = "Nyon Cat" - url = "https://www.youtube.com/watch?v=wZZ7oFKsKzY" +class Nothing(AbstractSpam): + name = "Nothing" + url = "https://www.youtube.com/watch?v=fx2Z5ZD_Rbo" -class Asmr(SpamBase): +class Asmr(AbstractSpam): name = "ASMR" url = "https://www.youtube.com/watch?v=jbAy9MwBR-I" -class HeMan(SpamBase): - name = "He-man Heyeayea" - url = "https://www.youtube.com/watch?v=eh7lp9umG2I" +class JoePera(AbstractSpam): + name = "Joe Pera Talks You To Sleep" + url = "https://www.youtube.com/watch?v=91wX0NRjJqg" SPAM_ENUMS = [ VaderBreathing, - Yodelling, + Nothing, MulletGuy, ScreamingGuy, FaceSong, @@ -80,7 +79,7 @@ class HeMan(SpamBase): SaxGuy, CrabRave, WiiMusic, - NyonCat, + BouncingDVDLogo, Asmr, - HeMan, + JoePera, ] diff --git a/django_spam/urls.py b/django_spam/urls.py index bf5af6a..cb15e3b 100644 --- a/django_spam/urls.py +++ b/django_spam/urls.py @@ -1,6 +1,5 @@ import random -from django.conf import settings from django.urls import path from django.views.generic.base import RedirectView @@ -8,13 +7,17 @@ from django_spam import SPAM_ENUMS -spam_url = random.choice(SPAM_ENUMS) +def get_spam_path(route: str) -> path: + u = random.choice(SPAM_ENUMS) + p = path( + route, + RedirectView.as_view(url=u.url), + name=u.to_readable(), + ) + return p + urlpatterns = [ - path( - spam_route, - RedirectView.as_view(url=spam_url.url), - name=spam_url.to_readable(), - ) + get_spam_path(spam_route) for spam_route in SPAM_ROUTES ] diff --git a/setup.py b/setup.py index 061365e..3d3c330 100644 --- a/setup.py +++ b/setup.py @@ -22,9 +22,9 @@ setup( name="django_spam", - version="1.0.0", + version="3.0.0", author="Nick Kelly", - author_email="nick.kelly@tivix.com", + author_email="nickkelly.858@gmail.com", url="http://github.com/Tivix/django-spam", description="Redirecting bots to utilize their time better...", packages=find_packages(exclude=("tests*",)), @@ -36,15 +36,16 @@ py_modules=["django_spam"], test_suite="runtests.runtests", install_requires=[ - "Django>=2.0.0", + "Django>=2.2.17", ], classifiers=[ "Framework :: Django", - "Framework :: Django :: 2.0", - "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Framework :: Django :: 3.0", "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Operating System :: OS Independent", diff --git a/tests/test_enums.py b/tests/test_enums.py index 44e8722..a50e002 100644 --- a/tests/test_enums.py +++ b/tests/test_enums.py @@ -1,4 +1,4 @@ -from django_spam.enums import SpamBase +from django_spam.enums import AbstractSpam from django.conf import settings from django.test import TestCase @@ -7,4 +7,4 @@ class DjangoSpamEnumsTestCase(TestCase): def test_not_implemented_error(self): with self.assertRaises(NotImplementedError): - SpamBase() + AbstractSpam() From e2628b9a1266b336984e07bc558703734f9875a2 Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 19:59:09 -0700 Subject: [PATCH 2/9] Empty-Commit From 952f78392edd74f0263f69f00a5eab394a6aeeb0 Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:01:33 -0700 Subject: [PATCH 3/9] config: update GHA ubuntu version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad68a86..b43d3b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: lint-and-test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: # By default, GitHub will maximize the number of jobs run in parallel # depending on the available runners on GitHub-hosted virtual machines. From 7eff8b6e9e0922237c4f3c812582408564c45a0c Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:03:46 -0700 Subject: [PATCH 4/9] config: update GHA trigger --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b43d3b3..11633d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,8 @@ name: lint and test +# trigger only on PRs to `main` branch on: - push: + pull_request: branches: - master - develop From e1920bab9c66b85fcc029905c4eed120ff9ae4ae Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:08:00 -0700 Subject: [PATCH 5/9] config: update GHA django versions --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11633d6..5170a8f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: - name: Upgrade django version run: | - python -m pip install "Django~=${{ matrix.django-version }}.0" + python -m pip install "Django~=${{ matrix.django-version }}" - name: Python and Django versions run: | From f99253f2afde08eb2290f584345e148952408227 Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:21:20 -0700 Subject: [PATCH 6/9] test: fix --- .github/workflows/main.yml | 2 +- demo/poetry.lock | 28 ++++++++++++++-------------- demo/pyproject.toml | 2 +- django_spam/enums.py | 3 +++ 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5170a8f..11633d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: - name: Upgrade django version run: | - python -m pip install "Django~=${{ matrix.django-version }}" + python -m pip install "Django~=${{ matrix.django-version }}.0" - name: Python and Django versions run: | diff --git a/demo/poetry.lock b/demo/poetry.lock index 04ed6d5..13c9705 100644 --- a/demo/poetry.lock +++ b/demo/poetry.lock @@ -1,17 +1,17 @@ [[package]] name = "asgiref" -version = "3.4.1" +version = "3.5.2" description = "ASGI specs, helper code, and adapters" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] +tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] [[package]] name = "django" -version = "3.2.7" +version = "3.2.15" description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." category = "main" optional = false @@ -28,7 +28,7 @@ bcrypt = ["bcrypt"] [[package]] name = "django-spam" -version = "1.0.0" +version = "3.0.0" description = "Django application that redirects spam bots to '10 hours of' videos" category = "main" optional = false @@ -41,7 +41,7 @@ url = ".." [[package]] name = "pytz" -version = "2021.1" +version = "2022.2.1" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -57,22 +57,22 @@ python-versions = ">=3.5" [metadata] lock-version = "1.1" -python-versions = "3.9" -content-hash = "3465f4fa47d1362bce3242be6e480ae22de47be7239ae7cb7670dd931b0f7006" +python-versions = "^3.9" +content-hash = "5b370e9a798e43ddaae7b27766facd01b31dc133b41db9b1395b684f4e3437ff" [metadata.files] asgiref = [ - {file = "asgiref-3.4.1-py3-none-any.whl", hash = "sha256:ffc141aa908e6f175673e7b1b3b7af4fdb0ecb738fc5c8b88f69f055c2415214"}, - {file = "asgiref-3.4.1.tar.gz", hash = "sha256:4ef1ab46b484e3c706329cedeff284a5d40824200638503f5768edb6de7d58e9"}, + {file = "asgiref-3.5.2-py3-none-any.whl", hash = "sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4"}, + {file = "asgiref-3.5.2.tar.gz", hash = "sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424"}, ] django = [ - {file = "Django-3.2.7-py3-none-any.whl", hash = "sha256:e93c93565005b37ddebf2396b4dc4b6913c1838baa82efdfb79acedd5816c240"}, - {file = "Django-3.2.7.tar.gz", hash = "sha256:95b318319d6997bac3595517101ad9cc83fe5672ac498ba48d1a410f47afecd2"}, + {file = "Django-3.2.15-py3-none-any.whl", hash = "sha256:115baf5049d5cf4163e43492cdc7139c306ed6d451e7d3571fe9612903903713"}, + {file = "Django-3.2.15.tar.gz", hash = "sha256:f71934b1a822f14a86c9ac9634053689279cd04ae69cb6ade4a59471b886582b"}, ] django-spam = [] pytz = [ - {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, - {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, ] sqlparse = [ {file = "sqlparse-0.4.2-py3-none-any.whl", hash = "sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d"}, diff --git a/demo/pyproject.toml b/demo/pyproject.toml index 407d83e..de8309c 100644 --- a/demo/pyproject.toml +++ b/demo/pyproject.toml @@ -6,7 +6,7 @@ description = "A demo using django-spam." authors = ["nickkelly.858@gmail.com"] [tool.poetry.dependencies] -python = "3.9" +python = "^3.9" django = "^3.0" django_spam = { path = "../", develop = true} diff --git a/django_spam/enums.py b/django_spam/enums.py index 0ece397..7430010 100644 --- a/django_spam/enums.py +++ b/django_spam/enums.py @@ -4,6 +4,9 @@ class AbstractSpam(abc.ABC): name: str = "" url: str = "" + def __init__(self): + raise NotImplementedError + @classmethod def to_readable(cls) -> str: return cls.name.lower().replace(" ", "_") From ff27f9771fba737eabaee378c1b0b0a611c8f3ae Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:25:31 -0700 Subject: [PATCH 7/9] infra: GHA matrix --- .github/workflows/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11633d6..45041e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,16 @@ jobs: django-version: "4.0" - python-version: "3.5" django-version: "4.1" + # Python 3.6 is not compatible with Django 4.0+ + - python-version: "3.6" + django-version: "4.0" + - python-version: "3.6" + django-version: "4.1" + # Python 3.7 is not compatible with Django 4.0+ + - python-version: "3.7" + django-version: "4.0" + - python-version: "3.7" + django-version: "4.1" # Python 3.10 is compatible with Django 3.2+ - python-version: "3.10" django-version: "2.2" From a8570d9a512a8df45754a4eaa04ea46a046dba4e Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 20:37:17 -0700 Subject: [PATCH 8/9] config: update black; chore: lint --- .github/workflows/main.yml | 1 - demo/demo/urls.py | 1 - django_spam/enums.py | 5 +- django_spam/urls.py | 5 +- poetry.lock | 204 +++++++++++++------------------------ pyproject.toml | 2 +- 6 files changed, 74 insertions(+), 144 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45041e2..a9eb531 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,5 @@ name: lint and test -# trigger only on PRs to `main` branch on: pull_request: branches: diff --git a/demo/demo/urls.py b/demo/demo/urls.py index 6c7a7c1..06aa60a 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -3,7 +3,6 @@ from django.views.generic import TemplateView - urlpatterns = [ path("admin/", admin.site.urls), path("", TemplateView.as_view(template_name="default_urlconf.html")), diff --git a/django_spam/enums.py b/django_spam/enums.py index 7430010..b51da6c 100644 --- a/django_spam/enums.py +++ b/django_spam/enums.py @@ -1,8 +1,9 @@ import abc + class AbstractSpam(abc.ABC): - name: str = "" - url: str = "" + name = "" + url = "" def __init__(self): raise NotImplementedError diff --git a/django_spam/urls.py b/django_spam/urls.py index cb15e3b..a484d28 100644 --- a/django_spam/urls.py +++ b/django_spam/urls.py @@ -17,7 +17,4 @@ def get_spam_path(route: str) -> path: return p -urlpatterns = [ - get_spam_path(spam_route) - for spam_route in SPAM_ROUTES -] +urlpatterns = [get_spam_path(spam_route) for spam_route in SPAM_ROUTES] diff --git a/poetry.lock b/poetry.lock index c9b225d..39d1bd0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,47 +1,39 @@ -[[package]] -name = "appdirs" -version = "1.4.4" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "black" -version = "20.8b1" +version = "22.3.0" description = "The uncompromising code formatter." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.2" [package.dependencies] -appdirs = "*" -click = ">=7.1.2" +click = ">=8.0.0" mypy-extensions = ">=0.4.3" -pathspec = ">=0.6,<1" -regex = ">=2020.1.8" -toml = ">=0.10.1" -typed-ast = ">=1.4.0" -typing-extensions = ">=3.7.4" +pathspec = ">=0.9.0" +platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] +d = ["aiohttp (>=3.7.4)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "click" -version = "8.0.1" +version = "8.1.3" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.5" description = "Cross-platform colored terminal text." category = "dev" optional = false @@ -95,6 +87,18 @@ category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] +test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] + [[package]] name = "pycodestyle" version = "2.7.0" @@ -112,57 +116,59 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] -name = "regex" -version = "2021.9.24" -description = "Alternative regular expression module, to replace re." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "typed-ast" -version = "1.4.3" -description = "a fork of Python 2 and 3 ast modules with type comment support" +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" [[package]] name = "typing-extensions" -version = "3.10.0.2" -description = "Backported and Experimental Type Hints for Python 3.5+" +version = "4.3.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "fbb03c7e4ae3cf6d930db3363a42815e9a414055c641b7bdf239375df60bad5d" +content-hash = "745a0f349ae71564528c1a6c29f09f5a4a5cea96e81aa6fe357b0d76b4fd6b07" [metadata.files] -appdirs = [ - {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, - {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, -] black = [ - {file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"}, + {file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"}, + {file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"}, + {file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"}, + {file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"}, + {file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"}, + {file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"}, + {file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"}, + {file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"}, + {file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"}, + {file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"}, + {file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"}, + {file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"}, + {file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"}, + {file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"}, + {file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"}, + {file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"}, + {file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"}, ] click = [ - {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, - {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] coverage = [ {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, @@ -234,6 +240,10 @@ pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] pycodestyle = [ {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, @@ -242,87 +252,11 @@ pyflakes = [ {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, ] -regex = [ - {file = "regex-2021.9.24-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0628ed7d6334e8f896f882a5c1240de8c4d9b0dd7c7fb8e9f4692f5684b7d656"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3baf3eaa41044d4ced2463fd5d23bf7bd4b03d68739c6c99a59ce1f95599a673"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c000635fd78400a558bd7a3c2981bb2a430005ebaa909d31e6e300719739a949"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:295bc8a13554a25ad31e44c4bedabd3c3e28bba027e4feeb9bb157647a2344a7"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0e3f59d3c772f2c3baaef2db425e6fc4149d35a052d874bb95ccfca10a1b9f4"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:aea4006b73b555fc5bdb650a8b92cf486d678afa168cf9b38402bb60bf0f9c18"}, - {file = "regex-2021.9.24-cp310-cp310-win32.whl", hash = "sha256:09eb62654030f39f3ba46bc6726bea464069c29d00a9709e28c9ee9623a8da4a"}, - {file = "regex-2021.9.24-cp310-cp310-win_amd64.whl", hash = "sha256:8d80087320632457aefc73f686f66139801959bf5b066b4419b92be85be3543c"}, - {file = "regex-2021.9.24-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:7e3536f305f42ad6d31fc86636c54c7dafce8d634e56fef790fbacb59d499dd5"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31f35a984caffb75f00a86852951a337540b44e4a22171354fb760cefa09346"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7cb25adba814d5f419733fe565f3289d6fa629ab9e0b78f6dff5fa94ab0456"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:85c61bee5957e2d7be390392feac7e1d7abd3a49cbaed0c8cee1541b784c8561"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c94722bf403b8da744b7d0bb87e1f2529383003ceec92e754f768ef9323f69ad"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6adc1bd68f81968c9d249aab8c09cdc2cbe384bf2d2cb7f190f56875000cdc72"}, - {file = "regex-2021.9.24-cp36-cp36m-win32.whl", hash = "sha256:2054dea683f1bda3a804fcfdb0c1c74821acb968093d0be16233873190d459e3"}, - {file = "regex-2021.9.24-cp36-cp36m-win_amd64.whl", hash = "sha256:7783d89bd5413d183a38761fbc68279b984b9afcfbb39fa89d91f63763fbfb90"}, - {file = "regex-2021.9.24-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b15dc34273aefe522df25096d5d087abc626e388a28a28ac75a4404bb7668736"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10a7a9cbe30bd90b7d9a1b4749ef20e13a3528e4215a2852be35784b6bd070f0"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb9f5844db480e2ef9fce3a72e71122dd010ab7b2920f777966ba25f7eb63819"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:17310b181902e0bb42b29c700e2c2346b8d81f26e900b1328f642e225c88bce1"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bba1f6df4eafe79db2ecf38835c2626dbd47911e0516f6962c806f83e7a99ae"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:821e10b73e0898544807a0692a276e539e5bafe0a055506a6882814b6a02c3ec"}, - {file = "regex-2021.9.24-cp37-cp37m-win32.whl", hash = "sha256:9c371dd326289d85906c27ec2bc1dcdedd9d0be12b543d16e37bad35754bde48"}, - {file = "regex-2021.9.24-cp37-cp37m-win_amd64.whl", hash = "sha256:1e8d1898d4fb817120a5f684363b30108d7b0b46c7261264b100d14ec90a70e7"}, - {file = "regex-2021.9.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a5c2250c0a74428fd5507ae8853706fdde0f23bfb62ee1ec9418eeacf216078"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8aec4b4da165c4a64ea80443c16e49e3b15df0f56c124ac5f2f8708a65a0eddc"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:650c4f1fc4273f4e783e1d8e8b51a3e2311c2488ba0fcae6425b1e2c248a189d"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2cdb3789736f91d0b3333ac54d12a7e4f9efbc98f53cb905d3496259a893a8b3"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e61100200fa6ab7c99b61476f9f9653962ae71b931391d0264acfb4d9527d9c"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8c268e78d175798cd71d29114b0a1f1391c7d011995267d3b62319ec1a4ecaa1"}, - {file = "regex-2021.9.24-cp38-cp38-win32.whl", hash = "sha256:658e3477676009083422042c4bac2bdad77b696e932a3de001c42cc046f8eda2"}, - {file = "regex-2021.9.24-cp38-cp38-win_amd64.whl", hash = "sha256:a731552729ee8ae9c546fb1c651c97bf5f759018fdd40d0e9b4d129e1e3a44c8"}, - {file = "regex-2021.9.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86f9931eb92e521809d4b64ec8514f18faa8e11e97d6c2d1afa1bcf6c20a8eab"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcbbc9cfa147d55a577d285fd479b43103188855074552708df7acc31a476dd9"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29385c4dbb3f8b3a55ce13de6a97a3d21bd00de66acd7cdfc0b49cb2f08c906c"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c50a6379763c733562b1fee877372234d271e5c78cd13ade5f25978aa06744db"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f74b6d8f59f3cfb8237e25c532b11f794b96f5c89a6f4a25857d85f84fbef11"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c4d83d21d23dd854ffbc8154cf293f4e43ba630aa9bd2539c899343d7f59da3"}, - {file = "regex-2021.9.24-cp39-cp39-win32.whl", hash = "sha256:95e89a8558c8c48626dcffdf9c8abac26b7c251d352688e7ab9baf351e1c7da6"}, - {file = "regex-2021.9.24-cp39-cp39-win_amd64.whl", hash = "sha256:835962f432bce92dc9bf22903d46c50003c8d11b1dc64084c8fae63bca98564a"}, - {file = "regex-2021.9.24.tar.gz", hash = "sha256:6266fde576e12357b25096351aac2b4b880b0066263e7bc7a9a1b4307991bb0e"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -typed-ast = [ - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, - {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, - {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, - {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, - {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, - {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, - {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, - {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, - {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, - {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, +tomli = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] typing-extensions = [ - {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, - {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, - {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, + {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, + {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, ] diff --git a/pyproject.toml b/pyproject.toml index 5e006e2..8e32fe6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ python = "^3.9" [tool.poetry.dev-dependencies] flake8 = "^3.9.2" -black = "20.8b1" +black = "22.3.0" coverage = "^5.5" [tool.black] From 4bfe83f08ed251e4bb02ff85f47093af0fcef417 Mon Sep 17 00:00:00 2001 From: nickatnight Date: Mon, 22 Aug 2022 21:30:51 -0700 Subject: [PATCH 9/9] feat: add auto create release --- .github/workflows/main.yml | 21 +++++++++++++++++++++ README.md | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9eb531..854a127 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,9 @@ name: lint and test on: + push: + tags: + - '*' pull_request: branches: - master @@ -94,3 +97,21 @@ jobs: with: file: coverage.xml flags: unittests + + create-release: + needs: lint-and-test + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 # need this for all history for all branches and tags + - name: Create Release + id: create_release + uses: nickatnight/releases-action@v3 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + outputs: + ReleaseTag: ${{ steps.create_release.outputs.release_tag }} diff --git a/README.md b/README.md index 36d6f04..b9895c4 100644 --- a/README.md +++ b/README.md @@ -82,3 +82,10 @@ This project uses [Poetry](https://python-poetry.org/docs/#osx--linux--bashonwin 3. black `poetry run black .` 4. flake8 `poetry run flake8` 5. test `poetry run coverage run --source=django_spam setup.py test` + +## Releasing +1. Be sure to checkout master: `$ git checkout master` +2. Create tag: `$ git tag ` +3. Push tag: `$ git push origin ` + +GitHub Action pipeline will automatically create release c: