ARGANS / shellfish_and_algae-MODEL

0 stars 0 forks source link

It is not possible to import source code from the data import directory into code from the advectionPrototype directory #3

Open nmaltsev opened 2 years ago

nmaltsev commented 2 years ago

The code needs refactoring:

  1. Experimental and production code mixed in one directory. I can suggest separating the experimental code from the rest. And all the useful code can be organized into modules. By experimental code, I mean all code with user inputs and local paths such as "D:/Profils/...". This code can only be useful to Maël.
  2. Code has dependencies from the dataread directory. Scenario A and scenario B use the same code. The code from scenario A is not a Python module and cannot be imported into scenario B without fooling the Python module lookup logic (Python doesn't allow importing from adjacent directories unless the entire project is organized into modules). Merging the dataread and advectionPrototype directories into one might solve the problem.
qjutard commented 2 years ago

I think that if we are reorganizing this we should have a "simulation" folder with code for scenario A ans B. The dataread folder would only contain datareading related functions (as it should) and could be made into a module. Would this work for you ?

nmaltsev commented 2 years ago

Yes, it would.

qjutard commented 2 years ago

Do you need my input as to what should be part of the dataread or simulation part ?