-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1898a9d
commit f93915e
Showing
5 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
torch>=1.6 | ||
numpy>=1.16.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[flake8] | ||
# TODO: this should be 88 or 100 according PEP8 | ||
max-line-length = 120 | ||
exclude = .tox,*.egg,build,temp | ||
select = E,W,F | ||
doctests = True | ||
verbose = 2 | ||
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes | ||
format = pylint | ||
ignore = E731,W504,F401,F841,E722,W503 | ||
|
||
[build_sphinx] | ||
source-dir = doc/source | ||
build-dir = doc/build | ||
all_files = 1 | ||
|
||
[upload_sphinx] | ||
upload-dir = doc/build/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Copyright The GeoML Team | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
import os | ||
from io import open | ||
|
||
from setuptools import setup, find_packages, Command | ||
|
||
try: | ||
import builtins | ||
except ImportError: | ||
import __builtin__ as builtins | ||
|
||
PATH_ROOT = os.path.dirname(__file__) | ||
builtins.__STOCHMAN_SETUP__ = True | ||
|
||
import stochman | ||
|
||
|
||
class CleanCommand(Command): | ||
"""Custom clean command to tidy up the project root.""" | ||
|
||
user_options = [] | ||
|
||
def initialize_options(self): | ||
pass | ||
|
||
def finalize_options(self): | ||
pass | ||
|
||
def run(self): | ||
os.system("rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info") | ||
|
||
|
||
PATH_ROOT = os.path.dirname(__file__) | ||
|
||
|
||
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 = [] | ||
for ln in lines: | ||
# filer all comments | ||
if comment_char in ln: | ||
ln = ln[: ln.index(comment_char)] | ||
if ln: # if requirement is not empty | ||
reqs.append(ln) | ||
return reqs | ||
|
||
|
||
setup( | ||
name="stochman", | ||
version=stochman.__version__, | ||
description=stochman.__docs__, | ||
author=stochman.__author__, | ||
author_email=stochman.__author_email__, | ||
license=stochman.__license__, | ||
packages=find_packages(), | ||
python_requires=">=3.8", | ||
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 :: Apache Software 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.8", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,26 @@ | |
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# limitations under the License. | ||
"""Root package info.""" | ||
|
||
import logging as python_logging | ||
import os | ||
import time | ||
|
||
_this_year = time.strftime("%Y") | ||
__version__ = "0.1" | ||
__author__ = "Nicki Skafte Detlefsen et al." | ||
__author_email__ = "[email protected]" | ||
__license__ = "Apache-2.0" | ||
__copyright__ = f"Copyright (c) 2018-{_this_year}, {__author__}." | ||
__homepage__ = "https://github.com/CenterBioML/stochman" | ||
|
||
__docs__ = "StochMan is a collection of elementary algorithms for computations on random manifolds" | ||
|
||
_logger = python_logging.getLogger("stochman") | ||
_logger.addHandler(python_logging.StreamHandler()) | ||
_logger.setLevel(python_logging.INFO) | ||
|
||
PACKAGE_ROOT = os.path.dirname(__file__) | ||
PROJECT_ROOT = os.path.dirname(PACKAGE_ROOT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters