From 5ca73487ac41a04c92ed3c59e52bc1369c97b018 Mon Sep 17 00:00:00 2001 From: jfm Date: Tue, 30 Apr 2024 10:39:54 +0200 Subject: [PATCH] Trying to setup ci --- .gitea/workflows/run.yaml | 24 ++++++++++++++++++++++++ Pipfile | 1 + pyproject.toml | 20 ++++++++++++++++++++ requirements.txt | 13 +++++++++++++ setup.py | 16 +++++++--------- 5 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 .gitea/workflows/run.yaml create mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.gitea/workflows/run.yaml b/.gitea/workflows/run.yaml new file mode 100644 index 0000000..a17be3d --- /dev/null +++ b/.gitea/workflows/run.yaml @@ -0,0 +1,24 @@ +name: Build and Release +run-name: ${{ gitea.actor }} +on: + push: + branches: + - main + +jobs: + run-terraform: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + - name: Install pipenv + run: pip install pipenv + - name: Run pipenv install + run: pipenv install --dev + - name: Run Pytest + run: pipenv run pytest + diff --git a/Pipfile b/Pipfile index f516395..34ba2e6 100644 --- a/Pipfile +++ b/Pipfile @@ -19,6 +19,7 @@ pytest = "*" pytest-cov = "*" bumpver = "*" twine = "*" +build = "*" [requires] python_version = "3.12" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..235e4b0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,20 @@ +[build-system] +requires = ["setuptools", "wheel", "build", "twine","bumpver"] +build-backend = "setuptools.build_meta:__legacy__" + +[tool.bumpver] +current_version = "0.1.0" +version_pattern = "MAJOR.MINOR.PATCH" +commit_message = "[skip ci] bump version {old_version} -> {new_version}" +commit = true +tag = true +push = true + +[tool.bumpver.file_patterns] +"pyproject.toml" = [ + 'current_version = "{version}"', +] +"setup.py" = [ + '{version}', +] + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..46e3820 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +-i https://pypi.org/simple +annotated-types==0.6.0 ; python_version >= '3.8' +certifi==2024.2.2 ; python_version >= '3.6' +charset-normalizer==3.3.2 ; python_full_version >= '3.7.0' +idna==3.7 ; python_version >= '3.5' +loguru==0.7.2 +oauthlib==3.2.2 ; python_version >= '3.6' +pydantic==2.7.1 +pydantic-core==2.18.2 ; python_version >= '3.8' +requests==2.31.0 +requests-oauthlib==2.0.0 +typing-extensions==4.11.0 ; python_version >= '3.8' +urllib3==2.2.1 ; python_version >= '3.8' diff --git a/setup.py b/setup.py index a64e22d..3b0884c 100644 --- a/setup.py +++ b/setup.py @@ -4,20 +4,18 @@ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( - name='pyyday-flows', - version='2023.1092', - author='Onboarding', - author_email='jfmo@nuuday.dk', - description='Classes and helpers to aid in developing onboarding flows', + name='pymastodon', + version='0.1.0', + author='Jesper Fussing Mørk', + author_email='jfmo@moerks.dk', + description='Mastodon library for easily creating Mastodon clients', long_description=long_description, long_description_content_type="text/markdown", - url='https://github.com/nuuday/pyyday-flows', + url='https://gitea.moerks.dk/jfm/pymastodon', project_urls={ - "Bug Tracker": "https://github.com/nuuday/pyyday-flows/issues", + "Bug Tracker": "https://gitea.moerks.dk/jfm/pymastodon/issues", }, license='MIT', package_dir={"": "src"}, packages=find_packages(where="src"), - # packages=["pyyday"], - install_requires=['pydantic', 'pyyday'], )