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

Change Inspect package structure to allow simple Inspector importing #852

Open
3 tasks
NickPapONS opened this issue Jul 14, 2023 · 0 comments
Open
3 tasks

Comments

@NickPapONS
Copy link
Contributor

NickPapONS commented Jul 14, 2023

After showing the Inspect API and specifically the Inspector class functionality to members of other teams, it became apparent that accessing Inspector is currently a bit messy. The import process goes through several levels of the package structure, which assumes the user has good knowledge of csvcubed and its file structure. At the moment, importing the Inspector class looks something like this:

from csvcubed.inspect.inspectortable import Inspector

Obviously this is not a problem to us but this is something that would be done frequently by users trying to use the Inspect API in their code, so we should try to make it as simple as possible.

It could look something like this:

from csvcubed.inspector import Inspector
  • Investigate the best way for the Inspect package to enable imports to work like so. The Inspector class is located in the file inspectortable.py so moving this file or the class is the main objective.
    • The easiest way would likely be to simply move the file inspectortable.py one level higher. I personally suggest renaming the file to "inspector" if this is done.
    • That would achieve the result we want, but we should probably be apprehensive towards having files in the top level like that, so there may be a better way.
  • Once a decision has been made, make the changes to the file structure.
  • Check the imports and resolve any broken dependencies caused by the changes. One potential import that could be broken that I found from a brief investigation was in test_browsers.py where Inspector functionality is tested. Please also rename this test file file to something more suitable, as this file's name still follows the outdated "Browser" label for what is now the "Inspector" group of classes.
@NickPapONS NickPapONS changed the title Change Inspect package structure to allow simple importing Change Inspect package structure to allow simple Inspector importing Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants