diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..2c5fa7079e1ff87cd5bd040a456e0db34e9a0af0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,38 @@ +# Manifest syntax https://docs.python.org/2/distutils/sourcedist.html +graft wheelhouse + +recursive-exclude __pycache__ *.py[cod] *.orig + +# Include the README and CHANGELOG +include *.md +recursive-include research_mnist *.md + +# Include the license file +include LICENSE + +exclude *.sh +exclude *.toml +exclude *.svg + +# exclude tests from package +recursive-exclude tests * +recursive-exclude site * +exclude tests + +# Exclude the documentation files +recursive-exclude docs * +exclude docs + +# Include the Requirements +include requirements.txt + +# Exclude build configs +exclude *.yml + +prune .git +prune .github +prune .circleci +prune notebook* +prune temp* +prune test* +prune benchmark* diff --git a/project/__init__.py b/project/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3b15de5fb6e1b7d42b29d08230f7674cc647cc22 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -0,0 +1,19 @@ +"""Root package info.""" + +__version__ = '0.0.0' +__author__ = 'PyTorch Lightning et al.' +__author_email__ = 'name@pytorchlightning.ai' +__license__ = 'TBD' +__copyright__ = 'Copyright (c) 2020-2020, %s.' % __author__ +# TODO: edit this page link +__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning-conference-seed' +__docs__ = "Research Seed." +__long_doc__ = """ +What is it? +----------- +This is starter project template which shall simplify initial steps for each new PL project... + +Except the implemented sections: + - sample package + - setting CI +""" diff --git a/setup.py b/setup.py index 3de44ddb7dcf7a866421b6aade7ebad55e8752f3..b831299662f70a75a074c509abeceafcdf13ae08 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,66 @@ #!/usr/bin/env python +import os +# Always prefer setuptools over distutils from setuptools import setup, find_packages + +# https://packaging.python.org/guides/single-sourcing-package-version/ +# http://blog.ionelmc.ro/2014/05/25/python-packaging/ + +PATH_ROOT = os.path.dirname(__file__) + +import project # noqa: E402 + + +def load_requirements(path_dir=PATH_ROOT, comment_char='#'): + with open(os.path.join(path_dir, 'requirements.txt'), 'r') as file: + lines = [ln.strip() for ln in file.readlines()] + reqs = [ln[:ln.index(comment_char)] if comment_char in ln else ln for ln in lines] + reqs = [ln for ln in reqs if ln] + return reqs + + +# https://packaging.python.org/discussions/install-requires-vs-requirements / +# keep the meta-data here for simplicity in reading this file... it's not obvious +# what happens and to non-engineers they won't know to look in init ... +# the goal of the project is simplicity for researchers, don't want to add too much +# engineer specific practices setup( name='project', - version='0.0.0', - description='Describe Your Cool Project', - author='', - author_email='', - # REPLACE WITH YOUR OWN GITHUB PROJECT LINK - url='https://github.com/PyTorchLightning/pytorch-lightning-conference-seed', - install_requires=['pytorch-lightning'], - packages=find_packages(), -) + version=project.__version__, + description=project.__docs__, + author=project.__author__, + author_email=project.__author_email__, + url=project.__homepage__, + download_url='https://github.com/PyTorchLightning/pytorch-lightning-conference-seed', + license=project.__license__, + packages=find_packages(exclude=['tests', 'docs']), + + long_description=project.__long_doc__, + long_description_content_type='text/markdown', + include_package_data=True, + zip_safe=False, + keywords=['deep learning', 'pytorch', 'AI'], + python_requires='>=3.6', + setup_requires=[], + install_requires=load_requirements(PATH_ROOT), + + classifiers=[ + 'Environment :: Console', + 'Natural Language :: English', + # How mature is this project? Common values are + # 3 - Alpha, 4 - Beta, 5 - Production/Stable + 'Development Status :: 3 - Alpha', + # Indicate who your project is intended for + 'Intended Audience :: Developers', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + # Pick your license as you wish + # 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + # Specify the Python versions you support here. In particular, ensure + # that you indicate whether you support Python 2, Python 3 or both. + 'Programming Language :: Python :: 3', + ], +)