Skip to content

Commit

Permalink
chore: remove __path__ from bindings (#203)
Browse files Browse the repository at this point in the history
* chore: remove __path__ from bindings

* chore: missed a spot
  • Loading branch information
vishwa2710 authored Feb 13, 2024
1 parent 5b68f14 commit 4d97ac2
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 41 deletions.
3 changes: 0 additions & 3 deletions bindings/python/src/OpenSpaceToolkitPhysicsPy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ PYBIND11_MODULE(OpenSpaceToolkitPhysicsPy, m)
// Add optional docstring for package OpenSpaceToolkitPhysicsPy
m.doc() = "Physical units, time, reference frames, environment modeling for OpenSpaceToolkit";

// Add __path__ attribute to python package
m.attr("__path__") = "ostk.physics";

// Change attribute __name__ to make OpenSpaceToolkitPhysicsPy invisible in modules path
m.attr("__name__") = "ostk.physics";

Expand Down
2 changes: 0 additions & 2 deletions bindings/python/src/OpenSpaceToolkitPhysicsPy/Coordinate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate(pybind11::module& aModule)
// Create "coordinate" python submodule
auto coordinate = aModule.def_submodule("coordinate");

// Add __path__ attribute for "coordinate" submodule
coordinate.attr("__path__") = "ostk.physics.coordinate";

// Add objects to python "coordinate" submodules
OpenSpaceToolkitPhysicsPy_Coordinate_Spherical(coordinate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate_Frame(pybind11::module& aModule
// Create "frame" python submodule
auto frame = aModule.def_submodule("frame");

// Add __path__ attribute for "frame" submodule
frame.attr("__path__") = "ostk.physics.coordinate.frame";

OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider(frame);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider(pybind11::module
// Create "provider" python submodule
auto provider = aModule.def_submodule("provider");

// Add __path__ attribute for "provider" submodule
provider.attr("__path__") = "ostk.physics.coordinate.frame.provider";

// Add objects to python "provider" submodules
OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider_Static(provider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider_IAU(pybind11::mo
// Create "IAU" python submodule
auto IAU = aModule.def_submodule("iau");

// Add __path__ attribute for "IAU" submodule
IAU.attr("__path__") = "ostk.physics.coordinate.frame.provider.iau";

// Add objects to python "IAU" submodules
OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider_IAU_Theory(IAU);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider_IERS(pybind11::m
// Create "iers" python submodule
auto iers = aModule.def_submodule("iers");

// Add __path__ attribute for "iers" submodule
iers.attr("__path__") = "ostk.physics.coordinate.frame.provider.iers";

// Add objects to python "iers" submodules
OpenSpaceToolkitPhysicsPy_Coordinate_Frame_Provider_IERS_Manager(iers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ inline void OpenSpaceToolkitPhysicsPy_Coordinate_Spherical(pybind11::module& aMo
// Create "spherical" python submodule
auto spherical = aModule.def_submodule("spherical");

// Add __path__ attribute for "spherical" submodule
spherical.attr("__path__") = "ostk.physics.coordinate.spherical";

// Add objects to python "spherical" submodules
OpenSpaceToolkitPhysicsPy_Coordinate_Spherical_LLA(spherical);
Expand Down
2 changes: 0 additions & 2 deletions bindings/python/src/OpenSpaceToolkitPhysicsPy/Environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment(pybind11::module& aModule)
// Create "environment" python submodule
auto environment = aModule.def_submodule("environment");

// Add __path__ attribute for "environment" submodule
environment.attr("__path__") = "ostk.physics.environment";

OpenSpaceToolkitPhysicsPy_Environment_Object(environment);
OpenSpaceToolkitPhysicsPy_Environment_Gravitational(environment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Atmospheric(pybind11::module&
// Create "atmospheric" python submodule
auto atmospheric = aModule.def_submodule("atmospheric");

// Add __path__ attribute for "atmospheric" submodule
atmospheric.attr("__path__") = "ostk.physics.environment.atmospheric";

// Add objects to python "atmospheric" submodules
OpenSpaceToolkitPhysicsPy_Environment_Atmospheric_Earth(atmospheric);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Atmospheric_Earth(pybind11::mo
// Create "earth" python submodule
auto earth = aModule.def_submodule("earth");

// Add __path__ attribute for "earth" submodule
earth.attr("__path__") = "ostk.physics.environment.atmospheric.earth";

OpenSpaceToolkitPhysicsPy_Environment_Atmospheric_Earth_CSSISpaceWeather(earth);
OpenSpaceToolkitPhysicsPy_Environment_Atmospheric_Earth_Manager(earth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Gravitational(pybind11::module
// Create "gravitational" python submodule
auto gravitational = aModule.def_submodule("gravitational");

// Add __path__ attribute for "gravitational" submodule
gravitational.attr("__path__") = "ostk.physics.environment.gravitational";

// Add objects to python "gravitational" submodules
OpenSpaceToolkitPhysicsPy_Environment_Gravitational_Model(gravitational);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Gravitational_Earth(pybind11::
// Create "earth" python submodule
auto earth = aModule.def_submodule("earth");

// Add __path__ attribute for "earth" submodule
earth.attr("__path__") = "ostk.physics.environment.gravitational.earth";

OpenSpaceToolkitPhysicsPy_Environment_Gravitational_Earth_Manager(earth);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Magnetic(pybind11::module& aMo
// Create "magnetic" python submodule
auto magnetic = aModule.def_submodule("magnetic");

// Add __path__ attribute for "magnetic" submodule
magnetic.attr("__path__") = "ostk.physics.environment.magnetic";

// Add objects to python "magnetic" submodules
OpenSpaceToolkitPhysicsPy_Environment_Magnetic_Dipole(magnetic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Magnetic_Earth(pybind11::modul
// Create "earth" python submodule
auto earth = aModule.def_submodule("earth");

// Add __path__ attribute for "earth" submodule
earth.attr("__path__") = "ostk.physics.environment.magnetic.earth";

OpenSpaceToolkitPhysicsPy_Environment_Magnetic_Earth_Manager(earth);
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Object(pybind11::module& aModu
// Create "object" python submodule
auto object = aModule.def_submodule("object");

// Add __path__ attribute for "object" submodule
object.attr("__path__") = "ostk.physics.environment.object";

// Add elements to object
OpenSpaceToolkitPhysicsPy_Environment_Object_Geometry(object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Object_Celestial(pybind11::mod
// Create "celestial" python submodule
auto celestial = aModule.def_submodule("celestial");

// Add __path__ attribute for "celestial" submodule
celestial.attr("__path__") = "ostk.physics.environment.object.celestial";

// Add objects to python "celestial" submodules
OpenSpaceToolkitPhysicsPy_Environment_Object_Celestial_Earth(celestial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Object_Celestial_Moon(pybind11
// Create "moon" python submodule
auto moon = aModule.def_submodule("moon");

// Add __path__ attribute for "moon" submodule
moon.attr("__path__") = "ostk.physics.environment.object.celestial.moon";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ inline void OpenSpaceToolkitPhysicsPy_Environment_Object_Celestial_Sun(pybind11:
// Create "sun" python submodule
auto sun = aModule.def_submodule("sun");

// Add __path__ attribute for "moon" submodule
sun.attr("__path__") = "ostk.physics.environment.object.celestial.sun";
}
}
2 changes: 0 additions & 2 deletions bindings/python/src/OpenSpaceToolkitPhysicsPy/Time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ inline void OpenSpaceToolkitPhysicsPy_Time(pybind11::module& aModule)
// Create "time" python submodule
auto time = aModule.def_submodule("time");

// Add __path__ attribute for "time" submodule
time.attr("__path__") = "ostk.physics.time";

// Add objects to python "time" submodules
OpenSpaceToolkitPhysicsPy_Time_Scale(time);
Expand Down
2 changes: 0 additions & 2 deletions bindings/python/src/OpenSpaceToolkitPhysicsPy/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ inline void OpenSpaceToolkitPhysicsPy_Unit(pybind11::module& aModule)
// Create "unit" python submodule
auto unit = aModule.def_submodule("unit");

// Add __path__ attribute for "unit" submodule
unit.attr("__path__") = "ostk.physics.unit";

// Add objects to python "unit" submodules
OpenSpaceToolkitPhysicsPy_Unit_Length(unit);
Expand Down

0 comments on commit 4d97ac2

Please sign in to comment.