diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..1d926bc --- /dev/null +++ b/.github/workflows/pypi.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..e1b4b23 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -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 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..92228ba --- /dev/null +++ b/LICENSE @@ -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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ab5948 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## Soon. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..255412e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,53 @@ +[project] +name = "tgram" +dynamic = ["version"] +description = "HTTP Bot API Client" + + +authors = [{ name = "Zaid", email = "2ei@zaid.pro" }] +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"] \ No newline at end of file diff --git a/tgram/__init__.py b/tgram/__init__.py index d9fb420..abb6db9 100644 --- a/tgram/__init__.py +++ b/tgram/__init__.py @@ -1,6 +1,12 @@ from .methods import Methods from .decorators import Decorators +from . import types + +__all__ = [ + "types", + "TgBot" +] class TgBot(Methods, Decorators): pass # TODO