forked from PrincetonUniversity/PsyNeuLinkView
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from MetaCell/feature/PSYNEU-140
#PSYNEU-140 - Fixing installation process on Mac and Linux, #PSYNEU-138 - Add bash scripts to install and run psyneulinkviewer in mac and linux, updates read me with instructions
- Loading branch information
Showing
13 changed files
with
335 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,122 @@ | ||
# PsyNeuLinkView Package Building | ||
# Installing on Linux | ||
|
||
To build pip package | ||
Download bash script to install [here](https://raw.githubusercontent.com/MetaCell/PsyNeuLinkView/feature/PSYNEU-140/package/linux_installer.sh). | ||
It's recommended to download it in your home directory. | ||
|
||
On terminal, go to your root directory | ||
``` | ||
cd package | ||
python3 -m build | ||
cd ~ | ||
``` | ||
|
||
And run installer | ||
``` | ||
sudo bash -i linux_installer.sh | ||
``` | ||
|
||
To upload to distribution server. You will need token shared privately. | ||
The application should open up after succesfully installing psyneulinkviewer. | ||
|
||
# Installing on MAC | ||
|
||
Download bash script to install [here](https://raw.githubusercontent.com/MetaCell/PsyNeuLinkView/feature/PSYNEU-140/package/mac_installer.sh). | ||
It's recommended to download it in your home directory. | ||
|
||
On terminal, go to your root directory | ||
``` | ||
twine upload dist/* | ||
cd ~ | ||
``` | ||
|
||
To pip install local package created in previous steps | ||
And run installer | ||
``` | ||
python3 -m pip install --no-index --find-links=package_directory_path + "/dist" psyneulinkview | ||
sudo bash -i mac_installer.sh | ||
``` | ||
|
||
# PsyNeuLinkView Installing from PyPI | ||
The application should open up after succesfully installing psyneulinkviewer. | ||
|
||
|
||
To install from PyPi | ||
# Installation process inside script | ||
|
||
The scripts above run the following commands in order: | ||
|
||
Firs installs the python module 'psyneulinkviewer' from PyPi | ||
``` | ||
pip install psyneulinkview --extra-index-url https://pypi.org/project/psyneulinkview | ||
sudo pip install psyneulinkviewer | ||
``` | ||
This commands installs required libraries and packages. Also creates a conda enviroment where the needed packages are installed. | ||
|
||
To run psyneulinkviewer | ||
After successfully installing the python package above, it reset the user's bash profile to apply the settings changes | ||
- Linux | ||
``` | ||
source ~/.profile | ||
``` | ||
|
||
- Mac | ||
``` | ||
source ~/.bash_profile | ||
``` | ||
|
||
Then, the conda environment created is activated with command below: | ||
``` | ||
conda activate psyneulinkview | ||
``` | ||
|
||
Finally, the last step of the script opens the psyneulinkviewer application: | ||
|
||
On linux: | ||
``` | ||
psyneulinkviewer | ||
``` | ||
|
||
On Mac: | ||
``` | ||
open /usr/local/bin/psyneulinkviewer-darwin-x64/psyneulinkviewer.app | ||
``` | ||
|
||
The psyneulinkviewer application is installed on user directory: | ||
``` | ||
/usr/local/bin/ | ||
``` | ||
|
||
# Psyneulinkviewer Requirements | ||
|
||
Psyneulinkviewer requires: | ||
|
||
- Python 3.11 and pip | ||
- Pip packages : psyneulink, graphviz, wget, packaging and requests | ||
- Conda 4.9.1 or above | ||
- Node 4.19.0 or above | ||
- Rosetta ( on Mac) | ||
|
||
All of these are downloaded and installed as part of psyneulinkviewer installation process. | ||
|
||
# Testing Models | ||
|
||
If all went well with installation, you should see the application running as in screenshot below : | ||
![image](https://github.com/user-attachments/assets/ec84044c-287a-4e39-bdf7-aa27cdc486f9) | ||
|
||
To test models, download [these models](https://github.com/MetaCell/PsyNeuLinkView/tree/feature/PSYNEU-140/test_models) and import one at a time to test. Each time a Model is open, the previous one will disappear. I recommend you start with the models inside 'working_tests', as those are the ones we know for sure should we working. | ||
|
||
To import go to File -> Open Models | ||
|
||
# PsyNeuLinkView Package Building | ||
|
||
To build pip package | ||
``` | ||
cd package | ||
python3 -m pip install build | ||
python3 -m build --sdist | ||
``` | ||
|
||
To test local build | ||
``` | ||
pip install dist/psyneulinkviewer-VERSIOn.tar.gz | ||
``` | ||
|
||
To upload to distribution server. You will need token shared privately to be able to upload. | ||
``` | ||
python3 -m twine upload dist/* | ||
``` | ||
|
||
To upload to test Pypi server | ||
``` | ||
python3 -m twine upload --repository testpypi dist/* | ||
``` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash -l | ||
pip install -vv psyneulinkviewer && source ~/.profile && conda activate psyneulinkview && psyneulinkviewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash -l | ||
pip install -vv psyneulinkviewer --break-system-packages && source ~/.bash_profile && conda activate psyneulinkview && open /usr/local/bin/psyneulinkviewer-darwin-x64/psyneulinkviewer.app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.