From 6774c386e08d43ac5a073b52d5510d261b2aa979 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 31 Mar 2025 13:17:43 -0700 Subject: [PATCH 1/2] Refresh README --- README.rst | 131 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 75 insertions(+), 56 deletions(-) diff --git a/README.rst b/README.rst index 81725950c..ee0f57514 100644 --- a/README.rst +++ b/README.rst @@ -26,15 +26,13 @@ :alt: pre-commit.ci status -Welcome to **geoapps** - Open-source applications in geosciences -================================================================ +**Geoapps** - Open-source applications in geosciences +===================================================== .. image:: https://github.com/MiraGeoscience/geoapps/raw/v0.10.0-rc.2/docs/images/index_page.png :align: right :width: 50% -In short -^^^^^^^^ The **geoapps** project has been created by `Mira Geoscience`_ for the development and sharing of open-source applications in geoscience. Users will be able to directly leverage the powerful visualization capabilities of @@ -44,12 +42,10 @@ applications in geoscience. Users will be able to directly leverage the powerful .. _Geoscience ANALYST: https://mirageoscience.com/mining-industry-software/geoscience-analyst/ -Links -^^^^^ +Documentation +^^^^^^^^^^^^^ -- `Download the latest `_ -- `Getting started `_ -- `Documentation `_ +- `Online documentation `_ Current sponsors @@ -75,77 +71,97 @@ Install Conda To install **geoapps**, you need to install **Conda** first. - We recommend to install **Conda** using `miniforge`_. .. _miniforge: https://github.com/conda-forge/miniforge +Quick installation +------------------- + +To install (or re-install) a conda environment to run **geoapps**, simply execute the **install.bat** file. + +To install in editable mode, so that changes in the source code are immediately reflected in the +running application, execute with the ``-e`` option: ``install.bat -e``. + +.. warning:: + + In editable mode, the source folder must not be moved or deleted after installation. -Within a conda environment --------------------------- -You can install (or update) a conda environment with all the requires packages to run **geoapps**. -To do so you can directly run the **Install_or_Update.bat** file by double left clicking on it. +Manual installation +------------------- -Install with conda ------------------- +You should not install the package directly with ``pip``, as the app requires conda packages to run. -You can install the package using ``conda`` and the ``.lock`` files from a conda prompt: +First create a Conda environment with all the required dependencies, +then activate it and install the package in this environment using +``pip install --no-deps ...`` + +See instructions below for more details and options. + +Prepare a Conda environment with dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You can create a Conda environment with all the required dependencies ``conda`` and the ``.lock`` +files from a conda prompt:: + + $ conda env create --solver libmamba -n geoapps -f environments/[the_desired_env].lock.yml + +.. note:: -.. code-block:: bash + The package itself is not install yet in the Conda environment. See following instructions. - conda env create --solver libmamba -n my-env -f environments/[the_desired_env].lock.yml +.. warning:: -Install with PyPI ------------------ + All the following ``pip`` commands are meant to be executed in the Conda environment you just created. + Activate it with:: -You should not install the package from PyPI, as the app requires conda packages to run. -Still, you can install it in a prepared conda environment, telling ``pip`` not to install dependencies -thanks to the ``--no-deps`` option. + $ conda activate geoapps From PyPI ~~~~~~~~~ -To install the **geoapps** package published on PyPI: +To install the **geoapps** package published on PyPI:: -.. code-block:: bash - - pip install -U --no-deps geoapps + $ pip install --no-deps -U geoapps From a Git tag or branch ~~~~~~~~~~~~~~~~~~~~~~~~ -If the revision of the package is not on PyPI yet, you can install it from a Git tag: - -.. code-block:: bash - - pip install -U --no-deps --force-reinstall https://github.com/MiraGeoscience/geoapps/archive/refs/tags/TAG.zip +If the revision of the package is not on PyPI yet, you can install it from a Git tag:: -Or to install the latest changes available on a given Git branch: + $ pip install --no-deps -U --force-reinstall https://github.com/MiraGeoscience/geoapps/archive/refs/tags/TAG.zip -.. code-block:: bash +Or to install the latest changes available on a given Git branch:: - pip install -U --no-deps --force-reinstall https://github.com/MiraGeoscience/geoapps/archive/refs/heads/BRANCH.zip + $ pip install --no-deps -U --force-reinstall https://github.com/MiraGeoscience/geoapps/archive/refs/heads/BRANCH.zip .. note:: + The ``--force-reinstall`` option is used to make sure the updated version of the sources is installed, and not the cached version, even if the version number - did not change. The ``-U`` or ``--upgrade`` option is used to make sure to get the latest version, - on not merely reinstall the same version. As the package is aimed to be in a **Conda environment**, the option ``--no-deps`` is used to avoid installing the dependencies with pip, as they will be installed with conda. + did not change. + + The ``-U`` or ``--upgrade`` option is used to make sure to get the latest version, + on not merely reinstall the same version. + + The option ``--no-deps`` is used to avoid installing the dependencies with pip, + as they have dependencies are already installed within the **Conda environment**. From a local copy of the sources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you have a git clone of the package sources locally, -you can install **geoapps** from the local copy of the sources with: +If you have a git clone of the package sources locally, you can install **geoapps** from the +local copy of the sources. At the root of the sources, you will find a ``pyproject.toml`` file. + +Change directory to the root of the sources:: -.. code-block:: bash + $ cd path/to/project_folder_with_pyproject_toml - pip install -U --force-reinstall path/to/project_folder_with_pyproject_toml +Then run:: -Or in **editable mode**, so that you can edit the sources and see the effect immediately at runtime: + $ pip install --no-deps -U --force-reinstall . -.. code-block:: bash +Or in **editable mode**, so that you can edit the sources and see the effect immediately at runtime:: - pip install -e -U --force-reinstall path/to/project_folder_with_pyproject_toml + $ pip install --no-deps -U --force-reinstall -e . Setup for development ^^^^^^^^^^^^^^^^^^^^^ @@ -153,22 +169,11 @@ To configure the development environment and tools, please see `README-dev.rst`_ .. _README-dev.rst: README-dev.rst -Third Party Software -^^^^^^^^^^^^^^^^^^^^ -The geoapps Software may provide links to third party libraries or code (collectively “Third Party Software”) -to implement various functions. Third Party Software does not comprise part of the Software. -The use of Third Party Software is governed by the terms of such software license(s). -Third Party Software notices and/or additional terms and conditions are located in the -`THIRD_PARTY_SOFTWARE.rst`_ file. - -.. _THIRD_PARTY_SOFTWARE.rst: docs/THIRD_PARTY_SOFTWARE.rst License ^^^^^^^ MIT License -Copyright (c) 2020-2025 Mira Geoscience - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -186,3 +191,17 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Third Party Software +^^^^^^^^^^^^^^^^^^^^ +The geoapps Software may provide links to third party libraries or code (collectively “Third Party Software”) +to implement various functions. Third Party Software does not comprise part of the Software. +The use of Third Party Software is governed by the terms of such software license(s). +Third Party Software notices and/or additional terms and conditions are located in the +`THIRD_PARTY_SOFTWARE.rst`_ file. + +.. _THIRD_PARTY_SOFTWARE.rst: docs/THIRD_PARTY_SOFTWARE.rst + +Copyright +^^^^^^^^^ +Copyright (c) 2020-2025 Mira Geoscience Ltd. From 1a0a60651f3ed9f353734900191fbe1e32f717f7 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 31 Mar 2025 13:22:25 -0700 Subject: [PATCH 2/2] Bump python version for docs --- docs/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/environment.yml b/docs/environment.yml index 953dbcff2..a28410804 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -3,7 +3,7 @@ name: geoapps-docs channels: - conda-forge dependencies: - - python=3.8 + - python=3.10 - pip=21.0.1 - ipywidgets - ipykernel