Skip to content

Commit

Permalink
fix entry_points bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
suqingdong committed Aug 24, 2020
1 parent 6b48c8e commit 7dcf7eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion impact_factor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
DEFAULT_DB = os.path.join(BASE_DIR, 'data', 'impact_factor.db')

__version__ = '1.0.2'
__version__ = '1.0.3'
__author__ = 'suqingdong'
__author_email__ = '[email protected]'

Expand Down
12 changes: 7 additions & 5 deletions impact_factor/bin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ def get_args():
return args


def main():

kwargs = get_args()
kwargs.func(**vars(kwargs))
def main(**kwargs):

IF = ImpactFactor(**kwargs)

Expand All @@ -109,5 +106,10 @@ def main():
IF.pubmed_filter(indexed=True, **kwargs)


def run():
args = get_args()
args.func(**vars(args))


if __name__ == '__main__':
main()
run()
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
version=__version__,
author=__author__,
author_email=__author_email__,
description='Impact Factor Toolkits',
description='Impact Factor Toolkits for Pubmed',
long_description=open(os.path.join(BASE_DIR, 'README.md')).read(),
long_description_content_type="text/markdown",
url='https://github.com/suqingdong/impact_factor',
Expand All @@ -25,8 +25,8 @@
packages=find_packages(),
include_package_data=True,
entry_points={'console_scripts': [
'impact_factor = impact_factor.bin.main:main',
'IF = impact_factor.bin.main:main',
'impact_factor = impact_factor.bin.main:run',
'IF = impact_factor.bin.main:run',
]},
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit 7dcf7eb

Please sign in to comment.