Refactor project structure

This commit is contained in:
2022-12-13 10:15:31 +01:00
parent e18d44133a
commit f6fdc96c6d
30 changed files with 9 additions and 11 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "fimdlp/cppmdlp"]
path = fimdlp/cppmdlp
path = src/cppfimdlp
url = https://github.com/rmontanana/mdlp

View File

@@ -1 +0,0 @@
include fimdlp/cppmdlp/CPPFImdlp.h

View File

@@ -26,10 +26,9 @@ build: ## Build package
make clean
python -m build --wheel
buildext: ## Build extension
install: ## Build extension
make clean
python setup.py build_ext
echo "Build extension success"
pip install -e .
audit: ## Audit pip
pip-audit

View File

@@ -2,7 +2,7 @@
#include <iostream>
#include <vector>
#include <iomanip>
#include "../src/fimdlp/cppmdlp/CPPFImdlp.h"
#include "../src/cppmdlp/CPPFImdlp.h"
using namespace std;
@@ -10,7 +10,7 @@ int main(int argc, char** argv)
{
ArffFiles file;
vector<string> lines;
string path = "../../src/fimdlp/cppmdlp/tests/datasets/";
string path = "../../src/cppmdlp/tests/datasets/";
map<string, bool > datasets = {
{"mfeat-factors", true},
{"iris", true},

View File

@@ -20,7 +20,7 @@ ap.add_argument("dataset", type=str, choices=datasets.keys())
args = ap.parse_args()
relative = "" if os.path.isdir("src") else ".."
file_name = os.path.join(
relative, "src", "fimdlp", "cppmdlp", "tests", "datasets", args.dataset
relative, "src", "cppmdlp", "tests", "datasets", args.dataset
)
data = arff.loadarff(file_name + ".arff")
df = pd.DataFrame(data[0])

View File

@@ -12,8 +12,8 @@ setup(
name="fimdlp.cppfimdlp",
sources=[
"src/fimdlp/cfimdlp.pyx",
"src/fimdlp/cppmdlp/CPPFImdlp.cpp",
"src/fimdlp/cppmdlp/Metrics.cpp",
"src/cppmdlp/CPPFImdlp.cpp",
"src/cppmdlp/Metrics.cpp",
],
language="c++",
include_dirs=["fimdlp"],

View File

@@ -3,7 +3,7 @@
from libcpp.vector cimport vector
from libcpp cimport bool
cdef extern from "cppmdlp/CPPFImdlp.h" namespace "mdlp":
cdef extern from "../cppmdlp/CPPFImdlp.h" namespace "mdlp":
ctypedef float precision_t
cdef cppclass CPPFImdlp:
CPPFImdlp(bool) except +