diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 816c350..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include strdcable/config.ini -include strdcable/data/norm_OHL_EN_wires.csv -include strdcable/data/cables_dataset.csv -include strdcable/data/FLEXION_CARDINAL_H40kN_mu0.7_FOTI.csv \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5d03fa4..e0bec3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "stranded-cable" version = "2024.1.0" authors = [ - {name = "Eurobios", email = "mgueguin@eurobios.com"}, + {name = "Eurobios Mews Labs", email = "opentools@mews-labs.com"}, ] description = "stranded-cable is a python package proposed to evaluate stranded cables' physical characteristics." readme = "README.md" @@ -22,5 +22,8 @@ dependencies = [ "matplotlib >= 3.7.1", ] +[tool.setuptools.package-data] +strdcable = ["data/*.csv", "*.ini"] + [project.urls] -"Homepage" = "https://gitlab.eurobios.com/rte/stranded-cable" +"Repository" = "https://github.com/rte-france/pallas-standed-cable" diff --git a/strdcable/__init__.py b/src/strdcable/__init__.py similarity index 100% rename from strdcable/__init__.py rename to src/strdcable/__init__.py diff --git a/strdcable/build_tools.py b/src/strdcable/build_tools.py similarity index 100% rename from strdcable/build_tools.py rename to src/strdcable/build_tools.py diff --git a/strdcable/cable.py b/src/strdcable/cable.py similarity index 100% rename from strdcable/cable.py rename to src/strdcable/cable.py diff --git a/strdcable/config.ini b/src/strdcable/config.ini similarity index 100% rename from strdcable/config.ini rename to src/strdcable/config.ini diff --git a/strdcable/config.py b/src/strdcable/config.py similarity index 100% rename from strdcable/config.py rename to src/strdcable/config.py diff --git a/strdcable/data/FLEXION_CARDINAL_H40kN_mu0.7_FOTI.csv b/src/strdcable/data/FLEXION_CARDINAL_H40kN_mu0.7_FOTI.csv similarity index 100% rename from strdcable/data/FLEXION_CARDINAL_H40kN_mu0.7_FOTI.csv rename to src/strdcable/data/FLEXION_CARDINAL_H40kN_mu0.7_FOTI.csv diff --git a/strdcable/data/cables_dataset.csv b/src/strdcable/data/cables_dataset.csv similarity index 100% rename from strdcable/data/cables_dataset.csv rename to src/strdcable/data/cables_dataset.csv diff --git a/strdcable/data/norm_OHL_EN_wires.csv b/src/strdcable/data/norm_OHL_EN_wires.csv similarity index 100% rename from strdcable/data/norm_OHL_EN_wires.csv rename to src/strdcable/data/norm_OHL_EN_wires.csv diff --git a/strdcable/geometrical_tools.py b/src/strdcable/geometrical_tools.py similarity index 100% rename from strdcable/geometrical_tools.py rename to src/strdcable/geometrical_tools.py diff --git a/strdcable/overheadlines.py b/src/strdcable/overheadlines.py similarity index 100% rename from strdcable/overheadlines.py rename to src/strdcable/overheadlines.py diff --git a/strdcable/physical_tools.py b/src/strdcable/physical_tools.py similarity index 100% rename from strdcable/physical_tools.py rename to src/strdcable/physical_tools.py diff --git a/tests/test_conductor.py b/tests/test_conductor.py new file mode 100644 index 0000000..302706a --- /dev/null +++ b/tests/test_conductor.py @@ -0,0 +1,16 @@ +import pytest +import numpy as np + +def test_conductor(): + from strdcable.cable import Conductor + cable = Conductor( + dwires=np.array([3e-3, 2e-3]), + nbwires=np.array([1, 6]), + material=np.array(['ST6C', 'AL1']), # 'ST6C' is a grade of steel, 'AL1' is a grade of aluminium + laylengths=np.array([np.nan, 0.2]) + ) + + assert cable.A == pytest.approx(2.5918139392115792e-05) + assert cable.m == pytest.approx(0.10604410834231327) + assert cable.EA == pytest.approx(2733197.4739603605) +