diff --git a/pyproject.toml b/pyproject.toml index dd62881..2156635 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,4 +33,4 @@ Issues = "https://github.com/Gurobi/gurobi-modelanalyzer/issues" Source = "https://github.com/Gurobi/gurobi-modelanalyzer" [tool.hatch.version] -path = "model_analyzer/__init__.py" +path = "src/gurobi_modelanalyzer/__init__.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a16eebd..0000000 --- a/setup.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[options] -package_dir = - =model_analyzer -packages = find: - -[options.packages.find] -where = model_analyzer diff --git a/model_analyzer/__init__.py b/src/gurobi_modelanalyzer/__init__.py similarity index 100% rename from model_analyzer/__init__.py rename to src/gurobi_modelanalyzer/__init__.py diff --git a/model_analyzer/analyzer.py b/src/gurobi_modelanalyzer/analyzer.py similarity index 92% rename from model_analyzer/analyzer.py rename to src/gurobi_modelanalyzer/analyzer.py index d1d8a4b..8d1f750 100644 --- a/model_analyzer/analyzer.py +++ b/src/gurobi_modelanalyzer/analyzer.py @@ -6,11 +6,11 @@ import sys from timeit import default_timer -import model_analyzer.common as common -import model_analyzer.constraint_analyzer as constraint_analyzer -import model_analyzer.file_analyzer as file_analyzer -import model_analyzer.objective_function_analyzer as objective_function_analyzer -import model_analyzer.variable_analyzer as variable_analyzer +import gurobi_modelanalyzer.common as common +import gurobi_modelanalyzer.constraint_analyzer as constraint_analyzer +import gurobi_modelanalyzer.file_analyzer as file_analyzer +import gurobi_modelanalyzer.objective_function_analyzer as objective_function_analyzer +import gurobi_modelanalyzer.variable_analyzer as variable_analyzer def run(model_file: str, analyzers=[]): diff --git a/model_analyzer/basic_analyzer.py b/src/gurobi_modelanalyzer/basic_analyzer.py similarity index 100% rename from model_analyzer/basic_analyzer.py rename to src/gurobi_modelanalyzer/basic_analyzer.py diff --git a/model_analyzer/common.py b/src/gurobi_modelanalyzer/common.py similarity index 100% rename from model_analyzer/common.py rename to src/gurobi_modelanalyzer/common.py diff --git a/model_analyzer/constraint_analyzer.py b/src/gurobi_modelanalyzer/constraint_analyzer.py similarity index 99% rename from model_analyzer/constraint_analyzer.py rename to src/gurobi_modelanalyzer/constraint_analyzer.py index 78c561b..5eb0f1d 100644 --- a/model_analyzer/constraint_analyzer.py +++ b/src/gurobi_modelanalyzer/constraint_analyzer.py @@ -2,7 +2,7 @@ import gurobipy as gp import math -from model_analyzer import common +from gurobi_modelanalyzer import common def get_rhs_frequencies(model, base=10): diff --git a/model_analyzer/file_analyzer.py b/src/gurobi_modelanalyzer/file_analyzer.py similarity index 100% rename from model_analyzer/file_analyzer.py rename to src/gurobi_modelanalyzer/file_analyzer.py diff --git a/model_analyzer/objective_function_analyzer.py b/src/gurobi_modelanalyzer/objective_function_analyzer.py similarity index 98% rename from model_analyzer/objective_function_analyzer.py rename to src/gurobi_modelanalyzer/objective_function_analyzer.py index cf28d31..e3b7609 100644 --- a/model_analyzer/objective_function_analyzer.py +++ b/src/gurobi_modelanalyzer/objective_function_analyzer.py @@ -1,7 +1,7 @@ from collections import defaultdict import gurobipy as gp -import model_analyzer.common as common +import gurobi_modelanalyzer.common as common def process_objective(m, data): diff --git a/model_analyzer/results_analyzer.py b/src/gurobi_modelanalyzer/results_analyzer.py similarity index 99% rename from model_analyzer/results_analyzer.py rename to src/gurobi_modelanalyzer/results_analyzer.py index 73ba191..b961561 100644 --- a/model_analyzer/results_analyzer.py +++ b/src/gurobi_modelanalyzer/results_analyzer.py @@ -6,7 +6,7 @@ import math import time -from model_analyzer import common +from gurobi_modelanalyzer import common # diff --git a/model_analyzer/variable_analyzer.py b/src/gurobi_modelanalyzer/variable_analyzer.py similarity index 97% rename from model_analyzer/variable_analyzer.py rename to src/gurobi_modelanalyzer/variable_analyzer.py index 5a3a5ae..72a38e4 100644 --- a/model_analyzer/variable_analyzer.py +++ b/src/gurobi_modelanalyzer/variable_analyzer.py @@ -1,6 +1,6 @@ import gurobipy as gp -import model_analyzer.common as common +import gurobi_modelanalyzer.common as common def process_variable_types(m, data, objective_variables, constraint_variables): diff --git a/tests/test_analyzer.py b/tests/test_analyzer.py index 6eba66e..7bf30b0 100644 --- a/tests/test_analyzer.py +++ b/tests/test_analyzer.py @@ -1,7 +1,7 @@ from unittest import TestCase import pathlib -import model_analyzer.analyzer as analyzer +import gurobi_modelanalyzer.analyzer as analyzer class TestAnalyzer(TestCase): diff --git a/tests/test_explainer.py b/tests/test_explainer.py index 5b4c63a..77fc29d 100644 --- a/tests/test_explainer.py +++ b/tests/test_explainer.py @@ -3,7 +3,7 @@ import os import gurobipy as gp -from model_analyzer import kappa_explain +from gurobi_modelanalyzer import kappa_explain here = pathlib.Path(__file__).parent cwd = pathlib.Path(os.getcwd())