Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 CI Change in pytoml + ruff + semantic #243

Merged
merged 6 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
14 changes: 3 additions & 11 deletions .github/workflows/👷‍♂️Flow.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: 👷‍♂️Flow
name: 👷Flow

on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
#schedule:
# - cron: '42 23 * * 5'


jobs:
lint:
Expand All @@ -24,18 +23,11 @@ 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
secrets: inherit
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
secrets: inherit
6 changes: 3 additions & 3 deletions .requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<td>
<a href="https://pypi.org/project/findmyorder/"><img src="https://img.shields.io/pypi/v/findmyorder?style=for-the-badge&logo=PyPI&logoColor=white"></a><br>
<a href="https://pypi.org/project/findmyorder/"><img src="https://img.shields.io/pypi/dm/findmyorder?style=for-the-badge&logo=PyPI&logoColor=white"></a><br>
<a href="https://github.com/mraniki/findmyorder"><img src="https://img.shields.io/github/actions/workflow/status/mraniki/findmyorder/%F0%9F%91%B7%E2%80%8D%E2%99%82%EF%B8%8FFlow.yml?style=for-the-badge&logo=GitHub&logoColor=white"></a><br>
<a href="https://github.com/mraniki/findmyorder"><img src="https://img.shields.io/github/actions/workflow/status/mraniki/findmyorder/%F0%9F%91%B7Flow.yml?style=for-the-badge&logo=GitHub&logoColor=white"></a><br>
<a href="https://talky.readthedocs.io/projects/findmyorder/index.html"><img src="https://readthedocs.org/projects/findmyorder/badge/?version=latest&style=for-the-badge"></a><br>
<a href="https://codebeat.co/projects/github-com-mraniki-findmyorder-main"><img src="https://codebeat.co/badges/9b113098-d22d-498d-9c61-eb1e96c1311a"/></a><br>
<a href="https://codecov.io/gh/mraniki/findmyorder"><img src="https://codecov.io/gh/mraniki/findmyorder/branch/main/graph/badge.svg?token=4838MSZNCC"/> </a><br>
Expand Down
1 change: 1 addition & 0 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import uvicorn
from fastapi import FastAPI

from findmyorder import FindMyOrder, __version__

logging.basicConfig(
Expand Down
13 changes: 11 additions & 2 deletions findmyorder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
74 changes: 64 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:",
]
2 changes: 2 additions & 0 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"""

from datetime import datetime

import pytest

from findmyorder import FindMyOrder, settings


Expand Down
Loading