Skip to content

Commit

Permalink
Restructure for poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
plataux committed Apr 11, 2022
1 parent 8b77132 commit 7746fe1
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 55 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

name: Tag and Release

on:
workflow_dispatch:

jobs:

build_tag_publish:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Setup Poetry
- uses: Gr1N/setup-poetry@v7
with:
poetry-version: 1.1.13
- run: poetry --version

# Build Poetry
- name: Build Python package
run: poetry build

# Capture the project version from pyproject.toml
- name: get and set version
id: vars
run: |
arr=($(poetry version))
echo ::set-output name=version::${arr[1]}
# Create a Tag,
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
draft: false
commit: "main"
token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ github.event.inputs.tag }}
tag: ${{ steps.vars.outputs.version }}

# Push to Private Repo with Basic Auth
- name: Publish Packages
run: |
poetry config repositories.private_rep $REPO_URL
poetry config http-basic.private_rep $REPO_USER $REPO_PASSWORD
poetry publish -r private_rep
env:
REPO_USER: ${{ secrets.REPO_USER }}
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
REPO_URL: ${{ secrets.REPO_URL }}

41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@

[tool.poetry]
name = "purse"
version = "0.24.0"
description = "High Level Asyncio interface to redis"
license = "Apache-2.0"
authors = ["mk <mk@plataux.com>"]
maintainers = []
readme = "README.md"
homepage = "https://plataux.com"
repository = "https://github.com/plataux/purse"
documentation = ""
keywords = ['key-value',"caching", "messaging"]
classifiers = [
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent"
]
packages = [
{ include = "purse", from = "src" },
]


[tool.poetry.dependencies]
python = "^3.8"

pydantic = "^1.9"
cryptography = "^36"
aioredis = "^2"

[tool.poetry.dev-dependencies]
flake8 = "^4.0"
tox = "^3.24"
pytest = "^6.2"
pytest-cov = "^3.0"
mypy = "^0.910"
sphinx = "^4.2"
sphinx-rtd-theme = "^1.0"
recommonmark = "^0.7"

[build-system]
requires = ["setuptools>=42.0","wheel"]
build-backend = "setuptools.build_meta"
Expand Down
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

9 changes: 0 additions & 9 deletions requirements_dev.txt

This file was deleted.

42 changes: 0 additions & 42 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
[metadata]
name = purse
version = 0.22
author = Plataux LLC
license = Apache License Version 2.0
license_file = LICENSE
author_email = mk@plataux.com
description = High Level Asyncio interface to redis
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/plataux/purse
project_urls =
Bug Tracker = https://github.com/plataux/purse/issues
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent

[options]
package_dir =
= src
packages = find:
python_requires = >=3.8
install_requires =
setuptools>=50.0.0
pydantic>=1.9
aioredis~=2.0.0

[options.packages.find]
where = src

[options.extras_require]
testing =
flake8==4.0.1
tox==3.24.4
pytest==6.2.5
pytest-cov==3.0.0
mypy==0.910
sphinx~=4.2.0
sphinx-rtd-theme~=1.0.0
recommonmark~=0.7.1


[options.package_data]
purse = py.typed
Expand Down

0 comments on commit 7746fe1

Please sign in to comment.