Skip to content

Commit

Permalink
use poetry build & publish, remove setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
maguowei committed Jan 14, 2023
1 parent 502a424 commit aed7e56
Show file tree
Hide file tree
Showing 9 changed files with 407 additions and 320 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -18,14 +18,17 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U pycodestyle
python setup.py install
pip install -U pycodestyle poetry
poetry install
- name: pycodestyle
run: pycodestyle --max-line-length=200 starred
- name: Build project for distribution
run: poetry build
- name: test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: starred --username maguowei --token ${GITHUB_TOKEN} --sort
run: |
poetry run starred --username maguowei --token ${GITHUB_TOKEN} --sort
# - name: Lint with flake8
# run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Publish Python Package

on:
workflow_dispatch:
Expand All @@ -17,11 +17,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install poetry
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
poetry publish --build
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,10 @@ click `Run workflow` button
2. Install the master branch version

```bash
$ pip install -e git+https://github.com/maguowei/starred#egg=starred
$ poetry build
$ pip install dist/starred-${x.x.x}.tar.gz
```
3. Dev & RUN
```bash
poetry run starred --help
```
614 changes: 364 additions & 250 deletions poetry.lock

Large diffs are not rendered by default.

28 changes: 25 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
[tool.poetry]
name = "starred"
version = "3.2.0"
description = ""
version = "4.3.0"
description = "creating your own Awesome List used GitHub stars!"
authors = ["maguowei <[email protected]>"]
homepage = "https://github.com/maguowei/starred"
repository = "https://github.com/maguowei/starred"
documentation = "https://github.com/maguowei/starred"
keywords = ["GitHub starred", "starred"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
include = ["README.md"]
readme = "README.md"
license = "MIT"

[tool.poetry.scripts]
starred = "starred.starred:starred"

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.7"
click = "^8.1.3"
"requests" = "^2.28.2"
"github3.py" = "^3.2.0"
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion starred/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '4.2.0'
VERSION = '4.3.0'

0 comments on commit aed7e56

Please sign in to comment.