Skip to content
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

update conda install to conda create #294

Merged
merged 4 commits into from
Aug 1, 2022
Merged

Conversation

durack1
Copy link
Collaborator

@durack1 durack1 commented Aug 1, 2022

Hopefully this path will avoid some of the dependency issues experienced by Mike W on Perlmutter

@tomvothecoder I hope this is useful

Fix #293

Hopefully this path will avoid some of the dependency issues experienced by Mike W on perlmutter
Copy link
Collaborator

@tomvothecoder tomvothecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @durack1, thanks for this PR!

I think we should keep in the single line command for installing xcdat in existing environments, in addition to creating conda environments from scratch with xcdat. Most conda packages usually list conda install in existing environments, with the assumption that you know how to build conda environments.

Here's the installation example on xarray: https://docs.xarray.dev/en/stable/getting-started-guide/installing.html#instructions

Xarray itself is a pure Python package, but its dependencies are not. The easiest way to get everything installed is to use conda. To install xarray with its recommended dependencies using the conda command line tool:

$ conda install -c conda-forge xarray dask netCDF4 bottleneck

docs/getting-started.rst Outdated Show resolved Hide resolved
Comment on lines 18 to 29
Installation
------------

To install ``xcdat`` using `conda`_, run:
We recommend using the anaconda environment creation procedure to install ``xcdat``. The advantage of following this approach, is that any dependencies (e.g. ``python >= 3.8``) will be resolved during the environment creation. To proceed, run:

.. code-block:: console
To create an ``xcdat`` anaconda environment, run:

>>> conda install -c conda-forge xcdat
.. code-block:: console

>>> conda create -n <xcdat> -c conda-forge xcdat

.. _conda: https://docs.conda.io/en/latest/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestions:

Installation
------------

1. Create a Conda environment from scratch with ``xcdat``

   We recommend using the Conda environment creation procedure to install ``xcdat``.
   The advantage with following this approach is that Conda will attempt to resolve dependencies (e.g. ``python >= 3.8``) for compatibility.

   To create a Conda environment with ``xcdat``, run:

   .. code-block:: console

       >>> conda create -n <ENV_NAME> -c conda-forge xcdat
       >>> conda activate <ENV_NAME>

2. Install ``xcdat`` in an existing Conda environment

   You can also install ``xcdat`` in an existing Conda environment, granted that Conda is able to resolve the compatible dependencies.

   .. code-block:: console

       >>> conda activate <ENV_NAME>
       >>> conda install -c conda-forge xcdat

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the above looks good to you, you can paste it over your edits.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the first option is technically a Conda environment with xcdat (and other user-specified packages installed), rather than an "xcdat anaconda environment".

Copy link
Collaborator

@tomvothecoder tomvothecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some minor fixes that I committed. Once the CI/CD build completes, feel free to merge.

Comment on lines 18 to 29
Installation
------------

To install ``xcdat`` using `conda`_, run:
We recommend using the anaconda environment creation procedure to install ``xcdat``. The advantage of following this approach, is that any dependencies (e.g. ``python >= 3.8``) will be resolved during the environment creation. To proceed, run:

.. code-block:: console
To create an ``xcdat`` anaconda environment, run:

>>> conda install -c conda-forge xcdat
.. code-block:: console

>>> conda create -n <xcdat> -c conda-forge xcdat

.. _conda: https://docs.conda.io/en/latest/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the first option is technically a Conda environment with xcdat (and other user-specified packages installed), rather than an "xcdat anaconda environment".

docs/getting-started.rst Outdated Show resolved Hide resolved
docs/getting-started.rst Outdated Show resolved Hide resolved
docs/getting-started.rst Outdated Show resolved Hide resolved
@tomvothecoder tomvothecoder added type: docs Updates to documentation Priority: Medium labels Aug 1, 2022
Copy link
Collaborator Author

@durack1 durack1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up my sloppy syntax @tomvothecoder - I can't approve, so over to you guys to tweak as you like

@tomvothecoder tomvothecoder merged commit 8544a43 into xCDAT:main Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Updates to documentation
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Doc]: update conda install to conda create
2 participants