Skip to content

Commit

Permalink
Merge pull request #148 from stargaser/conda-version-check
Browse files Browse the repository at this point in the history
Add version check of conda and update package versions 3010909
  • Loading branch information
tomdonaldson committed Dec 14, 2023
1 parent ea73b94 commit 046583e
Show file tree
Hide file tree
Showing 93 changed files with 2,100 additions and 2,007 deletions.
Binary file modified .doctrees/00_SETUP.doctree
Binary file not shown.
Binary file modified .doctrees/KNOWN_ISSUES.doctree
Binary file not shown.
Binary file removed .doctrees/UseCase_II.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
98 changes: 68 additions & 30 deletions 00_SETUP.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Known issues and workarounds" href="KNOWN_ISSUES.html" />
<link rel="prev" title="Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram" href="UseCase_III.html" />
<link rel="prev" title="Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram" href="content/use_case_notebooks/hr_diagram_solution.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="None"/>
</head>
Expand Down Expand Up @@ -150,18 +150,18 @@
</li>
</ul>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="CS_Catalog_Queries.html">Accessing astronomical catalogs</a></li>
<li class="toctree-l1"><a class="reference internal" href="CS_Image_Access.html">Searching for and retrieving images</a></li>
<li class="toctree-l1"><a class="reference internal" href="CS_Spectral_Access.html">Retrieve spectra using Simple Spectral Access protocol</a></li>
<li class="toctree-l1"><a class="reference internal" href="CS_UCDs.html">UCDs: working with heterogeneous tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="CS_VO_Tables.html">Creating a VO Table from a CSV file</a></li>
<li class="toctree-l1"><a class="reference internal" href="Exercise_I.html">Science User Case - Inspecting a Candidate List</a></li>
<li class="toctree-l1"><a class="reference internal" href="Exercise_II.html">Preparing a proposal</a></li>
<li class="toctree-l1"><a class="reference internal" href="Exercise_III.html">Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram</a></li>
<li class="toctree-l1"><a class="reference internal" href="QuickReference.html">Quick Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="UseCase_I.html">Science User Case - Inspecting a Candidate List</a></li>
<li class="toctree-l1"><a class="reference internal" href="UseCase_II.html">Preparing a proposal</a></li>
<li class="toctree-l1"><a class="reference internal" href="UseCase_III.html">Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/catalog_queries.html">Accessing astronomical catalogs</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/image_access.html">Searching for and retrieving images</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/spectral_access.html">Retrieve spectra using Simple Spectral Access protocol</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/ucds_unified_content_descriptors.html">UCDs: working with heterogeneous tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/votables.html">Creating a VO Table from a CSV file</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/candidate_list_exercise.html">Science User Case - Inspecting a Candidate List</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/proposal_prep_exercise.html">Preparing a proposal</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/hr_diagram_exercise.html">Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/reference_notebooks/basic_reference.html">Quick Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/candidate_list_solution.html">Science User Case - Inspecting a Candidate List</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/proposal_prep_solution.html">Preparing a proposal</a></li>
<li class="toctree-l1"><a class="reference internal" href="content/use_case_notebooks/hr_diagram_solution.html">Creating a stellar color-magnitude (or Hertzsprung-Russell) diagram</a></li>
</ul>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Configuring the Workshop Environment</a></li>
Expand Down Expand Up @@ -377,12 +377,13 @@ <h2> Contents </h2>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#install-miniconda-if-needed">1. Install Miniconda (if needed)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#open-the-conda-command-prompt">2. Open the conda command prompt</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#update-conda-version">2. Update conda version</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#install-git-if-needed">3. Install git (if needed)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#clone-this-repository">4. Clone This Repository</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-a-conda-environment-for-the-workshop">5. Create a conda environment for the workshop</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#check-installation">6. Check Installation</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#starting-jupyterlab">7. Starting Jupyterlab</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#handling-notebooks-in-myst-markdown-format">8. Handling Notebooks in MyST-Markdown format</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#additional-resources">Additional Resources</a></li>
</ul>
</nav>
Expand Down Expand Up @@ -414,20 +415,39 @@ <h2>1. Install Miniconda (if needed)<a class="headerlink" href="#install-minicon
<p>On Windows, you might also need
<a class="reference external" href="https://github.com/conda/conda-build/wiki/Windows-Compilers">additional compilers</a>.</p>
</section>
<section id="open-the-conda-command-prompt">
<h2>2. Open the conda command prompt<a class="headerlink" href="#open-the-conda-command-prompt" title="Permalink to this headline">#</a></h2>
<section id="update-conda-version">
<h2>2. Update conda version<a class="headerlink" href="#update-conda-version" title="Permalink to this headline">#</a></h2>
<p><em>Miniconda includes an environment manager called conda. Environments
allow you to have multiple sets of Python packages installed at the same
time, making reproducibility and upgrades easier. You can create,
export, list, remove, and update environments that have different versions of
Python and/or packages installed in them. For this workshop, we will configure the environment using the conda command prompt.</em></p>
<p>On Mac or Linux, the <code class="docutils literal notranslate"><span class="pre">bash</span></code> shell will handle the conda commands. Open your terminal and verify your shell environment:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">echo $SHELL</span>
<p>Open a terminal window and verify that conda is working:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% conda info
</pre></div>
</div>
<p>If you are having trouble, check your shell in a terminal window:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% echo $SHELL
</pre></div>
</div>
<p>then run the initialization if needed, in that same terminal window:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% conda init `basename $SHELL`
</pre></div>
</div>
<p>You should open a new terminal window after <code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">init</span></code> is run.</p>
<p>It is advisable to update your conda to the latest version. We recommend a minimum
version of 23.10.0. Check your conda version with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% conda --version
</pre></div>
</div>
<p>Update it with:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% conda update conda
</pre></div>
</div>
<p>or</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% conda update -n base conda
</pre></div>
</div>
<p>If the output text does not contain <code class="docutils literal notranslate"><span class="pre">bash</span></code>, switch to the bash shell before
being able to run anything related to conda.</p>
<p>On Windows, open the <code class="docutils literal notranslate"><span class="pre">Anaconda</span> <span class="pre">Prompt</span></code> terminal app.</p>
</section>
<section id="install-git-if-needed">
<h2>3. Install git (if needed)<a class="headerlink" href="#install-git-if-needed" title="Permalink to this headline">#</a></h2>
Expand Down Expand Up @@ -458,13 +478,8 @@ <h2>5. Create a conda environment for the workshop<a class="headerlink" href="#c
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">cd navo-workshop</span>
</pre></div>
</div>
<p>To speed up the installation of the environment, install the
<code class="docutils literal notranslate"><span class="pre">conda-libmamba-solver</span></code> package:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">conda install conda-libmamba-solver</span>
</pre></div>
</div>
<p>And finally, on any platform, to install and activate the conda environment for the workshop, type:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">conda env create --solver=libmamba --file environment.yml</span>
<p>To install and activate the conda environment for the workshop, type:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">conda env create --file environment.yml</span>
<span class="go">conda activate navo-env</span>
</pre></div>
</div>
Expand All @@ -490,6 +505,28 @@ <h2>7. Starting Jupyterlab<a class="headerlink" href="#starting-jupyterlab" titl
</pre></div>
</div>
</section>
<section id="handling-notebooks-in-myst-markdown-format">
<h2>8. Handling Notebooks in MyST-Markdown format<a class="headerlink" href="#handling-notebooks-in-myst-markdown-format" title="Permalink to this headline">#</a></h2>
<p>The Jupyter notebooks in this repository are in
<a class="reference external" href="https://myst-nb.readthedocs.io/en/v0.13.2/use/markdown.html">MyST-Markdown format</a>.
The <a class="reference external" href="https://jupytext.readthedocs.io/en/latest/index.html">jupytext</a> package is
included in your <code class="docutils literal notranslate"><span class="pre">navo-env</span></code> environment to work with these notebooks. Note that
the <code class="docutils literal notranslate"><span class="pre">jupytext</span></code> package has to be installed before your Jupyterlab session starts.</p>
<p>To open one of these notebooks (in the <code class="docutils literal notranslate"><span class="pre">content/reference_notebooks</span></code> and the
<code class="docutils literal notranslate"><span class="pre">content/use_case_notebooks</span></code> subdirectories), in the Jupyterlab file panel,
right-click on the notebook, choose “Open With”, and select “Notebook” or
“Jupytext Notebook” from the drop-down menu. See the screenshot below.</p>
<p><img alt="Right-click on Markdown notebook" src="_images/jupytext_rightclick.png" /></p>
<p>It is possible to change your Jupyterlab settings to allow double-clicking on a
Markdown notebook to open automatically as a Jupytext Notebook. In Jupyterlab,
navigate from the top-level menu item “Settings” and select “Settings Editor”
in the drop-down. In the left sidebar of the Setting Editor tab, select
“Document Manager”. The display should look like the image included below. In
the “Default Viewers” section, add a <code class="docutils literal notranslate"><span class="pre">newKey</span></code> of <code class="docutils literal notranslate"><span class="pre">markdown</span></code> and a <code class="docutils literal notranslate"><span class="pre">New</span> <span class="pre">Value</span></code>
of <code class="docutils literal notranslate"><span class="pre">Jupytext</span> <span class="pre">Notebook</span></code>. This will allow a double-click to open the Markdown
notebooks appropriately.</p>
<p><img alt="Jupyterlab Document Manager settings" src="_images/jupytext_settings.png" /></p>
</section>
<section id="additional-resources">
<h2>Additional Resources<a class="headerlink" href="#additional-resources" title="Permalink to this headline">#</a></h2>
<ul class="simple">
Expand All @@ -512,7 +549,7 @@ <h2>Additional Resources<a class="headerlink" href="#additional-resources" title
<div class="footer-article-item"><!-- Previous / next buttons -->
<div class="prev-next-area">
<a class="left-prev"
href="UseCase_III.html"
href="content/use_case_notebooks/hr_diagram_solution.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
Expand Down Expand Up @@ -548,12 +585,13 @@ <h2>Additional Resources<a class="headerlink" href="#additional-resources" title
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#install-miniconda-if-needed">1. Install Miniconda (if needed)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#open-the-conda-command-prompt">2. Open the conda command prompt</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#update-conda-version">2. Update conda version</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#install-git-if-needed">3. Install git (if needed)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#clone-this-repository">4. Clone This Repository</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#create-a-conda-environment-for-the-workshop">5. Create a conda environment for the workshop</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#check-installation">6. Check Installation</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#starting-jupyterlab">7. Starting Jupyterlab</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#handling-notebooks-in-myst-markdown-format">8. Handling Notebooks in MyST-Markdown format</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#additional-resources">Additional Resources</a></li>
</ul>
</nav></div>
Expand Down
Loading

0 comments on commit 046583e

Please sign in to comment.