-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added (temporary) installation guide Move usage notice out of README
- Loading branch information
Showing
5 changed files
with
202 additions
and
36 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,42 +1,196 @@ | ||
## Installation | ||
# Installation Guide for pyglotaran | ||
|
||
Prerequisites: | ||
This guide provides step-by-step instructions for installing **pyglotaran** on Windows, macOS, and Linux systems. It starts with installing pyglotaran if you already have Python installed, ensuring the use of virtual environments to keep your system clean. If you don't have Python installed yet, we'll guide you through installing Python on your system. | ||
|
||
- Python 3.10 | ||
- On Windows only 64bit is supported | ||
## Prerequisites | ||
|
||
Note for Windows Users: The easiest way to get python for Windows is via the Microsoft Store | ||
Before installing pyglotaran, ensure you have: | ||
|
||
### Stable Release | ||
- **Python 3.10 or higher** installed on your system. | ||
- Basic familiarity with command-line interfaces. | ||
|
||
To install pyglotaran from [pypi](https://pypi.org/), run this command in your terminal: | ||
### Check if Python is Installed | ||
|
||
```console | ||
Open your terminal or command prompt and run: | ||
|
||
```shell | ||
python --version | ||
``` | ||
|
||
or | ||
|
||
``` | ||
python3 --version | ||
``` | ||
|
||
If Python is installed, this command will display the Python version number. | ||
|
||
- If the version is 3.10 or higher, proceed to installing pyglotaran. | ||
- If you see a lower version number or receive an error message, proceed to Installing Python on Your System. | ||
|
||
## Installing pyglotaran | ||
|
||
💡 _It is **recommended** to use a virtual environment to install pyglotaran into, to avoid possible conflicts with other Python packages and to keep your system Python environment clean._ | ||
|
||
### Step 1: Create a Project Directory | ||
|
||
Create a new project folder. This could also be a folder downloaded from the [examples](https://github.com/glotaran/pyglotaran-examples). | ||
|
||
### Step 2: Create a Virtual Environment | ||
|
||
Create a virtual environment named venv. | ||
|
||
For Windows: | ||
|
||
```shell | ||
python -m venv venv | ||
``` | ||
|
||
<sub>(on MacOS/Linux) you may have to use `python3` instead of `python`.</sub> | ||
|
||
### Step 3: Activate the Virtual Environment | ||
|
||
Within your project folder run the following. | ||
|
||
For Windows: | ||
|
||
```shell | ||
venv\Scripts\activate | ||
``` | ||
|
||
For MacOS/Linux: | ||
|
||
```shell | ||
source venv/bin/activate | ||
``` | ||
|
||
After activation, your command prompt should be prefixed with (venv). | ||
|
||
### Step 4: Install pyglotaran | ||
|
||
Install pyglotaran using pip | ||
|
||
```shell | ||
pip install pyglotaran | ||
``` | ||
|
||
If you want to install it via conda, you can run the following command: | ||
### Step 5: Verify the Installation | ||
|
||
To verify that pyglotaran is installed correctly, run: | ||
|
||
```console | ||
conda install -c conda-forge pyglotaran | ||
```shell | ||
python -c "import pyglotaran; print(pyglotaran.__version__)" | ||
``` | ||
|
||
To install pyglotaran together with [pyglotaran-extras](https://github.com/glotaran/pyglotaran-extras) which provides common plotting functionality you can run: | ||
If the installation was successful, this command will print the version number of pyglotaran. | ||
|
||
## Installing Python on Your System | ||
|
||
If you don't have Python installed, follow the instructions below for your operating system. | ||
|
||
### Windows | ||
|
||
#### Option 1: Install Python via the Microsoft Store | ||
|
||
1. Open the Microsoft Store app. | ||
2. Search for Python and select the latest version (Python 3.10 or higher). | ||
3. Click Get or Install. | ||
|
||
**\*Note**: This method installs Python only for the current user and doesn't require administrative privileges.\* | ||
|
||
#### Option 2: Install Python from python.org | ||
|
||
```console | ||
pip install pyglotaran[extras] | ||
1. Go to the official Python website. | ||
2. Download the latest Python installer (Python 3.10 or higher). | ||
3. Run the installer: | ||
|
||
- Check the box that says "Add Python to PATH". | ||
- Choose "Install Now" for a default installation. | ||
|
||
## macOS | ||
|
||
#### Option 1: Install Python via Homebrew | ||
|
||
1. Install Homebrew if you haven't already: | ||
|
||
```bash | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
``` | ||
|
||
### From Source | ||
2. Install Python: | ||
|
||
```bash | ||
brew install python | ||
``` | ||
|
||
### Option 2: Install Python from python.org | ||
|
||
1. Visit the official Python website. | ||
2. Download the latest Python installer (Python 3.10 or higher). | ||
3. Run the installer and follow the prompts. | ||
|
||
## Linux | ||
|
||
To install from source, e.g. for testing or development purposes, run these commands in your shell/terminal: | ||
### Ubuntu/Debian | ||
|
||
Update the package list: | ||
|
||
``` | ||
sudo apt update | ||
``` | ||
|
||
Install Python and pip: | ||
|
||
```console | ||
git clone https://github.com/glotaran/pyglotaran.git | ||
cd pyglotaran | ||
pip install . | ||
``` | ||
sudo apt install python3 python3-venv python3-pip | ||
``` | ||
|
||
### Other Distributions | ||
|
||
Refer to your distribution's package manager documentation to install Python 3.10 or higher, python3-venv, and python3-pip. | ||
|
||
# Next Steps | ||
|
||
Now that you have Python and pyglotaran installed, you can start using pyglotaran for your data analysis. | ||
|
||
## Using pyglotaran | ||
|
||
pyglotaran is designed to be used within Python scripts or Jupyter Notebooks. It involves defining your analysis scheme, which includes: | ||
|
||
- A model: Defines the kinetic scheme of your system. | ||
- Parameters: Initial guesses and constraints for the model parameters. | ||
- Experimental data: The data you want to fit. | ||
|
||
You then use pyglotaran to optimize the model parameters to fit your data. | ||
|
||
### Install Jupyter Notebook (Optional) | ||
|
||
If you plan to use pyglotaran within Jupyter Notebooks, install Jupyter Notebook in your virtual environment: | ||
|
||
```bash | ||
pip install jupyterlab | ||
``` | ||
|
||
Then, start the Jupyter Notebook server: | ||
|
||
```bash | ||
jupyter lab | ||
``` | ||
|
||
This will open the Jupyter Notebook interface in your web browser. | ||
|
||
## Examples and Tutorials | ||
|
||
We have prepared comprehensive examples in the form of Jupyter Notebooks in the pyglotaran-examples repository. These examples illustrate how to use the framework for various use cases. | ||
|
||
To get started: | ||
|
||
1. Clone or [download](https://github.com/glotaran/pyglotaran-examples/archive/refs/heads/main.zip) the repository: | ||
|
||
```bash | ||
git clone https://github.com/glotaran/pyglotaran-examples.git | ||
``` | ||
|
||
_**Note** (for Linux users): use pip3 instead of pip if Python2 is the system default Python installation._ | ||
2. Navigate to the example that best matches your use case. | ||
|
||
_**Note** (for Anaconda users): please make sure to update your distribution prior to install since some packages managed by Anaconda cannot be updated by `pip`._ | ||
3. Run the Jupyter Notebook to see pyglotaran in action. |
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,17 @@ | ||
# Usage notice for scientists | ||
|
||
## Disclaimer | ||
|
||
This software package is made available as an early access release, to the advantage of the (scientific) community who wishes to make use of it before it has fully matured, but without any warranties. | ||
|
||
Anyone using this package for serious work - scientists and academic users in particular - are cautioned, and treat it as any other instrument or tool that requires calibration or validation. Also be prepared for some refactoring of models or analysis specifications, sometime down the line. | ||
|
||
## Scientific usage | ||
|
||
That said, the pyglotaran package has been used in several peer-reviewed scientific publications, and it has been partially cross-validated against comparable software, such as the [R-package TIMP](https://dx.doi.org/10.18637/jss.v018.i03), and the TIM software described in [this publication](https://doi.org/10.1016/j.bbabio.2004.04.011) ([DOI: 10.1016/j.bbabio.2004.04.011](https://doi.org/10.1016/j.bbabio.2004.04.011)). | ||
|
||
The examples used in this validation process can be obtained from the [pyglotaran-examples repository](https://github.com/glotaran/pyglotaran-examples). | ||
|
||
Since the early access version `v0.6.0` it was used in scientific teaching by a number of students in the Photosynthesis and Energy course from 2022-2024 under the supervision of [dr. Ivo van Stokkum](https://www.nat.vu.nl/~ivo/) ([profile](https://research.vu.nl/en/persons/ihm-van-stokkum), github: [ism200](https://github.com/ism200/)). Course material can be found here: [ism200\PE2022](https://github.com/ism200/PE2022/) | ||
|
||
## Quality Control |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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