8000 New python modules not directly accessible in the environment · Issue #274 · tudat-team/tudatpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New python modules not directly accessible in the environment #274
Open
@valeriof7

Description

@valeriof7

Issue Description

The current behavior of the install.py script in the tudatpy causes issues when adding new modules. Specifically, using the -e flag only creates symbolic links for .py and .pyi files that exist at the time of installation. As a result, any new module added after the initial installation requires a full uninstall (using uninstall.py) and reinstall to create symbolic links for the new files. This implementation issue hinders the iterative development workflow.

Steps to Reproduce

  1. Install the tudatpy package using install.py -e.
  2. Add a new module or script to tudatpy.
  3. Observe that the new module is not linked or recognized in the environment.
  4. Uninstall and reinstall tudatpy to correctly register the new module.

Expected Behavior

Newly added Python modules should be automatically recognized without requiring reinstallation, as long as the symbolic links point to the appropriate subdirectories.

Current Behavior

New modules are not automatically included via symbolic links, requiring a full reinstall of the package to make them accessible.

Possible Solution or Implementation

@alfonsoSR proposes:

  • Modify install.py to create symbolic links not just to the root tudatpy directory, but to its internal submodules (tudatpy/astro, tudatpy/numerical_simulation, etc.). This would enable updates to individual modules without needing a complete reinstall, as long as the module structure is preserved.
  • Alternatively, mirror the original behavior where kernel.so and source files reside in the same directory (tudat-bundle/tudatpy), but note that this was changed to conform to preferences against storing compiled extensions next to source files.

Additional Context

The .so files are excluded from GitHub via .gitignore, and the current setup requires placing kernel.so in the tudat-bundle/build directory. A workaround involving creating the tudatpy directory in the conda prefix and linking each script individually can be error-prone.

Metadata

Metadata

Assignees

Labels

priority: lowNice to have or long-term considerationtype: bugProblem that affects expected behavior

Type

No type

Projects

Status

To start

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0