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

Using a separate subdirectory for FabSim3 API #203

Closed
arabnejad opened this issue May 17, 2021 · 2 comments
Closed

Using a separate subdirectory for FabSim3 API #203

arabnejad opened this issue May 17, 2021 · 2 comments

Comments

@arabnejad
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

For long term support, I think it would be better we follow a formal python project structure and use a separate subdirectory for all FabSim3 codes.
One of our user had an issue before regarding the current structure : assume, we have a same python package as the folder name in FabSim3, for example, a base py package is installed in your system, in this case

from base.fab import *

which is using in our plugin will raise an import issue.

Describe the solution you'd like

I think it would be better if we keep our FabSim3 python code files in a separate subdirectory, and keep the repository's root directory for other stuffs such as installation scripts, py tests, and all manner of other things that aren't actually part of the source code.

what do you think @djgroen ?

@djgroen
Copy link
Owner

djgroen commented May 17, 2021

I largely agree, and in making these changes we need to ensure that we still have a simple-looking import command for users that want to rely on the FabSim3 python functions. I guess this could be accomplished by changing the path that should be added to the Pythonpath perhaps?

@arabnejad
Copy link
Collaborator Author

arabnejad commented May 17, 2021

yes @djgroen , we only need to make sure all plugins use the new PATH for FabSim3 API

  • for example, instead of
     from base.fab import *
    we should use
     from fabsim.base.fab import *

I am going to do apply this change in the FabSim3 repo and also do some tests, then for all plugins that we have access, the FabSim3 API access will be updated, for others I will inform the developers to follow the same structure and update their plugins

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