From c8b7ea2e97fce9526a47c445aedff706c264cb56 Mon Sep 17 00:00:00 2001 From: Jensun Ravichandran Date: Wed, 21 Apr 2021 13:13:28 +0200 Subject: [PATCH] Initial commit --- .gitignore | 129 ++++++++++++++++++++++++++ LICENSE | 21 +++++ README.md | 4 + prototorch/plugintemplate/__init__.py | 8 ++ setup.py | 57 ++++++++++++ 5 files changed, 219 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 prototorch/plugintemplate/__init__.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6e4761 --- /dev/null +++ b/.gitignore @@ -0,0 +1,129 @@ +# 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 b/LICENSE new file mode 100644 index 0000000..a4d2379 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Saxon Institute of Computation Intelligence and Machine Learning + +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/README.md b/README.md new file mode 100644 index 0000000..5dfaa44 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# prototorch_plugintemplate +Prototorch plugin template. + +TODO: Instructions diff --git a/prototorch/plugintemplate/__init__.py b/prototorch/plugintemplate/__init__.py new file mode 100644 index 0000000..9b1a44b --- /dev/null +++ b/prototorch/plugintemplate/__init__.py @@ -0,0 +1,8 @@ +from importlib.metadata import version, PackageNotFoundError + +VERSION_FALLBACK = "uninstalled_version" +try: + __version__ = version(__name__.replace(".", "-")) +except PackageNotFoundError: + __version__ = VERSION_FALLBACK + pass \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..675bf92 --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +""" + _____ _ _______ _ + | __ \ | | |__ __| | | + | |__) | __ ___ | |_ ___ | | ___ _ __ ___| |__ + | ___/ '__/ _ \| __/ _ \| |/ _ \| '__/ __| '_ \ + | | | | | (_) | || (_) | | (_) | | | (__| | | | + |_| |_| \___/ \__\___/|_|\___/|_| \___|_| |_|Plugin + +ProtoTorch plugintemplate Plugin Package +""" +from pkg_resources import safe_name +from setuptools import setup +from setuptools import find_namespace_packages + +PLUGIN_NAME = "plugintemplate" + +PROJECT_URL = "https://github.com/si-cim/prototorch_plugintemplate" +DOWNLOAD_URL = "https://github.com/si-cim/prototorch_plugintemplate.git" + +with open("README.md", "r") as fh: + long_description = fh.read() + +INSTALL_REQUIRES = ["prototorch"] + +setup( + name=safe_name("prototorch_" + PLUGIN_NAME), + use_scm_version=True, + descripion="Template for ProtoTorch Plugin.", + long_description=long_description, + author="Alexander Engelsberger", + author_email="engelsbe@hs-mittweida.de", + url=PROJECT_URL, + download_url=DOWNLOAD_URL, + license="MIT", + install_requires=INSTALL_REQUIRES, + setup_requires=["setuptools_scm"], + extras_require={}, + classifiers=[ + "Development Status :: 2 - Pre-Alpha", + "Environment :: Plugins", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + ], + entry_points={"prototorch.plugins": f"{PLUGIN_NAME} = prototorch.{PLUGIN_NAME}"}, + packages=find_namespace_packages(include=["prototorch.*"]), + zip_safe=False, +)