From 7b42c0dd780ac206f26621ff7aff35b26374d219 Mon Sep 17 00:00:00 2001 From: Alexander Amini Date: Mon, 30 Dec 2019 21:28:09 -0500 Subject: [PATCH] setup configuration files --- .gitignore | 133 +++++++++++++++++++++++++++++++++++++++- LICENSE.txt | 17 +++++ mitdeeplearning/lab1.py | 2 +- setup.cfg | 3 + setup.py | 36 +++++++++++ 5 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 LICENSE.txt create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 952f12cb..5dc3011c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,137 @@ .ipynb_checkpoints -lab1/*.pyc -lab2/*.pyc *.pyc *.h5 lab2/logs/* + + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..e2080431 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,17 @@ +MIT License +Copyright (c) 2018 YOUR NAME +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mitdeeplearning/lab1.py b/mitdeeplearning/lab1.py index 41ecf576..763fb814 100644 --- a/mitdeeplearning/lab1.py +++ b/mitdeeplearning/lab1.py @@ -1,2 +1,2 @@ def func(): - print("hi") + print("test package") diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..3287428d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +# Inside of setup.cfg +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..177bccab --- /dev/null +++ b/setup.py @@ -0,0 +1,36 @@ +from pkg_resources import DistributionNotFound, get_distribution +from distutils.core import setup + + +def get_dist(pkgname): + try: + return get_distribution(pkgname) + except DistributionNotFound: + return None + +install_deps = [ + 'numpy', + 'regex', +] +if get_dist('tensorflow>=2.0.0') is None and get_dist('tensorflow_gpu>=2.0.0') is None: + install_deps.append('tensorflow>=2.0.0a') + +setup( + name = 'mitdeeplearning', # How you named your package folder (MyLib) + packages = ['mitdeeplearning'], # Chose the same as "name" + version = '0.1', # Start with a small number and increase it with every change you make + license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository + description = 'Official software labs for MIT Introduction to Deep Learning (http://introtodeeplearning.com)', # Give a short description about your library + author = 'Alexander Amini', # Type in your name + author_email = 'introtodeeplearning-staff@mit.edu', # Type in your E-Mail + url = 'http://introtodeeplearning.com', # Provide either the link to your github or to your website + download_url = 'https://github.com/aamini/introtodeeplearning_labs/archive/v0.1.tar.gz', # I explain this later on + keywords = ['deep learning', 'neural networks', 'tensorflow', 'introduction'], # Keywords that define your package best + install_requires=install_deps, + classifiers=[ + 'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package + 'License :: OSI Approved :: MIT License', # Again, pick a license + 'Programming Language :: Python :: 3', #Specify which pyhton versions that you want to support', + 'Programming Language :: Python :: 3.6', + ], +)