-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Walnut needs a main directory where artifacts are stored. By default, it is the current directory or the directory below if bin.
Walnut/src/main/java/Main/Session.java
Lines 48 to 58 in dc63950
| public static void setPathsAndNames() { | |
| String path = System.getProperty("user.dir"); | |
| if (path.endsWith("bin")) | |
| mainWalnutDir = "../"; | |
| name = SESSION_NAME + "/" + | |
| LocalDateTime.now().format(DateTimeFormatter.ofPattern(FRIENDLY_DATE_TIME_PATTERN)) + "/"; | |
| if (sessionWalnutDir == null) { | |
| sessionWalnutDir = mainWalnutDir + name; | |
| } | |
| createSubdirectories(); | |
| } |
In the Walnut Jupyter kernel, I have been using environment variables to specify where Walnut is located:
WALNUT_HOMEis the main directory location;WALNUT_JARis the main jar file location.
Basically, the kernel launches a process that runs something like
cd $WALNUT_HOME
java -Xmx$WALNUT_MEM -jar $WALNUT_JAR
Proposal for improvement: let the user specify the Walnut main directory by setting the WALNUT_HOME environment variable as the default location for the main directory. If set, this variable would be used as the default value for mainWalnutDir.
This will allow users to install Walnut where they want and have Walnut find it on startup.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers