Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ venv/
.vscode/
__pycache__
*.pyc
*.egg-info
*.egg-info
.tox
dist
build
gitcomp.egg-info
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[build-system]
requires = [
"prettytable==2.1.0",
"wcwidth==0.1.8",
"urllib3==1.25.8",
"setuptools>=42",
"wheel"
]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tabulate==0.8.9
urllib3==1.25.8
urllib3==1.26.5
wcwidth==0.1.8
tox==3.24.0
25 changes: 14 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from setuptools import setup, find_packages

with open('requirements.txt') as f:
requirements = f.readlines()
requirements = [
'tabulate == 0.8.9',
'urllib3 == 1.26.5',
'wcwidth == 0.1.8'
]

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

setup(
Expand All @@ -14,27 +17,27 @@
url='https://github.com/avaish1409/gitcomp',
description='A python based command line tool to compare Github Users or Repositories.',
long_description=long_description,
long_description_content_type="text/markdown",
long_description_content_type='text/markdown',
license='MIT',
package_dir={"": "src"},
packages=find_packages(where="src"),
package_dir={'': 'src'},
packages=find_packages(where='src'),
entry_points={
'console_scripts': [
'gitcomp = gitcomp.__main__:main'
]
},
project_urls={
"Bug Tracker": "https://github.com/avaish1409/gitcomp/issues",
'Bug Tracker': 'https://github.com/avaish1409/gitcomp/issues',
'Documentation': 'https://avaish1409.github.io/gitcomp/',
'Source': 'https://github.com/avaish1409/gitcomp'
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
keywords='command-line-tools cli gitcomp python package compare git github',
install_requires=requirements,
python_requires=">=3.6",
python_requires='>=3.6',
zip_safe=False
)
30 changes: 30 additions & 0 deletions tests/basic_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import gitcomp

"""
Baisc test cases dependent on GitComp class output (as caputured in capsys)
- usernames
- reponames
- null args
"""


def test_user(capsys):
gitcomp.GitComp(['avaish1409'])

out, err = capsys.readouterr()
print(out)
assert err == ''


def test_repo(capsys):
gitcomp.GitComp(repos=['avaish1409/VideoChatBot'])

out, err = capsys.readouterr()
assert err == ''


def test_null(capsys):
gitcomp.GitComp()

out, err = capsys.readouterr()
assert err == ''
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tox]
envlist = py39
isolated_build=true

[testenv]
deps = pytest
commands = pytest