Skip to content
Snippets Groups Projects

doc[README][RTD]: Refactor README from RST to MarkDown and add jupyter usage installation instructions.

Merged Karim Ahmed requested to merge doc/convert_README_from_rst_to_MD into master
1 unresolved thread
1 file
+ 28
30
Compare changes
  • Side-by-side
  • Inline
+ 28
30
@@ -19,55 +19,53 @@ already. If you have not then read the appendix section on [SSH Key Setup for Gi
@@ -19,55 +19,53 @@ already. If you have not then read the appendix section on [SSH Key Setup for Gi
is still Python 3.9, so Python 3.11 needs to be loaded from a different
is still Python 3.9, so Python 3.11 needs to be loaded from a different
location.
location.
Therefore `pyenv` is used, we provide a pyenv installation at
We use `pyenv` to manage different Python versions. A pyenv installation is provided at
`/gpfs/exfel/sw/calsoft/.pyenv` which we use to manage different versions of
`/gpfs/exfel/sw/calsoft/.pyenv`.
python. This can be activated with `source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate`
A quick setup would be:
To install pycalibration, follow these steps:
1. `source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate`
2. `git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git && cd pycalibration` - clone the offline calibration package from EuXFEL GitLab
3. `pyenv shell 3.11.9` - load required version of python
4. `python3 -m venv .venv` - create the virtual environment
5. `source .venv/bin/activate` - activate the virtual environment
6. `python3 -m pip install --upgrade pip` - upgrade version of pip
7. `python3 -m pip install .` - install the pycalibration package (add `-e` flag for editable development installation)
Copy/paste script:
```bash
```bash
 
# Activate pyenv
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
 
 
# Clone the repository
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git
cd pycalibration
cd pycalibration
 
 
# Set up Python environment
pyenv shell 3.11.9
pyenv shell 3.11.9
python3 -m venv .venv
python3 -m venv .venv
source .venv/bin/activate
source .venv/bin/activate
 
 
# Install pycalibration
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pip
python3 -m pip install . # `-e` flag for editable install, e.g. `pip install -e .`
python3 -m pip install . # Use 'pip install -e .' for editable install
```
```
### Installation into user home directory
### Installation into user home directory
This is not recommended as `pycalibration` has pinned dependencies for
**Warning:** This method is not recommended as `pycalibration` has pinned dependencies for
stability, if you install it directly into you users home environment then it
stability. Installing directly into your user's home environment may downgrade/upgrade
will downgrade/upgrade your local packages, which may cause major issues and may
your local packages, potentially causing major issues and breaking your local environment.
**break your local environment**, it is highly recommended to use the venv
It is highly recommended to use the venv installation method instead.
installation method instead.
1. `source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate`
2. `git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git && cd pycalibration` - clone the offline calibration package from EuXFEL GitLab
3. `pyenv shell 3.11.9` - load required version of python
4. `pip install .` - install the pycalibration package (add `-e` flag for editable development installation)
5. `export PATH=$HOME/.local/bin:$PATH` - make sure that the home directory is in the PATH environment variable
Copy/paste script:
If you still wish to proceed with a user home directory installation, follow these steps:
```bash
```bash
 
# Activate pyenv
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
 
 
# Clone the repository
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git
pyenv shell 3.11.9
cd pycalibration
cd pycalibration
pip install --user . # `-e` flag for editable install, e.g. `pip install -e .`
 
# Set up Python environment
 
pyenv shell 3.11.9
 
 
# Install pycalibration
 
pip install --user . # Use 'pip install --user -e .' for editable install
 
 
# Update PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
```
```
@@ -80,7 +78,7 @@ If you plan to work with Jupyter notebooks interactively, you have two main opti
@@ -80,7 +78,7 @@ If you plan to work with Jupyter notebooks interactively, you have two main opti
if you prefer to run Jupyter notebooks on your local machine or on Maxwell, you can install the `notebook` package in your virtual environment:
if you prefer to run Jupyter notebooks on your local machine or on Maxwell, you can install the `notebook` package in your virtual environment:
```bash
```bash
python3 -m pip install notebook
python3 -m pip install notebook==6.5.1
```
```
After installation, you can start a Jupyter notebook server by running:
After installation, you can start a Jupyter notebook server by running:
Loading