Files
PrimAITE/docs/source/getting_started.rst

156 lines
3.2 KiB
ReStructuredText
Raw Normal View History

.. only:: comment
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
.. _getting-started:
2023-07-07 11:37:57 +01:00
Getting Started
===============
**Getting Started with PrimAITE**
Pre-Requisites
2023-07-17 09:23:11 +00:00
In order to get **PrimAITE** installed, you will need to have a python version between 3.8 and 3.10 installed. If you don't already have it, this is how to install it:
.. tabs:: lang
.. code-tab:: bash
:caption: Unix
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
sudo apt-get install python3-pip
sudo apt-get install python3-venv
.. code-tab:: text
:caption: Windows (Powershell)
- Manual install from: https://www.python.org/downloads/release/python-31011/
**PrimAITE** is designed to be OS-agnostic, and thus should work on most variations/distros of Linux, Windows, and MacOS.
Install PrimAITE
2023-07-07 11:37:57 +01:00
****************
1. Create a primaite directory in your home directory:
2023-07-07 11:37:57 +01:00
.. tabs:: lang
2023-07-07 11:37:57 +01:00
.. code-tab:: bash
:caption: Unix
2023-07-07 11:37:57 +01:00
mkdir ~/primaite/2.0.0rc2
2023-07-07 11:37:57 +01:00
.. code-tab:: powershell
:caption: Windows (Powershell)
2023-07-07 11:37:57 +01:00
mkdir ~\primaite\2.0.0rc2
2023-07-07 11:37:57 +01:00
2. Navigate to the primaite directory and create a new python virtual environment (venv)
2023-07-07 11:37:57 +01:00
.. tabs:: lang
2023-07-07 11:37:57 +01:00
.. code-tab:: bash
:caption: Unix
2023-07-07 11:37:57 +01:00
cd ~/primaite/2.0.0rc2
python3 -m venv .venv
2023-07-07 11:37:57 +01:00
.. code-tab:: powershell
:caption: Windows (Powershell)
cd ~\primaite\2.0.0rc2
python3 -m venv .venv
attrib +h .venv /s /d # Hides the .venv directory
3. Activate the venv
.. tabs:: lang
.. code-tab:: bash
:caption: Unix
source .venv/bin/activate
.. code-tab:: powershell
:caption: Windows (Powershell)
.\.venv\Scripts\activate
4. Install PrimAITE using pip from PyPi
.. tabs:: lang
.. code-tab:: bash
:caption: Unix
pip install primaite
.. code-tab:: powershell
:caption: Windows (Powershell)
pip install primaite
5. Perform the PrimAITE setup
.. tabs:: lang
.. code-tab:: bash
:caption: Unix
primaite setup
.. code-tab:: powershell
:caption: Windows (Powershell)
primaite setup
Clone & Install PrimAITE for Development
****************************************
To be able to extend PrimAITE further, or to build wheels manually before install, clone the repository to a location
of your choice:
.. TODO:: Add repo path once we know what it is
2023-07-07 11:37:57 +01:00
.. code-block:: bash
2023-07-07 11:37:57 +01:00
git clone <repo path>
cd primaite
2023-07-07 11:37:57 +01:00
Create and activate your Python virtual environment (venv)
2023-07-07 11:37:57 +01:00
.. tabs:: lang
2023-07-07 11:37:57 +01:00
.. code-tab:: bash
:caption: Unix
2023-07-10 10:01:25 +01:00
python3 -m venv venv
source venv/bin/activate
2023-07-07 11:37:57 +01:00
.. code-tab:: powershell
:caption: Windows (Powershell)
2023-07-07 11:37:57 +01:00
python3 -m venv venv
.\venv\Scripts\activate
2023-07-10 10:01:25 +01:00
Install PrimAITE with the dev extra
2023-07-10 15:41:50 +01:00
.. tabs:: lang
2023-07-07 11:37:57 +01:00
.. code-tab:: bash
:caption: Unix
2023-07-07 11:37:57 +01:00
pip install -e .[dev]
2023-07-07 16:25:55 +01:00
.. code-tab:: powershell
:caption: Windows (Powershell)
2023-07-11 13:49:01 +01:00
pip install -e .[dev]
2023-07-11 13:49:01 +01:00
2023-07-07 11:37:57 +01:00
To view the complete list of packages installed during PrimAITE installation, go to the dependencies page (:ref:`Dependencies`).