This post will go over the steps for setting up the local development for nova, which is a frontend interface platform at ORNL that interacts with the backend Galaxy workflow platform.
-
First, set up the
condaenvironment,[CONDA_SUBDIR=osx-64] conda create -n pdiffvis -c conda-forge -c mantid python=3.10 mantid poetry conda activate pdiffvis[CONDA_SUBDIR=osx-64](without the bracket) is only necessary for Mac machines withARMarchitecture. -
Then run
poetry install -
Next we want to mock the directory structure on ORNL Analysis cluster. On Linux, we can use
sudoprivilege to create/SNSand/HFIRdirectories and all the sub-directories. On MacOS, one cannot create directories under/even withsudoprivilege so one has to use the following trick,-
Populate the file
/etc/synthetic.confwithSNS Users/y8z/SNSwhere
y8zis my user name.Attention: the white space in there is necessarily a
Tab. If usingvim, in theInsertmode, we should pressCtrl+Vfirst, then followed by typingTab. Not sure about other editors.There is NO
/in front ofUsers/y8z/SNS. -
Create the
SNSdirectory under our home directory. -
Run the following command,
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -tThe command above would create a soft link from
/SNSto/Users/y8z/SNS. Then we can populate with files under/Users/y8z/SNSfollowing the same structure as on Analysis.If the command above for some reason fails, we can try to reboot the machine after which the soft link should have been created automatically.
To remove the soft link, we need to either delete the entry in
/etc/synthetic.confor remove the file completely, followed by a restart of the computer.
-
-
Next, run the following command to configure
pre-commitso that any time codes are committed, some actions such as format checking will be triggered automatically before pushing the codes to the repo.poetry run pre-commit install -
Then it should be ready so we can run,
poetry run appto start the app, which will automatically launch the browser to see the app.
-
Once we are happy with the local changes with the codes, we can push the codes to the repo so that it can be deployed into the
novatest environment. Then the app can be accessed fromnova-test.ornl.gov. To deploy, we need,-
Edit
pyproject.tomlto update the version -
Commit and push the local changes
-
Run
poetry run deploy-tooldocker has to be installed for this command to work.
-