mirror of
https://github.com/JHUAPL/kaipy.git
synced 2026-01-09 14:28:02 -05:00
Add support for command line scripts
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('../../kaipy'))
|
||||
sys.path.insert(1, os.path.abspath('../../kaipy/scripts/quicklook'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
@@ -33,6 +34,7 @@ release = '1.0.0'
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinxcontrib.autoprogram',
|
||||
'sphinx_rtd_theme'
|
||||
]
|
||||
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
|
||||
Kaipy documentation!
|
||||
=================================
|
||||
`kaipy` is a Python package for supporting the running and analysis of the Mutliscale Atmosphere Geospace Environment (MAGE) Model developed by the Center for Geospace Storms.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
:caption: Kaipy:
|
||||
|
||||
intro
|
||||
kaipy/installation
|
||||
kaipy/requirements
|
||||
kaipy/usage
|
||||
scripts
|
||||
modules
|
||||
|
||||
|
||||
|
||||
81
docs/source/kaipy/installation.rst
Normal file
81
docs/source/kaipy/installation.rst
Normal file
@@ -0,0 +1,81 @@
|
||||
Installation
|
||||
============
|
||||
|
||||
Custom
|
||||
------
|
||||
|
||||
Conda Installation
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Download Miniconda Installer
|
||||
|
||||
- Visit the `Miniconda Downloads <https://docs.conda.io/en/latest/miniconda.html>`_ page.
|
||||
- Select the Linux installer for Python 2.x or 3.x as per your requirements.
|
||||
|
||||
2. Open a Terminal
|
||||
|
||||
- Open a terminal window on Linux by pressing ``Ctrl + Alt + T``, or search for "Terminal" in the applications menu.
|
||||
|
||||
3. Navigate to Download Directory
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd ~/Downloads
|
||||
|
||||
Change to the directory where the installer was downloaded, usually the ``Downloads`` directory.
|
||||
|
||||
4. Make the Installer Executable
|
||||
|
||||
- Make the downloaded script executable. Replace ``Miniconda3-latest-Linux-x86_64.sh`` with the actual downloaded file name.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
chmod +x Miniconda3-latest-Linux-x86_64.sh
|
||||
|
||||
5. Run the Installer
|
||||
|
||||
- Execute the installer script and follow the on-screen instructions.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./Miniconda3-latest-Linux-x86_64.sh
|
||||
|
||||
- You'll need to approve the license agreement and choose the installation location.
|
||||
|
||||
6. Initialize Conda
|
||||
|
||||
- After installation, initialize Miniconda to add Conda to your PATH.
|
||||
|
||||
7. Close and Reopen Your Terminal
|
||||
|
||||
- To apply the changes, close and reopen your terminal window.
|
||||
|
||||
Creating Environment
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Create python 3.8 environment
|
||||
|
||||
.. note::
|
||||
|
||||
The name of the conda environment in this example is ``kaipy``.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda create --name kaipy python=3.8
|
||||
|
||||
Installing kaipy
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. warning::
|
||||
|
||||
cartopy requires geos which doesn't install properly via the pip install. Use the command below if you face the issue.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda install -c conda-forge cartopy
|
||||
|
||||
To install tiegcmpy, run the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install kaipy
|
||||
22
docs/source/kaipy/requirements.rst
Normal file
22
docs/source/kaipy/requirements.rst
Normal file
@@ -0,0 +1,22 @@
|
||||
Requirements
|
||||
============
|
||||
|
||||
kaipy requires:
|
||||
|
||||
- alive_progress
|
||||
- astropy
|
||||
- cartopy
|
||||
- cdasws
|
||||
- configparser
|
||||
- h5py
|
||||
- jupyterlab
|
||||
- matplotlib
|
||||
- pandas
|
||||
- progressbar
|
||||
- pyhdf
|
||||
- pyspedas
|
||||
- pytest
|
||||
- slack_sdk
|
||||
- spacepy
|
||||
- sphinx-rtd-theme
|
||||
- sunpy
|
||||
16
docs/source/kaipy/usage.rst
Normal file
16
docs/source/kaipy/usage.rst
Normal file
@@ -0,0 +1,16 @@
|
||||
Usage
|
||||
=====
|
||||
kaipy can be run in two modes: API and via series scripts.
|
||||
|
||||
Mode: API
|
||||
---------
|
||||
|
||||
Loading datasets
|
||||
~~~~~~~~~~~~~~~~
|
||||
Info on loading datasets here
|
||||
|
||||
Plots
|
||||
~~~~~
|
||||
Info on plots here
|
||||
|
||||
|
||||
11
docs/source/scripts.rst
Normal file
11
docs/source/scripts.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
Kaipy scripts
|
||||
================
|
||||
|
||||
.. autoprogram:: cli:parser
|
||||
:prog: cli.py
|
||||
|
||||
.. autoprogram:: swpic:parser
|
||||
:prog: swpic.py
|
||||
|
||||
.. autoprogram:: msphpic:create_command_line_parser()
|
||||
:prog: msphpic.py
|
||||
Reference in New Issue
Block a user