|
11 | 11 | > to change in the next few months. |
12 | 12 | > |
13 | 13 |
|
14 | | -# New User Information |
| 14 | +# Getting Started |
15 | 15 |
|
16 | | -Guidelines for new users still need to be developed. For those looking to get started, follow the installation instructions below in this README, and then head to the tutorial sub-package to get going. |
| 16 | +Guidelines for new users still need to be developed. |
| 17 | +For new users, we recommend following the instructions in the [Tutorials](#tutorials) section of this README. |
| 18 | +Installation instructions are intended for users already familiar with the project. |
17 | 19 |
|
18 | | -When this repository is ready for wider use, the intention is to release PyEarthTools on PyPI and conda-forge. |
| 20 | +# Installation |
| 21 | + |
| 22 | +## Repository Layout |
19 | 23 |
|
20 | | -# Repository Layout |
| 24 | +This is a so-called monorepo. `PyEarthTools` comprises multiple, modular packages within a shared namespace that inter-operate in order to provide the overall functionality of the framework. It is not necessary to install all of them, and it is envisioned that many users are likely to want only some parts of the framework. As such, each sub-package is a fully independent Python package, with its own requirements and its own installation process. Each of these sub-packages lies in the [`packages`](packages/) subdirectory. |
21 | 25 |
|
22 | | -This is a so-called monorepo. PyEarthTools comprises multiple, modular packages within a shared namespace that inter-operate in order to provide the overall functionality of the framework. It is not necessary to install all of them, and it is envisioned that many users are likely to want only some parts of the framework. As such, each sub-package is a fully independent Python package, with its own requirements and its own installation process. |
| 26 | +## User installation |
23 | 27 |
|
24 | | -Each of these sub-packages lies in the 'packages' subdirectory. Developers of `PyEarthTools` will most likely want to check out the entire monorepo and work on changesets which may span sub-packages. Each sub-package is versioned separately, so bugfixes or updates in a single sub-package can be performed independently without requiring a new release of the entire ecosystem. |
| 28 | +Each of PyEarthTools package can be installed separately using `pip`, directly from GitHub. |
| 29 | +For example, to install the `pyearthtools-utils` package, use: |
25 | 30 |
|
26 | | -For simplicity, the instructions here explain how to check out the whole codebase and install everything for a developer context. |
| 31 | +``` |
| 32 | +pip install git+https://github.com/ACCESS-Community-Hub/PyEarthTools.git#subdirectory=packages/utils |
| 33 | +``` |
27 | 34 |
|
| 35 | +Other available packages are `pyearthtools-data`, `pyearthtools-pipeline` and `pyearthtools-training`, that can be installed as follows: |
28 | 36 |
|
29 | | -# Installation |
| 37 | +``` |
| 38 | +pip install git+https://github.com/ACCESS-Community-Hub/PyEarthTools.git#subdirectory=packages/data |
| 39 | +pip install git+https://github.com/ACCESS-Community-Hub/PyEarthTools.git#subdirectory=packages/pipeline |
| 40 | +pip install git+https://github.com/ACCESS-Community-Hub/PyEarthTools.git#subdirectory=packages/training |
| 41 | +``` |
| 42 | + |
| 43 | +> [!NOTE] |
| 44 | +> When this repository is ready for wider use, the intention is to release `PyEarthTools` on PyPI and conda-forge. |
30 | 45 |
|
31 | | -First clone the repository using the `develop` branch: |
| 46 | +## Developer installation |
| 47 | + |
| 48 | +Developers of `PyEarthTools` will most likely want to check out the entire monorepo and work on changesets which may span sub-packages. Each sub-package is versioned separately, so bugfixes or updates in a single sub-package can be performed independently without requiring a new release of the entire ecosystem. |
| 49 | + |
| 50 | +First clone this repository: |
32 | 51 |
|
33 | 52 | ``` |
34 | | -git clone [email protected]:ACCESS-Community-Hub/PyEarthTools.git |
35 | | -cd pyearthtools |
| 53 | +git clone https://github.com/ACCESS-Community-Hub/PyEarthTools.git |
36 | 54 | ``` |
37 | 55 |
|
38 | | -Then create a Python virtual environment: |
| 56 | +and install all packages in "editable" mode with |
39 | 57 |
|
40 | 58 | ``` |
41 | | -python3 -m venv venv |
42 | | -venv/bin/activate |
| 59 | +cd PyEarthTools |
| 60 | +pip install -r requirements-dev.txt |
43 | 61 | ``` |
44 | 62 |
|
45 | | -or a Conda environment to install all dependencies: |
| 63 | +> [!WARNING] |
| 64 | +> We do recommend using a Python virtual environment or a Conda environment when developing, to isolate this installation from the rest of your system. |
| 65 | +
|
| 66 | + |
| 67 | +# Tutorials |
| 68 | + |
| 69 | +For new users, we recommend running the tutorials first, to see `PyEarthTools` in action and get familiar with it. |
| 70 | + |
| 71 | +The following instructions assume that you have access to [Conda](https://docs.conda.io/projects/conda/en/latest/index.html) on your system. |
| 72 | + |
| 73 | +> [!WARNING] |
| 74 | +> These instructions have been tested on Linux and macOS. We have not tested them on **Windows**. |
| 75 | +> We welcome any contribution to improve this situation 🙂. |
| 76 | +
|
| 77 | +First clone this repository and switch to the tutorials folder: |
46 | 78 |
|
47 | 79 | ``` |
48 | | -conda create -p ./venv -y python=3.11 |
49 | | -conda activate ./venv |
| 80 | +git clone https://github.com/ACCESS-Community-Hub/PyEarthTools.git |
| 81 | +cd PyEarthTools/packages/tutorial |
50 | 82 | ``` |
51 | 83 |
|
52 | | -And install all dependencies via pip: |
| 84 | +Then create a Conda environment to install all dependencies: |
53 | 85 |
|
54 | 86 | ``` |
55 | | -pip install -r requirements-dev.txt |
| 87 | +conda env create -f environment.yml -p ./venv |
56 | 88 | ``` |
57 | 89 |
|
58 | | -You can run some of the tests to check that your installation worked: |
| 90 | +Next, to run the example [notebooks](PyEarthTools/packages/tutorial/nbook/), you can either |
| 91 | + |
| 92 | +- start a JupyterLab instance |
59 | 93 |
|
60 | 94 | ``` |
61 | | -pytest packages/data/tests/ |
| 95 | +conda activate ./venv |
| 96 | +jupyter lab |
62 | 97 | ``` |
63 | 98 |
|
64 | | -To run example [notebooks from the tutorial package](packages/tutorial/nbook), you may need to also install a Jupyter kernel for your environment: |
| 99 | +- or install a Jupyter kernel to use in a pre-existing JupyterLab installation |
65 | 100 |
|
66 | 101 | ``` |
67 | | -# from the activate virtual or conda environment |
68 | | -pip install ipykernel |
69 | | -python -m ipykernel install --user --name pyearthtools |
| 102 | +conda activate ./venv |
| 103 | +python -m ipykernel install --user --name PET-tutorial |
70 | 104 | ``` |
0 commit comments