Skip to content

Commit

Permalink
Add setup.cfg for metadata #76 (#78)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
astrochun authored May 1, 2022
1 parent f4121e4 commit 6f4e1cf
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 46 deletions.
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.coverage
.git
.github
.idea
.pre-commit-config.yaml
.pytest*
CHANGELOG.md
conftest.py
LICENSE
MANIFEST.in
build
dist
venv*
testing
venv*
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python -m pip install pytest pytest-cov
- name: Install github_stats_pages
run: |
python setup.py install
pip install .
- name: Test with pytest
run: |
echo "Username for unit tests : ${{ github.actor }}"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ LABEL maintainer="astro.chun@gmail.com"

COPY github_stats_pages ./github_stats_pages
COPY scripts ./scripts
COPY requirements.txt setup.py ./
COPY pyproject.toml setup.py setup.cfg ./
COPY README.md .
COPY entrypoint.sh /entrypoint.sh

RUN python setup.py develop
RUN pip install -e .

ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion github_stats_pages/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.8"
__version__ = "0.4.9"
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=61.1.0", "wheel", "Cython", "numpy>=1.21.1,<2.0.0"]
build-backend = "setuptools.build_meta"
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

53 changes: 53 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[metadata]
name = github-stats-pages
version = attr: github_stats_pages.__version__
description = "Retrieve statistics for a user's repositories and populate the information onto a GitHub static page"
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
license_files =
LICENSE
classifiers =
Development Status :: 4 - Beta
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
url = https://github.com/astrochun/github-stats-pages
project_urls =
Tracker = https://github.com/astrochun/github-stats-pages/issues
Source = https://github.com/astrochun/github-stats-pages
Documentation = https://github.com/astrochun/github-stats-pages/blob/main/README.md
author = Chun Ly
author_email = astro.chun@gmail.com
maintainer = Chun Ly
maintainer_email = astro.chun@gmail.com

[options]
python_requires = >=3.7
zip_safe = False
include_package_data = True
install_requires =
requests >= 2.22.0
pandas == 1.2.4
github-traffic-stats == 1.2.0
Jinja2 == 3.0.3
bokeh == 2.3.0
markdown == 3.3.4
PyGithub == 1.55
tabulate == 0.8.7
scripts =
scripts/get_repo_list
scripts/gts_run_all_repos
scripts/merge-csv.sh
scripts/make_stats_plots
#package_dir=
# =github_stats_pages
packages=
github_stats_pages

[options.package_data]
* = templates/*

#[options.packages.find]
#where=github_stats_pages
34 changes: 1 addition & 33 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
from setuptools import setup

with open("README.md", "r", encoding='utf-8') as fh:
long_description = fh.read()

with open("requirements.txt", "r") as fr:
requirements = fr.read().splitlines()

setup(
name='github-stats-pages',
version='0.4.8',
packages=['github_stats_pages'],
scripts=['scripts/get_repo_list',
'scripts/gts_run_all_repos',
'scripts/merge-csv.sh',
'scripts/make_stats_plots'],
include_package_data=True,
package_data={'github_stats_pages': ['templates/*']},
url='https://github.com/astrochun/github-stats-pages',
license='MIT',
author='Chun Ly',
author_email='astro.chun@gmail.com',
description='Retrieve statistics for a user\'s repositories and populate the information onto a GitHub static page',
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=requirements,
python_requires='>=3.7',
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9'
]
)
setup()

0 comments on commit 6f4e1cf

Please sign in to comment.