Skip to content

Commit 3aaccf2

Browse files
committed
move to new setup.cfg and pyproject.toml and add CI job to publish
1 parent 7829251 commit 3aaccf2

28 files changed

+73
-71
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
release:
3+
types: [published]
4+
name: Publish
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Install dependencies
11+
run: |
12+
python -m pip install --upgrade pip
13+
pip install .
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: '3.10'
18+
- name: Publish distribution 📦 to PyPI
19+
uses: pypa/gh-action-pypi-publish@master
20+
with:
21+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ jobs:
1313
with:
1414
python-version: ${{ matrix.python-version }}
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@master
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip
20-
pip install .
21-
pip install coverage coveralls pylint
20+
pip install -e ".[test]"
2221
- name: Lint
23-
run: pylint ./docker_hub
22+
run: pylint ./src
2423
- name: Test
25-
run: coverage run --source=docker_hub setup.py test
24+
run: coverage run --source=src setup.py test
2625
- name: After success
2726
if: ${{ success() }}
2827
env:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Docker Hub CLI
99
A CLI tool to access Docker Hub from your terminal.
1010

1111
## Installation
12-
> Note: Python 3.6+ is required.
12+
> Note: Minimum Python 3.7 is required.
1313
1414
You should have pip installed in your system.
1515
```sh

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "pytest-runner"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,48 @@
11
[bdist_wheel]
2-
universal=1
2+
universal = 1
33

44
[metadata]
5-
description_file = README.md
6-
5+
name = docker-hub
6+
version = attr: src.__version__
7+
author = Amal Francis
8+
author_email = [email protected]
9+
url = http://github.com/amalfra/docker-hub
10+
description = Access docker hub from your terminal
11+
long_description = file: README.md
12+
long_description_content_type = text/markdown
13+
keywords = docker, cli, docker-hub, client, tools
14+
license = MIT
15+
classifiers =
16+
Development Status :: 5 - Production/Stable
17+
Environment :: Console
18+
Intended Audience :: Developers
19+
License :: OSI Approved :: MIT License
20+
Natural Language :: English
21+
Programming Language :: Python :: 3
22+
723
[aliases]
8-
test=pytest
24+
test = pytest
25+
26+
[options]
27+
include_package_data = True
28+
packages = find:
29+
python_requires = >= 3.7
30+
install_requires =
31+
requests ==2.28.0
32+
tabulate ==0.8.10
33+
python-dateutil ==2.8.2
34+
35+
[options.entry_points]
36+
console_scripts =
37+
docker-hub = src.__main__:main
38+
39+
[options.package_data]
40+
* = README.md
41+
42+
[options.extras_require]
43+
test =
44+
pytest
45+
pytest-cov
46+
pylint
47+
coverage
48+
coveralls

setup.py

Lines changed: 0 additions & 61 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)