Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Jun 15, 2024
1 parent fa6032e commit 2151d9c
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to pypi
on:
workflow_dispatch:
push:
branches:
- "main"

paths:
- "tgram/__init__.py"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Buil tgram
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: |
python -m pip install build
python -m build
- name: Upload to pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check ruff format

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Check code format with ruff
run: |
ruff format --check tgram
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 ZAID

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Soon.
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[project]
name = "tgram"
dynamic = ["version"]
description = "HTTP Bot API Client"


authors = [{ name = "Zaid", email = "[email protected]" }]
dependencies = [
"asyncio",
"aiohttp",
"aiofiles"
]
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

keywords = ["telegram bot api client"]

[tool.hatch.version]
path = "tgram/__init__.py"

# Used to call hatch_build.py
[tool.hatch.build.hooks.custom]

[project.urls]
Homepage = "https://github.com/2ei/tgram"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build]
exclude = [".github", ".gitignore", "examples"]

[tool.hatch.build.targets.sdist]
include = [
"tgram",
]
exclude = [
".github/",
".gitignore",
"examples/"
]

[tool.hatch.build.targets.wheel]
ignore-vcs = true
packages = ["tgram"]
6 changes: 6 additions & 0 deletions tgram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from .methods import Methods
from .decorators import Decorators

from . import types

__all__ = [
"types",
"TgBot"
]

class TgBot(Methods, Decorators):
pass # TODO

0 comments on commit 2151d9c

Please sign in to comment.