-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation geoips installation #651
base: main
Are you sure you want to change the base?
Conversation
|
||
.. code:: bash | ||
|
||
mamba activate geoips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think conda activate geoips all the time - mamba activate doesn't seem to actually work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - changed
Install system dependencies directly | ||
------------------------------------ | ||
|
||
If you are an expert user, you may want to install the dependencies manually. Do not do this if you already installed | ||
dependencies with Conda. | ||
|
||
Required | ||
^^^^^^^^ | ||
|
||
* ``git`` | ||
* ``openblas`` (required for scipy pip install) | ||
* ``make`` (required for pypublicdecompwt) | ||
* ``python`` >= 3.9 | ||
|
||
Optional | ||
^^^^^^^^ | ||
|
||
* ``gfortran`` (required for plugins including fortran builds) | ||
* ``gcc`` and ``g++`` (required for plugins including fortran or C builds, and ARM machines) | ||
* ``pdflatex`` (optional, for building pdf documentation) | ||
* ``wget`` (required for downloading test data) | ||
* ``make`` (optional, for building packages on ARM machines) | ||
* Test data repos can be installed in `$GEOIPS_TESTDATA_DIR` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this should not go in the standard installation. We should keep the standard installation very clean and vanilla, to avoid unnecessary confusion. Our standard supported installation is conda - and this is not necessary if you are installing with conda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just remove this entire section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To echo Mindy, I also agree that the standard installation instructions (conda install on a Linux machine) should be clean and as minimal as possible. I think it not only makes it easier for the end-user, but also makes it easier for us to help troubleshoot a standard installation if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I changed this document to be conda only 🙂
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" | ||
|
||
The optional dependencies are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"All of the optional dependencies are required in order for tests to pass"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true for debug, lint and doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My install is passing base_test
with only test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I'm not passing the pytest with or without the lint/doc/debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mindyls ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_docs.sh is part of the "test_all.sh" scripts in geoips_clavrx and data_fusion, and full_test.sh to pass. If we want people to use the test_all.sh and/or full_test.sh to confirm full functionality, then it does include doc and lint. Probably not debug
Development | ||
----------- | ||
|
||
The installation steps for developers are the same as for normal and/or expert users, except for one step. | ||
|
||
Most developers use Conda installations, but any dependency management solution is fine. | ||
|
||
When installing geoips, please install all the extras and install in **editable** mode so that changes to the code are | ||
immediately reflected in the installed package. Eg. | ||
|
||
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install -e "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" | ||
|
||
See the [ADDING FUNCTIONALITY] page for more details on how to contribute to GeoIPS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If people are cloning the repo anyway, why not just do the editable install and leave it at that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using -e
means the system points to the current folder, whereas usually it's copied elsewhere. So -e
means if you delete the clone, your install will break.... Not sure if that's important, so I can just leave it as -e
by default for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to -e
by default
Docker | ||
------ | ||
|
||
We provide a working Dockerfile that can be used to run GeoIPS in a container. | ||
|
||
The Dockerfile can be built into a Docker image by cloning the GeoIPS repository and | ||
running ``docker build``. For example: | ||
|
||
.. code:: bash | ||
|
||
git clone https://github.com/NRLMMD-GEOIPS/geoips.git geoips | ||
cd geoips | ||
docker build -t geoips . | ||
|
||
The Docker image can be run with the following command: | ||
|
||
.. code:: bash | ||
|
||
docker run -it geoips # Run the container in interactive mode | ||
|
||
Right now, the Docker image is only used for development and testing. | ||
|
||
We suggest mounting in a data directory so your containers don't get too large. | ||
|
||
If you are interested in using the Docker build | ||
for production or plugin development, please reach | ||
out to us via our contact page [CONTACT PAGE] or create an issue on GitHub [ISSUE PAGE]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in a separate document. I think this installation should 100% only be for the "standard" conda based install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved non-conda portions to a separate document
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just take this out as well - just do the full editable install that is required for the tests to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to -e
. Is a full install required for tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends how we want people to test geoips_clavrx and data_fusion
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just go with pip install -e here, and take out the next section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to -e
and moved the development section to a different document
.. note:: | ||
|
||
If you would like to run plugins that require fortran, you will need to install ``gfortran``. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People will likely not know this in advance, so it may just confuse matters whether thye need it or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, added to default install command
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install -e "$GEOIPS_PACKAGES_DIR/geoips[test]" | ||
|
||
If you want to install GeoIPS with all optional dependencies, you can use: | ||
|
||
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would ONLY include
pip install -e "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]"
Right now the tests will fail if doc,lint,test,debug are not all installed.
Just have one geoips installation method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add -e
to the second line - is there any reason to install doc, lint, and debug? See above - my tests seem to be passing without them
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" | ||
|
||
The optional dependencies are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a note here:
"These optional dependencies are all required for tests to fully pass"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments above 🙂
Install GeoIPS | ||
-------------- | ||
|
||
We can use ``pip`` to install all GeoIPS Python dependencies, and GeoIPS itself. | ||
|
||
First, clone the GeoIPS git repository: | ||
|
||
.. code:: bash | ||
|
||
git clone https://github.com/NRLMMD-GeoIPS/geoips.git $GEOIPS_PACKAGES_DIR/geoips | ||
|
||
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips" | ||
|
||
If you want to install GeoIPS with all optional dependencies, you can use: | ||
|
||
.. code:: bash | ||
|
||
# Ensure geoips python environment enabled before installing geoips | ||
pip install "$GEOIPS_PACKAGES_DIR/geoips[doc,lint,test,debug]" | ||
|
||
The optional dependencies are: | ||
|
||
- ``doc``: for building the documentation with Sphinx | ||
(the documentation is also available online at | ||
https://nrlmmd-geoips.github.io/geoips/) | ||
- ``lint``: for linting the code (useful for developers) | ||
- ``test``: for running the tests | ||
- ``debug``: for debugging the code with IPython/jupyter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intention for this section of the installation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is to - later - embed it in the advanced and the basic installation instructions
:orphan: | ||
|
||
Testing | ||
======= | ||
|
||
.. note:: | ||
|
||
Setting up WSL through windows is the easiest method for running GeoIPS on | ||
a Windows system. To do so, follow directions on | ||
`Microsoft WSL Install <https://learn.microsoft.com/en-us/windows/wsl/install>`_. | ||
This requires administrator privileges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intention for this section of the getting started?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is to add more information about testing geoips in the future, but that's not needed here
Installing | ||
========== | ||
|
||
.. note:: | ||
|
||
Setting up WSL through windows is the easiest method for running GeoIPS on | ||
a Windows system. To do so, follow directions on | ||
`Microsoft WSL Install <https://learn.microsoft.com/en-us/windows/wsl/install>`_. | ||
This requires administrator privileges. | ||
|
||
For all installation methods, you need to setup environmental variables. | ||
|
||
The required environmental variables are: | ||
|
||
-``GEOIPS_PACKAGES_DIR`` is where GeoIPS looks for itself and its plugin packages | ||
-``GEOIPS_TESTDATA_DIR`` is where GeoIPS looks to find its test datasets | ||
-``GEOIPS_OUTDIRS`` defines where GeoIPS will write output data and imagery | ||
|
||
These are fine defaults for most users: | ||
|
||
.. code:: bash | ||
|
||
export GEOIPS_PACKAGES_DIR=$HOME/geoips | ||
export GEOIPS_TESTDATA_DIR=$GEOIPS_PACKAGES_DIR/test_data | ||
export GEOIPS_OUTDIRS=$GEOIPS_PACKAGES_DIR/outdirs | ||
|
||
If desired, the GeoIPS environment variables can be added to your | ||
default shell configuration file (which is typically stored in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to link to this from anywhere, or just leave it orphaned for now, for later update / completion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ I think orphaned for now is fine
| # # # This source code is protected under the license referenced at | ||
| # # # https://github.com/NRLMMD-GEOIPS. | ||
|
||
Installing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is going to be our "official" installatin method that we are sending out for people to use this week, then we will need to update the README.md to point here for installation.
Do we want to update this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I tested, but I'm fine sending out the old instructions and waiting on this if we still have things to discuss
|
||
.. code:: bash | ||
|
||
mamba create -y -n geoips -c conda-forge python=3.10 openblas git gfortran **pyhdf** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might just comment this line so people don't do this by default. I don't know if it matters either way, but 99% sure people will just copy/paste their way through.
https://nrlmmd-geoips.github.io/geoips/) | ||
- ``lint``: for linting the code (useful for developers) | ||
- ``test``: for running the tests | ||
- ``debug``: for debugging the code with IPython/jupyter (also useful for developers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is worth having the base_install.sh and base_test.sh bundled as part of the basic installation - it is worth having immediate feedback that the install was successful. And it's really only 3 extra lines (base_install.sh, create_plugin_registries, and base_test.sh).
Oh - there is no create_plugin_registries included in this installation, so geoips is not fully functional at the end of this document.
Related Issues
fixes #609
related to #611 and #531
Testing Instructions
Build the docs 🙂
Summary
I updated the install docs. They were tested line-by-line on a mac and a debian system for conda, expert and docker installs.
Output
All done:
Relevant XKCD: (Universal Install Script)