Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename smarts.core.smarts #1849

Open
5 tasks
Gamenot opened this issue Feb 9, 2023 · 0 comments
Open
5 tasks

Rename smarts.core.smarts #1849

Gamenot opened this issue Feb 9, 2023 · 0 comments
Labels
breaking change For issues that should be moved to a full version change. bug Something isn't working

Comments

@Gamenot
Copy link
Collaborator

Gamenot commented Feb 9, 2023

Issue

Within smarts.core referencing the smarts module will give you two potential modules: <root>.smarts and <root>.smarts.core.smarts because the <python_path>/smarts directory exists and smarts.py as a relative import for any files in the<python_path>/smarts/core directory. These both resolve to a module and can cause ambiguous behaviour. For instance smarts.__file__ can resolve to either location depending on the order of paths in the PYTHON_PATH environment variable.

Proposed solution

Rename smarts.core.smarts to smarts.core.engine.

  • Move SMARTS to smarts.core.engine
  • Retain smarts.core.smarts
  • Update smarts.core.smarts imports to give a deprecation warning.
  • Indicate the version when smarts.core.smarts should be removed.
  • Update examples to use new module.

Additional context

          This caused an odd bug. It could not resolve the difference between `smarts` and `smarts.core.smarts`. I believe should change `smarts.core.smarts` to `smarts.core.engine`.

Originally posted by @Gamenot in #1828 (comment)

@Gamenot Gamenot added bug Something isn't working breaking change For issues that should be moved to a full version change. labels Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change For issues that should be moved to a full version change. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant