Skip to content

Commit

Permalink
Merge pull request #87 from UAL-RE/enhancement/86_upgrade_sphinx
Browse files Browse the repository at this point in the history
Issue 86. Upgrade sphix and rst docs
  • Loading branch information
zoidy authored Jul 14, 2022
2 parents ddf8425 + 14918b1 commit 44701cc
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 38 deletions.
31 changes: 31 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt


8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx>=3.0
sphinx-rtd-theme==0.5.1
sphinx-autodoc-typehints==1.11.1
redata==0.3.0
sphinx>=5.0.0
sphinx-rtd-theme==1.0.0
sphinx-autodoc-typehints==1.18.3
redata==0.5.0
2 changes: 1 addition & 1 deletion docs/source/authors.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Authors
=======

- Yan Han (`@yhan818 <http://www.github.com/yhan818>`__) -
- Chun Ly, Ph.D. (`@astrochun <http://www.github.com/astrochun>`__) -
`University of Arizona Libraries <https://github.com/ualibraries>`__,
`Research Engagement <https://github.com/UAL-RE>`__
Expand Down
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# -- Project information -----------------------------------------------------

project = 'ReQUIAM_csv'
copyright = '2021, Arizona Board of Regents'
author = 'Chun Ly'
copyright = '2022, Arizona Board of Regents'
author = 'Yan Han'

# The full version, including alpha/beta/rc tags
release = '0.12.3'
release = '0.13.0'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -57,4 +57,4 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['_static']
2 changes: 1 addition & 1 deletion docs/source/execution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ override the main CSV file (data/research_themes.csv), include the

::

(rsh_themes) $ python requiam_csv/script_run --execute
(admin1) $ python requiam_csv/script_run --execute

.. _workflow:

Expand Down
38 changes: 13 additions & 25 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,62 +1,50 @@
Getting Started
===============

These instructions will have the code running on your local or virtual
machine.

Requirements
------------

You will need the following to have a working copy of this software. See
`installation <#installation-instructions>`__ steps:

1. Python (>=3.7.9)
2. `numpy <https://numpy.org/doc/>`__ (`1.18.0 <https://numpy.org/doc/1.18/>`__)
3. `pandas <https://pandas.pydata.org/>`__ (`0.25.3 <https://pandas.pydata.org/pandas-docs/version/0.25.3/>`__)
1. Python (>=3.8)
2. `numpy <https://numpy.org/doc/>`__ (`1.23.0 <https://numpy.org/doc/1.23/>`__)
3. `pandas <https://pandas.pydata.org/>`__ (`1.4.3 <https://pandas.pydata.org/docs/whatsnew/v1.4.3.html>`__)

Installation Instructions
-------------------------

Python and setting up a ``conda`` environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

First, install a working version of Python (>=3.7.9). We recommend using
the `Anaconda <https://www.anaconda.com/distribution/>`__ package
installer.

After you have Anaconda installed, you will want to create a separate
``conda`` environment and activate it:

::

$ (sudo) conda create -n rsh_themes python=3.7
$ conda activate rsh_themes
You shall follow the same installation instructions
from `ReQUIAM <https://requiam.readthedocs.io/en/latest/getting_started.html>`__

Next, clone this repository into a parent folder:

::

(rsh_themes) $ cd /path/to/parent/folder
(rsh_themes) $ git clone https://github.com/UAL-RE/ReQUIAM_csv.git
(admin1) $ cd /path/to/parent/folder
(admin1) $ git clone https://github.com/UAL-RE/ReQUIAM_csv.git

With the activated ``conda`` environment, you can install with the
``setup.py`` script:

::

(rsh_themes) $ cd /path/to/parent/folder/ReQUIAM_csv
(rsh_themes) $ (sudo) python setup.py develop
(admin1) $ cd /path/to/parent/folder/ReQUIAM_csv
(admin1) $ python setup.py develop

This will automatically installed the required ``numpy`` and ``pandas``
packages.
packages. The versions shall be the same as these of redata-commons and ReQUIAM.

You can confirm installation via ``conda list``

::

(rsh_themes) $ conda list requiam_csv
(admin1) $ conda list requiam_csv

You should see that the version is ``0.12.0``.
You should see that the version is ``0.13.0``.

Configuration Settings
----------------------
Expand All @@ -75,4 +63,4 @@ file called ``dry_run.csv``:

::

(rsh_themes) $ python requiam_csv/script_run
(admin1) $ python requiam_csv/script_run
2 changes: 1 addition & 1 deletion requiam_csv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.13"
__version__ = "0.13.0"

4 changes: 2 additions & 2 deletions requiam_csv/create_csv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os import path
import pandas as pd # Currently using v0.25.3
import numpy as np # Currently using v1.18.0
import pandas as pd # pandas and numpy version can be found via "conda list"
import numpy as np
from urllib.error import URLError

from .inspect_csv import inspect_csv
Expand Down

0 comments on commit 44701cc

Please sign in to comment.