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

Reorganize projects to be able to test functions #87

Open
frgfm opened this issue Sep 10, 2022 · 4 comments
Open

Reorganize projects to be able to test functions #87

frgfm opened this issue Sep 10, 2022 · 4 comments
Assignees
Milestone

Comments

@frgfm
Copy link
Member

frgfm commented Sep 10, 2022

As discussed in #85, most of the platform features are not tested yet. In order to solve this, we should move all non-frontend operations to a python folder for testing purposes.

Basically splitting the project into backend & frontend:

  • backend: reading, creating, manipulating data
  • frontend: displaying them
@frgfm frgfm added this to the 0.1.2 milestone Sep 10, 2022
@frgfm frgfm self-assigned this Sep 10, 2022
@pechouc
Copy link
Collaborator

pechouc commented Sep 11, 2022

Thanks for the idea, it would indeed be great to test more systematically the logic in this repository! I wanted to discuss this in an issue before implementation to make sure I understand how to organise this.

Should the "python folder" that you mention look like the services sub-folder? We would have an __init__.py file in it, as well as another Python script storing the functions. Then, this sort of local package would be imported in main.py or in the other files. Is this correct?

Sorry for the maybe simple questions, but I probably lack some basic notions and I still need this kind of clarifications 😊

@frgfm
Copy link
Member Author

frgfm commented Sep 12, 2022

More or so, yes ! I think we could have something like this in the source folder:

  • "backend" all ops not related to display
  • "frontend"
  • "main.py" that would the only python script wth args to run the app (so a much lighter script than the current one which has both backend & frontend operations)

(of course the naming of folders can be changed)

@Akilditu
Copy link
Collaborator

Akilditu commented Sep 13, 2022

I understand the need of testing and reshaping the project-tree to do so.

But splitting back and front isn't that easy as dash mix both (as you said @frgfm the actual main.py gathers py function that triggers dash objects for frontends purposes.

So the solution would be to create a brand new test folder with a test flask app + a new test.py that maps actual main.py core python functions and API interactions (without dash basically) ?

@frgfm
Copy link
Member Author

frgfm commented Sep 14, 2022

Oh so you don't think there are functions we could disentangle from dash main.py ?
I thought we could, but if that's not possible, I might have been wrong with this suggestion 😅

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

3 participants