diff --git a/.github/renovate.json b/.github/renovate.json index 26e83e4f..9a1aa639 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,13 +2,23 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base", - ":semanticCommitTypeAll(⬆️)" + ":semanticCommitTypeAll(⬆️)", + ":disableDependencyDashboard" ], "semanticCommits": "enabled", - "pip_requirements": { - "enabled": true, - "fileMatch": [ - "(^|/)([\\w-]*)requirements\\.(txt|pip)$" - ] - } + "labels": ["dependencies"], + "packageRules": [ + { + "matchUpdateTypes": ["minor", "patch"], + "matchCurrentVersion": "!/^0/", + "automerge": true, + "minimumReleaseAge": "8 hours" + }, + { + "matchUpdateTypes": ["major"], + "automerge": false, + "matchBaseBranches": ["dev"], + "minimumReleaseAge": "30 days" + } + ] } diff --git "a/.github/workflows/\360\237\221\267\342\200\215\342\231\202\357\270\217Flow.yml" "b/.github/workflows/\360\237\221\267\342\200\215\342\231\202\357\270\217Flow.yml" index 89122ed9..bd780e1e 100644 --- "a/.github/workflows/\360\237\221\267\342\200\215\342\231\202\357\270\217Flow.yml" +++ "b/.github/workflows/\360\237\221\267\342\200\215\342\231\202\357\270\217Flow.yml" @@ -1,12 +1,11 @@ -name: πŸ‘·β€β™‚οΈFlow +name: πŸ‘·Flow on: push: branches: ["main"] pull_request: workflow_dispatch: - #schedule: - # - cron: '42 23 * * 5' + jobs: lint: @@ -24,10 +23,6 @@ jobs: needs: [lint] uses: mraniki/coding_toolset/.github/workflows/🐍Build.yml@main secrets: inherit - prerelease: - needs: [build] - uses: mraniki/coding_toolset/.github/workflows/πŸ₯·Prerelease.yml@main - secrets: inherit release: needs: [build] uses: mraniki/coding_toolset/.github/workflows/πŸ“¦Release.yml@main @@ -35,7 +30,4 @@ jobs: docker: needs: [release] uses: mraniki/coding_toolset/.github/workflows/🐳Docker.yml@main - secrets: inherit - # deploy: - # needs: [docker] - # uses: mraniki/coding_toolset/.github/workflows/☁️Deploy.yml@main \ No newline at end of file + secrets: inherit \ No newline at end of file diff --git a/.requirements/requirements.txt b/.requirements/requirements.txt index 01e5ec23..a1081d84 100644 --- a/.requirements/requirements.txt +++ b/.requirements/requirements.txt @@ -1,3 +1,3 @@ -findmyorder -fastapi -uvicorn +dynaconf==3.2.0 ; python_version >= "3.10" and python_version < "4.0" +emoji==2.6.0 ; python_version >= "3.10" and python_version < "4.0" +pyparsing==3.1.0 ; python_version >= "3.10" and python_version < "4.0" diff --git a/README.md b/README.md index c569f519..e5fb1966 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

-
+



diff --git a/examples/example.py b/examples/example.py index 200d6b3c..b792af57 100644 --- a/examples/example.py +++ b/examples/example.py @@ -7,6 +7,7 @@ import uvicorn from fastapi import FastAPI + from findmyorder import FindMyOrder, __version__ logging.basicConfig( diff --git a/findmyorder/main.py b/findmyorder/main.py index 7ace469b..6f193f47 100644 --- a/findmyorder/main.py +++ b/findmyorder/main.py @@ -6,9 +6,18 @@ import emoji from pyparsing import ( - Combine, Optional, Word, alphas, - nums, one_of, pyparsing_common, Suppress) + Combine, + Optional, + Suppress, + Word, + alphas, + nums, + one_of, + pyparsing_common, +) + from findmyorder import __version__ + from .config import settings diff --git a/pyproject.toml b/pyproject.toml index 737042d2..400fdf44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,32 @@ dynaconf = "^3.1.12" pyparsing = "^3.0.9" emoji = "^2.5.1" -[tool.poetry.dev-dependencies] + +[tool.poetry.group.dev.dependencies] python-semantic-release = "^8.0.2" +ruff = "^0.0.278" + +[tool.ruff] +select = [ + "E", # pycodestyle + "F", # pyflakes + "I", # isort +] +exclude = [ + ".github/*", + "docs/*", +] +ignore = ["E401","F401","F811"] +format = "github" +fixable = ["ALL"] + +[tool.pylint.exceptions] +overgeneral-exceptions = [ + "builtins.BaseException", + "builtins.Exception", + "builtins.RuntimeError", +] + [tool.poetry.group.test.dependencies] pytest = "^7.0" @@ -66,14 +90,44 @@ omit = [ ] [tool.semantic_release] -version_variable = ["pyproject.toml:version","findmyorder/__init__.py:__version__"] -branch = "main" -upload_to_pypi = true -upload_to_release = true +upload_to_vcs_release = true +version_variables = ["pyproject.toml:version","findmyorder/__init__.py:__version__"] build_command = "pip install poetry && poetry build" -commit_parser = "semantic_release.history.emoji_parser" -use_textual_changelog_sections = true -major_emoji = "BREAKING,πŸ’₯,:boom:" -minor_emoji = "feat,πŸ₯š,:egg:,πŸš€,:rocket:,πŸ’„,:lipstick:,✨,:sparkles:" -patch_emoji = "fix,bump,Update,🎨,:art:,πŸ›,:bug:,πŸš‘,:ambulance:,⚑,:zap:,πŸ”₯,:fire:,🚨,:rotating_light:,♻️,:recycle:,πŸ”§,:wrench:,⬆️,:arrow_up:,🩹,:adhesive_bandage:,πŸ‘·,:construction_worker:,πŸ“,:memo:,πŸ”’,:lock:,πŸ‘½,:alien:,πŸ’¬,:speech_balloon:,πŸ₯…,:goal_net:,βœ…,:white_check_mark:,🐳,:whale:,πŸ™ˆ,:see_no_evil:,βš—οΈ,:alembic:,🧐,:monocle_face:,πŸ”‡,:mute:,πŸ”Š:volume:" +commit_parser = "emoji" +major_tags = [ + "BREAKING", + "πŸ’₯", + ":boom:", + ] +minor_tags = ["feat", + "πŸ₯š",":egg:", + "πŸš€",":rocket:", + "πŸ’„",":lipstick:", + "✨",":sparkles:", +] +patch_tags = ["fix","bump","Update", + "🎨",":art:", + "πŸ›",":bug:", + "πŸš‘",":ambulance:", + "⚑",":zap:", + "πŸ”₯",":fire:", + "🚨",":rotating_light:", + "♻️",":recycle:", + "πŸ”§",":wrench:", + "⬆️",":arrow_up:", + "🩹",":adhesive_bandage:", + "πŸ‘·",":construction_worker:", + "πŸ“",":memo:", + "πŸ”’",":lock:", + "πŸ‘½",":alien:", + "πŸ’¬",":speech_balloon:", + "πŸ₯…",":goal_net:", + "βœ…",":white_check_mark:", + "🐳",":whale:", + "πŸ™ˆ",":see_no_evil:", + "βš—οΈ",":alembic:", + "🧐",":monocle_face:", + "πŸ”‡",":mute:", + "πŸ”Š",":volume:", +] diff --git a/tests/test_unit.py b/tests/test_unit.py index 216aff2f..691f74ea 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -3,7 +3,9 @@ """ from datetime import datetime + import pytest + from findmyorder import FindMyOrder, settings