From d92b53a60cd4efc22ec818f516508387134dd925 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Wed, 5 May 2021 13:48:02 -0400 Subject: [PATCH] Rename project to imagemuck --- .gitignore | 2 +- .pre-commit-config.yaml | 2 +- Makefile | 4 +-- README.md | 2 +- dehance/resources/__init__.py | 19 ---------- docs/conf.py | 2 +- docs/index.rst | 4 +-- {dehance => imagemuck}/__about__.py | 4 +-- {dehance => imagemuck}/__init__.py | 0 {dehance => imagemuck}/__main__.py | 6 ++-- {dehance => imagemuck}/_server.py | 20 +++++------ {dehance => imagemuck}/application.py | 10 +++--- {dehance => imagemuck}/configuration.py | 12 +++---- {dehance => imagemuck}/constants.py | 2 +- {dehance => imagemuck}/database/__init__.py | 16 ++++----- {dehance => imagemuck}/database/_shared.py | 2 +- {dehance => imagemuck}/database/image.py | 4 +-- {dehance => imagemuck}/database/thumbnail.py | 6 ++-- {dehance => imagemuck}/exceptions.py | 8 ++--- {dehance => imagemuck}/py.typed | 0 imagemuck/resources/__init__.py | 19 ++++++++++ {dehance => imagemuck}/resources/_shared.py | 2 +- {dehance => imagemuck}/resources/image.py | 12 +++---- {dehance => imagemuck}/resources/openapi.py | 4 +-- {dehance => imagemuck}/resources/openapi.yaml | 0 {dehance => imagemuck}/resources/thumbnail.py | 6 ++-- openapi.yaml | 6 ++-- poetry.lock | 36 +++++++++---------- pyproject.toml | 10 +++--- tests/test_about.py | 2 +- tox.ini | 10 +++--- 31 files changed, 116 insertions(+), 116 deletions(-) delete mode 100644 dehance/resources/__init__.py rename {dehance => imagemuck}/__about__.py (75%) rename {dehance => imagemuck}/__init__.py (100%) rename {dehance => imagemuck}/__main__.py (93%) rename {dehance => imagemuck}/_server.py (76%) rename {dehance => imagemuck}/application.py (67%) rename {dehance => imagemuck}/configuration.py (94%) rename {dehance => imagemuck}/constants.py (93%) rename {dehance => imagemuck}/database/__init__.py (80%) rename {dehance => imagemuck}/database/_shared.py (90%) rename {dehance => imagemuck}/database/image.py (91%) rename {dehance => imagemuck}/database/thumbnail.py (52%) rename {dehance => imagemuck}/exceptions.py (79%) rename {dehance => imagemuck}/py.typed (100%) create mode 100644 imagemuck/resources/__init__.py rename {dehance => imagemuck}/resources/_shared.py (98%) rename {dehance => imagemuck}/resources/image.py (92%) rename {dehance => imagemuck}/resources/openapi.py (74%) rename {dehance => imagemuck}/resources/openapi.yaml (100%) rename {dehance => imagemuck}/resources/thumbnail.py (70%) diff --git a/.gitignore b/.gitignore index 01957a4..478b4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ dist/ docs/_build/ docs/modules.rst -docs/dehance*.rst +docs/imagemuck*.rst .vscode/ .idea/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2db3556..b0178ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: name: reorder-python-imports entry: reorder-python-imports args: - - "--unclassifiable-application-module=dehance" + - "--unclassifiable-application-module=imagemuck" language: system types: [python] diff --git a/Makefile b/Makefile index 78455dd..f115c60 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -# Dehance makefile +# ImageMuck makefile # You can set these variables from the command line -PROJECT = dehance +PROJECT = imagemuck .PHONY: help # Put it first so that "make" without argument is like "make help" diff --git a/README.md b/README.md index f0dc374..d0d6248 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dehance +# imagemuck HTTP server for handling image uploads and thumbnail generation. diff --git a/dehance/resources/__init__.py b/dehance/resources/__init__.py deleted file mode 100644 index 74a5d8e..0000000 --- a/dehance/resources/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Tuple - -from dehance.resources._shared import DehanceResource -from dehance.resources._shared import ResponseBody -from dehance.resources._shared import ResponseHeaders -from dehance.resources.image import Image -from dehance.resources.image import ImageUpload -from dehance.resources.openapi import OpenAPI -from dehance.resources.thumbnail import ThumbnailResize -from dehance.resources.thumbnail import ThumbnailScale - - -RESOURCES: Tuple[DehanceResource, ...] = ( - ImageUpload, - Image, - OpenAPI, - ThumbnailScale, - ThumbnailResize, -) diff --git a/docs/conf.py b/docs/conf.py index eecc7c8..3701af6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ from pathlib import Path BASE_DIR = Path(__file__).parent.resolve() ABOUT = {} -with open(Path(BASE_DIR, "..", "dehance", "__about__.py")) as infile: +with open(Path(BASE_DIR, "..", "imagemuck", "__about__.py")) as infile: exec(infile.read(), ABOUT) diff --git a/docs/index.rst b/docs/index.rst index b667348..fe3ac50 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,11 +1,11 @@ -Dehance +ImageMuck ========= .. toctree:: :maxdepth: 2 :caption: Contents: - API Reference + API Reference diff --git a/dehance/__about__.py b/imagemuck/__about__.py similarity index 75% rename from dehance/__about__.py rename to imagemuck/__about__.py index 99d8203..0cebfad 100644 --- a/dehance/__about__.py +++ b/imagemuck/__about__.py @@ -1,9 +1,9 @@ """Programatically accessible project metadata""" -__title__ = "dehance" +__title__ = "imagemuck" __version__ = "0.1.0" __authors__ = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"] __license__ = "MIT" __summary__ = "HTTP server for uploading images and generating thumbnails" -__url__ = "https://github.com/mocproject/dehance/" +__url__ = "https://github.com/mocproject/imagemuck/" diff --git a/dehance/__init__.py b/imagemuck/__init__.py similarity index 100% rename from dehance/__init__.py rename to imagemuck/__init__.py diff --git a/dehance/__main__.py b/imagemuck/__main__.py similarity index 93% rename from dehance/__main__.py rename to imagemuck/__main__.py index 062b24c..25e3669 100644 --- a/dehance/__main__.py +++ b/imagemuck/__main__.py @@ -1,12 +1,12 @@ """Development server stub entrypoint -Flask comes with a built-in development server. This entrypoint allows ``dehance`` +Flask comes with a built-in development server. This entrypoint allows ``imagemuck`` to be run directly to run the development server and expose some simple config options for ease of access. Run the below command to start the server: :: - python -m dehance + python -m imagemuck In addition to the helpful CLI flags, the Flask development server run by this module will also load any ``.env`` files in the current working directory when running the application. @@ -17,7 +17,7 @@ load any ``.env`` files in the current working directory when running the applic import argparse import sys -from dehance.application import APPLICATION +from imagemuck.application import APPLICATION # pylint: disable=invalid-name diff --git a/dehance/_server.py b/imagemuck/_server.py similarity index 76% rename from dehance/_server.py rename to imagemuck/_server.py index 6a1b399..6500686 100644 --- a/dehance/_server.py +++ b/imagemuck/_server.py @@ -1,11 +1,11 @@ import flask -from dehance import __about__ -from dehance import configuration -from dehance import constants -from dehance import database -from dehance import exceptions -from dehance.resources import ResponseHeaders +from imagemuck import __about__ +from imagemuck import configuration +from imagemuck import constants +from imagemuck import database +from imagemuck import exceptions +from imagemuck.resources import ResponseHeaders def make_the_tea() -> None: @@ -23,7 +23,7 @@ def initialize_database() -> None: database.initialize(flask.current_app.appconfig) -class DehanceRequest(flask.Request): +class ImageMuckRequest(flask.Request): """Extend the default Flask request object to add custom application state settings""" def make_response_headers(self) -> ResponseHeaders: @@ -40,14 +40,14 @@ class DehanceRequest(flask.Request): } -class DehanceFlask(flask.Flask): +class ImageMuckFlask(flask.Flask): """Extend the default Flask object to add the custom application config There's probably an easier/more kosher way to do this, but ¯\\_(ツ)_/¯ """ - request_class = DehanceRequest + request_class = ImageMuckRequest def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.appconfig: configuration.DehanceConfig = configuration.load() + self.appconfig: configuration.ImageMuckConfig = configuration.load() diff --git a/dehance/application.py b/imagemuck/application.py similarity index 67% rename from dehance/application.py rename to imagemuck/application.py index b13e5d0..1dc615f 100644 --- a/dehance/application.py +++ b/imagemuck/application.py @@ -1,12 +1,12 @@ import flask_restful -from dehance import resources -from dehance._server import DehanceFlask -from dehance._server import initialize_database -from dehance._server import make_the_tea +from imagemuck import resources +from imagemuck._server import ImageMuckFlask +from imagemuck._server import initialize_database +from imagemuck._server import make_the_tea -APPLICATION = DehanceFlask(__name__) +APPLICATION = ImageMuckFlask(__name__) API = flask_restful.Api(APPLICATION, catch_all_404s=True) diff --git a/dehance/configuration.py b/imagemuck/configuration.py similarity index 94% rename from dehance/configuration.py rename to imagemuck/configuration.py index 49475c5..f0e89fc 100644 --- a/dehance/configuration.py +++ b/imagemuck/configuration.py @@ -8,7 +8,7 @@ from typing import Dict from typing import Optional from typing import Tuple -from dehance import constants +from imagemuck import constants def _default_sqlite_pragmas() -> Dict[str, Any]: @@ -31,7 +31,7 @@ def _default_sqlite_pragmas() -> Dict[str, Any]: @dataclass class _DBSqliteConfig: - path: Path = Path.cwd() / "dehance.db" + path: Path = Path.cwd() / "imagemuck.db" pragmas: Dict[str, Any] = field(default_factory=_default_sqlite_pragmas) @classmethod @@ -51,7 +51,7 @@ class _DBMariaConfig: username: str = "root" password: Optional[str] = None port: int = 3306 - schema: str = "dehance" + schema: str = "imagemuck" @classmethod def build(cls): @@ -106,7 +106,7 @@ class _UploadConfig: @dataclass -class DehanceConfig: +class ImageMuckConfig: database: _DBConfig = field(default_factory=_DBConfig.build) upload: _UploadConfig = field(default_factory=_UploadConfig.build) storage_path: Path = Path.cwd() @@ -120,6 +120,6 @@ class DehanceConfig: ) -def load() -> DehanceConfig: +def load() -> ImageMuckConfig: - return DehanceConfig.build() + return ImageMuckConfig.build() diff --git a/dehance/constants.py b/imagemuck/constants.py similarity index 93% rename from dehance/constants.py rename to imagemuck/constants.py index 7975b98..c06f44a 100644 --- a/dehance/constants.py +++ b/imagemuck/constants.py @@ -7,7 +7,7 @@ class SupportedDatabaseBackend(enum.Enum): SQLITE = enum.auto() -HTTP_HEADER_RESPONSE_VERSION = "x-dehance-version" +HTTP_HEADER_RESPONSE_VERSION = "x-imagemuck-version" HTTP_HEADER_RESPONSE_DIGEST = "Digest" diff --git a/dehance/database/__init__.py b/imagemuck/database/__init__.py similarity index 80% rename from dehance/database/__init__.py rename to imagemuck/database/__init__.py index 4453f8d..02a6c16 100644 --- a/dehance/database/__init__.py +++ b/imagemuck/database/__init__.py @@ -3,18 +3,18 @@ from typing import Tuple import peewee -from dehance import constants -from dehance.configuration import DehanceConfig -from dehance.database._shared import DehanceModel -from dehance.database._shared import INTERFACE as interface -from dehance.database.image import ImageRecord -from dehance.database.thumbnail import ThumbnailRecord +from imagemuck import constants +from imagemuck.configuration import ImageMuckConfig +from imagemuck.database._shared import ImageMuckModel +from imagemuck.database._shared import INTERFACE as interface +from imagemuck.database.image import ImageRecord +from imagemuck.database.thumbnail import ThumbnailRecord -MODELS: Tuple[DehanceModel, ...] = (ImageRecord, ThumbnailRecord) +MODELS: Tuple[ImageMuckModel, ...] = (ImageRecord, ThumbnailRecord) -def initialize(config: DehanceConfig): +def initialize(config: ImageMuckConfig): """Initialize the database interface Defining the database as an diff --git a/dehance/database/_shared.py b/imagemuck/database/_shared.py similarity index 90% rename from dehance/database/_shared.py rename to imagemuck/database/_shared.py index 24af109..54c81a8 100644 --- a/dehance/database/_shared.py +++ b/imagemuck/database/_shared.py @@ -7,7 +7,7 @@ import peewee INTERFACE = peewee.DatabaseProxy() -class DehanceModel(peewee.Model): +class ImageMuckModel(peewee.Model): class Meta: # pylint: disable=too-few-public-methods,missing-class-docstring database = INTERFACE diff --git a/dehance/database/image.py b/imagemuck/database/image.py similarity index 91% rename from dehance/database/image.py rename to imagemuck/database/image.py index 0f3137d..fdba6fd 100644 --- a/dehance/database/image.py +++ b/imagemuck/database/image.py @@ -4,10 +4,10 @@ from typing import List import peewee -from dehance.database._shared import DehanceModel +from imagemuck.database._shared import ImageMuckModel -class ImageRecord(DehanceModel): +class ImageRecord(ImageMuckModel): """Database record for""" width = peewee.IntegerField(null=False) diff --git a/dehance/database/thumbnail.py b/imagemuck/database/thumbnail.py similarity index 52% rename from dehance/database/thumbnail.py rename to imagemuck/database/thumbnail.py index 4f76fe8..5da1aca 100644 --- a/dehance/database/thumbnail.py +++ b/imagemuck/database/thumbnail.py @@ -1,10 +1,10 @@ import peewee -from dehance.database._shared import DehanceModel -from dehance.database.image import ImageRecord +from imagemuck.database._shared import ImageMuckModel +from imagemuck.database.image import ImageRecord -class ThumbnailRecord(DehanceModel): +class ThumbnailRecord(ImageMuckModel): parent = peewee.ForeignKeyField(ImageRecord) width = peewee.IntegerField(null=False) diff --git a/dehance/exceptions.py b/imagemuck/exceptions.py similarity index 79% rename from dehance/exceptions.py rename to imagemuck/exceptions.py index 16844c7..c326bdd 100644 --- a/dehance/exceptions.py +++ b/imagemuck/exceptions.py @@ -2,13 +2,13 @@ :: - DehanceException + ImageMuckException +-- ClientError +-- ServerError """ -class DehanceException(Exception): +class ImageMuckException(Exception): """Whomp whomp, something went wrong But seriously, don't ever raise this exception @@ -17,7 +17,7 @@ class DehanceException(Exception): status: int -class ClientError(DehanceException): +class ClientError(ImageMuckException): """Error while processing client side input""" status = 400 @@ -29,7 +29,7 @@ class ImageResourceDeletedError(ClientError): status = 410 -class ServerError(DehanceException): +class ServerError(ImageMuckException): """Error while processing server side data""" status = 500 diff --git a/dehance/py.typed b/imagemuck/py.typed similarity index 100% rename from dehance/py.typed rename to imagemuck/py.typed diff --git a/imagemuck/resources/__init__.py b/imagemuck/resources/__init__.py new file mode 100644 index 0000000..a50ea37 --- /dev/null +++ b/imagemuck/resources/__init__.py @@ -0,0 +1,19 @@ +from typing import Tuple + +from imagemuck.resources._shared import ImageMuckResource +from imagemuck.resources._shared import ResponseBody +from imagemuck.resources._shared import ResponseHeaders +from imagemuck.resources.image import Image +from imagemuck.resources.image import ImageUpload +from imagemuck.resources.openapi import OpenAPI +from imagemuck.resources.thumbnail import ThumbnailResize +from imagemuck.resources.thumbnail import ThumbnailScale + + +RESOURCES: Tuple[ImageMuckResource, ...] = ( + ImageUpload, + Image, + OpenAPI, + ThumbnailScale, + ThumbnailResize, +) diff --git a/dehance/resources/_shared.py b/imagemuck/resources/_shared.py similarity index 98% rename from dehance/resources/_shared.py rename to imagemuck/resources/_shared.py index 111f4ff..236bf77 100644 --- a/dehance/resources/_shared.py +++ b/imagemuck/resources/_shared.py @@ -31,7 +31,7 @@ class ResponseTuple(NamedTuple): headers: ResponseHeaders -class DehanceResource(flask_restful.Resource): +class ImageMuckResource(flask_restful.Resource): """Extension of the default :class:`flask_restful.Resource` class Add a couple of useful things to the default resource class: diff --git a/dehance/resources/image.py b/imagemuck/resources/image.py similarity index 92% rename from dehance/resources/image.py rename to imagemuck/resources/image.py index 952760d..998d488 100644 --- a/dehance/resources/image.py +++ b/imagemuck/resources/image.py @@ -4,13 +4,13 @@ import uuid import flask -from dehance import constants -from dehance import database -from dehance import exceptions -from dehance.resources._shared import DehanceResource +from imagemuck import constants +from imagemuck import database +from imagemuck import exceptions +from imagemuck.resources._shared import ImageMuckResource -class ImageUpload(DehanceResource): +class ImageUpload(ImageMuckResource): routes = ("/image/",) @@ -45,7 +45,7 @@ class ImageUpload(DehanceResource): return None, 201 -class Image(DehanceResource): +class Image(ImageMuckResource): routes = ("/image/.jpeg",) diff --git a/dehance/resources/openapi.py b/imagemuck/resources/openapi.py similarity index 74% rename from dehance/resources/openapi.py rename to imagemuck/resources/openapi.py index e22a784..50b938d 100644 --- a/dehance/resources/openapi.py +++ b/imagemuck/resources/openapi.py @@ -2,12 +2,12 @@ from pathlib import Path from ruamel.yaml import YAML -from dehance.resources._shared import DehanceResource +from imagemuck.resources._shared import ImageMuckResource yaml = YAML(typ="safe") -class OpenAPI(DehanceResource): +class OpenAPI(ImageMuckResource): routes = ("/openapi.json",) diff --git a/dehance/resources/openapi.yaml b/imagemuck/resources/openapi.yaml similarity index 100% rename from dehance/resources/openapi.yaml rename to imagemuck/resources/openapi.yaml diff --git a/dehance/resources/thumbnail.py b/imagemuck/resources/thumbnail.py similarity index 70% rename from dehance/resources/thumbnail.py rename to imagemuck/resources/thumbnail.py index 173afc0..1a79d0a 100644 --- a/dehance/resources/thumbnail.py +++ b/imagemuck/resources/thumbnail.py @@ -1,7 +1,7 @@ -from dehance.resources._shared import DehanceResource +from imagemuck.resources._shared import ImageMuckResource -class ThumbnailScale(DehanceResource): +class ThumbnailScale(ImageMuckResource): routes = ("/thumb//scale/.jpg",) @@ -9,7 +9,7 @@ class ThumbnailScale(DehanceResource): raise NotImplementedError -class ThumbnailResize(DehanceResource): +class ThumbnailResize(ImageMuckResource): routes = ("/thumb//size/x.jpg",) diff --git a/openapi.yaml b/openapi.yaml index 3c0cfd3..5a1971c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2,9 +2,9 @@ openapi: "3.0.2" info: version: 0.1.0 - title: Dehance + title: ImageMuck description: >- - Dehance is a simple HTTP server that allows users to upload + ImageMuck is a simple HTTP server that allows users to upload images and retrieve them at a later time. In addition, it supports generating (and caching) scaled versions of the uploaded images for use as thumbnails. @@ -13,7 +13,7 @@ info: url: https://mit-license.org/ x-anchors: DefaultHeaders: &headers-default - x-dehance-version: + x-imagemuck-version: $ref: "#/components/headers/Version" OptionsResponses: &responses-options '204': diff --git a/poetry.lock b/poetry.lock index 19a9812..d33b779 100644 --- a/poetry.lock +++ b/poetry.lock @@ -115,7 +115,7 @@ stevedore = ">=1.20.0" [[package]] name = "black" -version = "21.4b2" +version = "21.5b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -467,7 +467,7 @@ testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] name = "ipython" -version = "7.23.0" +version = "7.23.1" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -953,7 +953,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.8.1" +version = "2.9.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false @@ -1159,7 +1159,7 @@ python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" [[package]] name = "six" -version = "1.15.0" +version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "main" optional = false @@ -1328,7 +1328,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "tox" -version = "3.23.0" +version = "3.23.1" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false @@ -1410,7 +1410,7 @@ brotli = ["brotlipy (>=0.6.0)"] [[package]] name = "virtualenv" -version = "20.4.4" +version = "20.4.5" description = "Virtual Python Environment builder" category = "dev" optional = false @@ -1526,8 +1526,8 @@ bandit = [ {file = "bandit-1.7.0.tar.gz", hash = "sha256:8a4c7415254d75df8ff3c3b15cfe9042ecee628a1e40b44c15a98890fbfc2608"}, ] black = [ - {file = "black-21.4b2-py3-none-any.whl", hash = "sha256:bff7067d8bc25eb21dcfdbc8c72f2baafd9ec6de4663241a52fb904b304d391f"}, - {file = "black-21.4b2.tar.gz", hash = "sha256:fc9bcf3b482b05c1f35f6a882c079dc01b9c7795827532f4cc43c0ec88067bbc"}, + {file = "black-21.5b0-py3-none-any.whl", hash = "sha256:0e80435b8a88f383c9149ae89d671eb2095b72344b0fe8a1d61d2ff5110ed173"}, + {file = "black-21.5b0.tar.gz", hash = "sha256:9dc2042018ca10735366d944c2c12d9cad6dec74a3d5f679d09384ea185d9943"}, ] blacken-docs = [ {file = "blacken_docs-1.10.0-py2.py3-none-any.whl", hash = "sha256:149197a0b17e83121fc10aca9eda1417728fdccebde930a6722f97d87ed30f4b"}, @@ -1741,8 +1741,8 @@ importlib-metadata = [ {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, ] ipython = [ - {file = "ipython-7.23.0-py3-none-any.whl", hash = "sha256:3455b020a895710c4366e8d1b326e5ee6aa684607907fc96895e7b8359569f49"}, - {file = "ipython-7.23.0.tar.gz", hash = "sha256:69178f32bf9c6257430b6f592c3ae230c32861a1966d2facec454e09078e232d"}, + {file = "ipython-7.23.1-py3-none-any.whl", hash = "sha256:f78c6a3972dde1cc9e4041cbf4de583546314ba52d3c97208e5b6b2221a9cb7d"}, + {file = "ipython-7.23.1.tar.gz", hash = "sha256:714810a5c74f512b69d5f3b944c86e592cee0a5fb9c728e582f074610f6cf038"}, ] ipython-genutils = [ {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, @@ -2020,8 +2020,8 @@ pycparser = [ {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, ] pygments = [ - {file = "Pygments-2.8.1-py3-none-any.whl", hash = "sha256:534ef71d539ae97d4c3a4cf7d6f110f214b0e687e92f9cb9d2a3b0d3101289c8"}, - {file = "Pygments-2.8.1.tar.gz", hash = "sha256:2656e1a6edcdabf4275f9a3640db59fd5de107d88e8663c5d4e9a0fa62f77f94"}, + {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, + {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"}, ] pylev = [ {file = "pylev-1.3.0-py2.py3-none-any.whl", hash = "sha256:1d29a87beb45ebe1e821e7a3b10da2b6b2f4c79b43f482c2df1a1f748a6e114e"}, @@ -2179,8 +2179,8 @@ shellingham = [ {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, ] six = [ - {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, - {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] smmap = [ {file = "smmap-4.0.0-py2.py3-none-any.whl", hash = "sha256:a9a7479e4c572e2e775c404dcd3080c8dc49f39918c2cf74913d30c4c478e3c2"}, @@ -2235,8 +2235,8 @@ tomlkit = [ {file = "tomlkit-0.7.0.tar.gz", hash = "sha256:ac57f29693fab3e309ea789252fcce3061e19110085aa31af5446ca749325618"}, ] tox = [ - {file = "tox-3.23.0-py2.py3-none-any.whl", hash = "sha256:e007673f3595cede9b17a7c4962389e4305d4a3682a6c5a4159a1453b4f326aa"}, - {file = "tox-3.23.0.tar.gz", hash = "sha256:05a4dbd5e4d3d8269b72b55600f0b0303e2eb47ad5c6fe76d3576f4c58d93661"}, + {file = "tox-3.23.1-py2.py3-none-any.whl", hash = "sha256:b0b5818049a1c1997599d42012a637a33f24c62ab8187223fdd318fa8522637b"}, + {file = "tox-3.23.1.tar.gz", hash = "sha256:307a81ddb82bd463971a273f33e9533a24ed22185f27db8ce3386bff27d324e3"}, ] tox-poetry-installer = [ {file = "tox-poetry-installer-0.7.0.tar.gz", hash = "sha256:409560bbaa6910475f224c2d1541b8c8d6215209bda395cd28c9307e8cbb861d"}, @@ -2288,8 +2288,8 @@ urllib3 = [ {file = "urllib3-1.26.4.tar.gz", hash = "sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937"}, ] virtualenv = [ - {file = "virtualenv-20.4.4-py2.py3-none-any.whl", hash = "sha256:a935126db63128861987a7d5d30e23e8ec045a73840eeccb467c148514e29535"}, - {file = "virtualenv-20.4.4.tar.gz", hash = "sha256:09c61377ef072f43568207dc8e46ddeac6bcdcaf288d49011bda0e7f4d38c4a2"}, + {file = "virtualenv-20.4.5-py2.py3-none-any.whl", hash = "sha256:73b4186ee7e08ffd1a96cd5d60e5a946132f8ce4736e8f209eda3a6c35b2ceb8"}, + {file = "virtualenv-20.4.5.tar.gz", hash = "sha256:e82dbb66e0d6ecf626f037df256f185571da552007bfa9f3f317216f5f3aac1c"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, diff --git a/pyproject.toml b/pyproject.toml index ba369fe..4161414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,17 @@ [tool.poetry] -name = "dehance" +name = "imagemuck" version = "0.1.0" license = "MIT" authors = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"] description = "HTTP server for uploading images and generating thumbnails" -repository = "https://github.com/mocproject/dehance/" +repository = "https://github.com/mocproject/imagemuck/" packages = [ - {include = "dehance"}, + {include = "imagemuck"}, {include = "tests", format = "sdist"} ] include = [ - "dehance/py.typed", - "dehance/resources/openapi.yaml" + "imagemuck/py.typed", + "imagemuck/resources/openapi.yaml" ] keywords = ["flask", "image", "thumbnail", "hosting"] readme = "README.md" diff --git a/tests/test_about.py b/tests/test_about.py index 96429d6..b74c783 100644 --- a/tests/test_about.py +++ b/tests/test_about.py @@ -3,7 +3,7 @@ from pathlib import Path import toml -from dehance import __about__ +from imagemuck import __about__ def test_about(): diff --git a/tox.ini b/tox.ini index a4a8216..6375c8a 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ locked_deps = pytest-cov toml commands = - pytest --cov={envsitepackagesdir}/dehance --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/ + pytest --cov={envsitepackagesdir}/imagemuck --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/ [testenv:static] description = Static formatting and quality enforcement @@ -35,8 +35,8 @@ locked_deps = pylint commands = pre-commit run --all-files - pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/dehance/ - mypy --ignore-missing-imports --no-strict-optional {toxinidir}/dehance/ + pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/imagemuck/ + mypy --ignore-missing-imports --no-strict-optional {toxinidir}/imagemuck/ [testenv:static-tests] description = Static formatting and quality enforcement for the tests @@ -60,7 +60,7 @@ locked_deps = safety poetry commands = - bandit --recursive --quiet {toxinidir}/dehance/ + bandit --recursive --quiet {toxinidir}/imagemuck/ bandit --recursive --quiet --skip B101 {toxinidir}/tests/ poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev safety check --bare --file {envtmpdir}/requirements.txt @@ -72,5 +72,5 @@ locked_deps = sphinx sphinx-autodoc-typehints commands = - sphinx-apidoc --no-toc --output-dir {toxinidir}/docs/ {toxinidir}/dehance/ + sphinx-apidoc --no-toc --output-dir {toxinidir}/docs/ {toxinidir}/imagemuck/ sphinx-build -W -b html {toxinidir}/docs/ {toxinidir}/docs/_build