SimonEnsemble / PorousMaterials.jl

Julia package towards classical molecular modeling of nanoporous materials
GNU General Public License v3.0
51 stars 11 forks source link

Add Tutorial Mode #71

Closed ahyork closed 5 years ago

ahyork commented 5 years ago

Allows the user to enter tutorial mode and experiment with the package. It sets their PATH_TO_DATA to our testing data folder. With this, we can adjust the the demos and highlights of our code so that someone in tutorial mode can recreate exactly what we are showing.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 143


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/PorousMaterials.jl 9 12 75.0%
<!-- Total: 9 12 75.0% -->
Totals Coverage Status
Change from base Build 126: -0.2%
Covered Lines: 741
Relevant Lines: 848

💛 - Coveralls
SimonEnsemble commented 5 years ago

dirname(pathof(PorousMaterials)) nice.

how about set_path_to_data(new_path_to_data::String) as well?

i do like the warning abt when the data directory doesn't exist to some extent, but I think this might make the software less flexible. what if I want to load in a JLD object instead of from a file? no need for data directory. what if I want to using PorousMaterials and then make the data directory, or if I want to change the PATH_TO_DATA to somewhere else after using PorousMaterials? this checking for path and throwing error would not allow this. is that right?

ahyork commented 5 years ago

I changed it back to throw warnings instead, just to let the user know that PorousMaterials doesn't detect a folder at the time the PATH_TO_DATA is loaded or changed. Should the default for the PATH be pwd * "/data/"? I can change the wording on the warnings to be more specific like No data folder found in pwd. PorousMaterials will not be able to load any crystals, forcefields, or molecules with the current PATH_TO_DATA I can make that new function quickly and throw in some tests for it as well.

SimonEnsemble commented 5 years ago

good to change to warning instead of error.

yep, default is pwd() * "/data" in master right?

How about something like: @warn @sprintf("Directory for input data,data, not found in present working directory, %s\nChange thePATH_TO_DATAvariable to load input files from a different directory. Seeset_path_to_data().\n", pwd())

ahyork commented 5 years ago

That looks good, I'll do that.