Skip to content

Commit 6f4e1cf

Browse files
authored
Add setup.cfg for metadata #76 (#78)
- Add pyproject.toml for build requirements - Adjust Dockerfile for pip package install, add pyproject.toml and setup.cfg - Delete requirements.txt - Update .dockerignore - Bump version: v0.4.8 -> 0.4.9
1 parent f4121e4 commit 6f4e1cf

File tree

8 files changed

+67
-46
lines changed

8 files changed

+67
-46
lines changed

.dockerignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
.coverage
12
.git
23
.github
4+
.idea
5+
.pre-commit-config.yaml
6+
.pytest*
37
CHANGELOG.md
48
conftest.py
59
LICENSE
610
MANIFEST.in
711
build
812
dist
9-
venv*
13+
testing
14+
venv*

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
python -m pip install pytest pytest-cov
2929
- name: Install github_stats_pages
3030
run: |
31-
python setup.py install
31+
pip install .
3232
- name: Test with pytest
3333
run: |
3434
echo "Username for unit tests : ${{ github.actor }}"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ LABEL maintainer="[email protected]"
77

88
COPY github_stats_pages ./github_stats_pages
99
COPY scripts ./scripts
10-
COPY requirements.txt setup.py ./
10+
COPY pyproject.toml setup.py setup.cfg ./
1111
COPY README.md .
1212
COPY entrypoint.sh /entrypoint.sh
1313

14-
RUN python setup.py develop
14+
RUN pip install -e .
1515

1616
ENTRYPOINT ["/entrypoint.sh"]

github_stats_pages/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.8"
1+
__version__ = "0.4.9"

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>=61.1.0", "wheel", "Cython", "numpy>=1.21.1,<2.0.0"]
3+
build-backend = "setuptools.build_meta"

requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.cfg

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[metadata]
2+
name = github-stats-pages
3+
version = attr: github_stats_pages.__version__
4+
description = "Retrieve statistics for a user's repositories and populate the information onto a GitHub static page"
5+
long_description = file: README.md
6+
long_description_content_type = text/markdown
7+
license = MIT
8+
license_files =
9+
LICENSE
10+
classifiers =
11+
Development Status :: 4 - Beta
12+
Programming Language :: Python :: 3 :: Only
13+
Programming Language :: Python :: 3.7
14+
Programming Language :: Python :: 3.8
15+
Programming Language :: Python :: 3.9
16+
url = https://github.com/astrochun/github-stats-pages
17+
project_urls =
18+
Tracker = https://github.com/astrochun/github-stats-pages/issues
19+
Source = https://github.com/astrochun/github-stats-pages
20+
Documentation = https://github.com/astrochun/github-stats-pages/blob/main/README.md
21+
author = Chun Ly
22+
author_email = [email protected]
23+
maintainer = Chun Ly
24+
maintainer_email = [email protected]
25+
26+
[options]
27+
python_requires = >=3.7
28+
zip_safe = False
29+
include_package_data = True
30+
install_requires =
31+
requests >= 2.22.0
32+
pandas == 1.2.4
33+
github-traffic-stats == 1.2.0
34+
Jinja2 == 3.0.3
35+
bokeh == 2.3.0
36+
markdown == 3.3.4
37+
PyGithub == 1.55
38+
tabulate == 0.8.7
39+
scripts =
40+
scripts/get_repo_list
41+
scripts/gts_run_all_repos
42+
scripts/merge-csv.sh
43+
scripts/make_stats_plots
44+
#package_dir=
45+
# =github_stats_pages
46+
packages=
47+
github_stats_pages
48+
49+
[options.package_data]
50+
* = templates/*
51+
52+
#[options.packages.find]
53+
#where=github_stats_pages

setup.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
11
from setuptools import setup
22

3-
with open("README.md", "r", encoding='utf-8') as fh:
4-
long_description = fh.read()
5-
6-
with open("requirements.txt", "r") as fr:
7-
requirements = fr.read().splitlines()
8-
9-
setup(
10-
name='github-stats-pages',
11-
version='0.4.8',
12-
packages=['github_stats_pages'],
13-
scripts=['scripts/get_repo_list',
14-
'scripts/gts_run_all_repos',
15-
'scripts/merge-csv.sh',
16-
'scripts/make_stats_plots'],
17-
include_package_data=True,
18-
package_data={'github_stats_pages': ['templates/*']},
19-
url='https://github.com/astrochun/github-stats-pages',
20-
license='MIT',
21-
author='Chun Ly',
22-
author_email='[email protected]',
23-
description='Retrieve statistics for a user\'s repositories and populate the information onto a GitHub static page',
24-
long_description=long_description,
25-
long_description_content_type='text/markdown',
26-
install_requires=requirements,
27-
python_requires='>=3.7',
28-
classifiers=[
29-
'Development Status :: 4 - Beta',
30-
'Programming Language :: Python :: 3 :: Only',
31-
'Programming Language :: Python :: 3.7',
32-
'Programming Language :: Python :: 3.8',
33-
'Programming Language :: Python :: 3.9'
34-
]
35-
)
3+
setup()

0 commit comments

Comments
 (0)