-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve file paths' documentation #137
Comments
Actually, this organisation is more a feature than an issue, although I can understand why it might generate difficulties. It has been done so that support files and experiments could easily be defined together (so if you have relative paths in your model to access support files, the ones defined with the current experiment will be used). |
Hi Alexis, |
You are right. It definitely deserves a more detailed explanation somewhere... Let us ask @RoiArthurB where it could go in the documentation 🤔 ... |
I would suggest (if I may) at least a mention in https://gama-platform.org/wiki/DefiningExportFiles#facets, since it is the first time a newcomer would encounter using a path when reading the documentation. |
Hi @ScriBanana Sorry for the delayed answered (didn't saw the notification on this issue). Actually the documentation already explained this behavior here : https://gama-platform.org/wiki/ModelOrganization But I agree that this little part is a bit difficult to spot. I'll add a part title so it can be catched by the search engine as well as a reminder at the location you pointed (as I guess you're a new comer with this software, I'll follow your logic for finding informations ;) ) I'll just ping @lesquoyb to know if you have some other enhancement idea about this point on the documentation :) EDIT: Just to be clear, this relative path issue only exists within the GAML code; i.e. It doesn't happen with nested gaml file import (on the top of the file). |
Not sure about the documentation, but it could be nice to have a few statements to get the current file's path, the experiment file's path, directories and maybe others, so users can compose paths relative to what they think makes more sense. Like:
|
@lesquoyb we already have project_path or experiment.project_path |
Hi @RoiArthurB, hi all, Thanks, although I am very unsure that the documentation makes things clear enough as of yet, to be honest. Let me reformulate what I understood :
So two things I failed to understand, that had me confused :
So yes, maybe a section dedicated to what happens in what order when an execution is launched would make things clearer. Possibly as a complement to https://gama-platform.org/wiki/next/RuntimeConcepts ? Either way, thanks for the clarification, it appears clear to me now. |
A short explanation of this behavior has been added on the page https://github.com/gama-platform/gama/wiki/ModelOrganization as a note while describing how to import files, as well as in https://github.com/gama-platform/gama/wiki/DefiningExportFiles as a reminder while saving data with relative paths.
I would disagree to add this point on this page as it's an overview of the main steps for creating a simulation and the scheduling of agents inside. I'm not sure that it's relevant to add information about how path are processed while exporting data there. Considering this issue closed now, feel free to reopen if you consider some other places might be relevant :) |
Hi,
Describe the bug
button over both in the UI.)
Importing a GAML file with an experiment makes it so you can run it from the both its definition and importing file. (Example : If I define an experiment "Run" in
Experiment.gaml
and useimport "Experiment.gaml"
in another file, I will have theThe issue is that any relative path called in the model will depend on the file the button is pressed from.
To Reproduce
Build a file system like this :
with
main.gaml
:Experiment.gaml
:GenerateExportFiles.gaml
:Here's the result after running the experiment both from
Main.gaml
andExperiment.gaml
:Expected behavior
The
OutputFiles
directory being only created at the root of the project, at the location the path relative to where thesave
function was called from :Desktop (please complete the following information):
I could simply not cross-import gaml files as a workaround, but it still looks like an issue.
The text was updated successfully, but these errors were encountered: