mirror of
https://github.com/Doctorado-ML/STree.git
synced 2025-08-18 00:46:02 +00:00
Refactor setup and add Makefile
This commit is contained in:
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
SHELL := /bin/bash
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
|
.PHONY: coverage deps help lint push test
|
||||||
|
|
||||||
|
coverage: ## Run tests with coverage
|
||||||
|
coverage erase
|
||||||
|
coverage run -m unittest -v stree.tests
|
||||||
|
coverage report -m
|
||||||
|
|
||||||
|
deps: ## Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
lint: ## Lint and static-check
|
||||||
|
black stree
|
||||||
|
flake8 stree
|
||||||
|
mypy stree
|
||||||
|
|
||||||
|
push: ## Push code with tags
|
||||||
|
git push && git push --tags
|
||||||
|
|
||||||
|
test: ## Run tests
|
||||||
|
python -m unittest -v stree.tests
|
||||||
|
|
||||||
|
help: ## Show help message
|
||||||
|
@IFS=$$'\n' ; \
|
||||||
|
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
|
||||||
|
printf "%s\n\n" "Usage: make [task]"; \
|
||||||
|
printf "%-20s %s\n" "task" "help" ; \
|
||||||
|
printf "%-20s %s\n" "------" "----" ; \
|
||||||
|
for help_line in $${help_lines[@]}; do \
|
||||||
|
IFS=$$':' ; \
|
||||||
|
help_split=($$help_line) ; \
|
||||||
|
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||||
|
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||||
|
printf '\033[36m'; \
|
||||||
|
printf "%-20s %s" $$help_command ; \
|
||||||
|
printf '\033[0m'; \
|
||||||
|
printf "%s\n" $$help_info; \
|
||||||
|
done
|
19
setup.py
19
setup.py
@@ -1,7 +1,5 @@
|
|||||||
import setuptools
|
import setuptools
|
||||||
|
import stree
|
||||||
__version__ = "1.1"
|
|
||||||
__author__ = "Ricardo Montañana Gómez"
|
|
||||||
|
|
||||||
|
|
||||||
def readme():
|
def readme():
|
||||||
@@ -9,22 +7,23 @@ def readme():
|
|||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = stree.__version__
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="STree",
|
name="STree",
|
||||||
version=__version__,
|
version=stree.__version__,
|
||||||
license="MIT License",
|
license=stree.__license__,
|
||||||
description="Oblique decision tree with svm nodes",
|
description="Oblique decision tree with svm nodes",
|
||||||
long_description=readme(),
|
long_description=readme(),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
url="https://github.com/doctorado-ml/stree",
|
url=stree.__url__,
|
||||||
author=__author__,
|
author=stree.__author__,
|
||||||
author_email="ricardo.montanana@alu.uclm.es",
|
author_email=stree.__author_email__,
|
||||||
keywords="scikit-learn oblique-classifier oblique-decision-tree decision-\
|
keywords="scikit-learn oblique-classifier oblique-decision-tree decision-\
|
||||||
tree svm svc",
|
tree svm svc",
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: " + stree.__license__,
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||||
|
@@ -1,9 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
__author__ = "Ricardo Montañana Gómez"
|
Oblique decision tree classifier based on SVM nodes
|
||||||
__copyright__ = "Copyright 2020, Ricardo Montañana Gómez"
|
|
||||||
__license__ = "MIT"
|
|
||||||
__version__ = "0.9"
|
|
||||||
Build an oblique tree classifier based on SVM nodes
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
from .Strees import Stree, Snode, Siterator, Splitter
|
from .Strees import Stree, Snode, Siterator, Splitter
|
||||||
|
|
||||||
|
__version__ = "1.0"
|
||||||
|
|
||||||
|
__author__ = "Ricardo Montañana Gómez"
|
||||||
|
__copyright__ = "Copyright 2020-2021, Ricardo Montañana Gómez"
|
||||||
|
__license__ = "MIT License"
|
||||||
|
__author_email__ = "ricardo.montanana@alu.uclm.es"
|
||||||
|
__url__ = "https://github.com/doctorado-ml/stree"
|
||||||
|
|
||||||
__all__ = ["Stree", "Snode", "Siterator", "Splitter"]
|
__all__ = ["Stree", "Snode", "Siterator", "Splitter"]
|
||||||
|
Reference in New Issue
Block a user