-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from ethanwhite/add-docs
Add package documentation
- Loading branch information
Showing
10 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.10" | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
|
||
sphinx: | ||
configuration: docs/conf.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
import os | ||
import sys | ||
|
||
# -- Add current path to PATH for autodoc | ||
|
||
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) | ||
sys.path.insert(0, os.path.join(curr_path, '..')) | ||
sys.path.insert(0, os.path.abspath('..')) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'offlinedatasci' | ||
copyright = '2023, Virnaliz Cruz, Abhishek Dasgupta, Colin Sauze, Jannetta Steyn, Ethan P. White' | ||
author = 'Virnaliz Cruz, Abhishek Dasgupta, Colin Sauze, Jannetta Steyn, Ethan P. White' | ||
release = 'v0.2.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = ['myst_parser', | ||
'sphinx.ext.autodoc'] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'furo' | ||
html_static_path = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Getting started | ||
|
||
## Command line interface | ||
|
||
### Installing everything | ||
|
||
If you want to download and configure everything use `install all` and pass it the location store files: | ||
|
||
```sh | ||
offlinedatasci install all \<path\> | ||
``` | ||
|
||
### Installing individual components | ||
|
||
You can download and configure the different components separately: | ||
|
||
* Python: `offlinedatasci install python \<path\>` | ||
* Python packages: `offlinedatasci install python_libraries \<path\>` | ||
* R: `offlinedatasci install r \<path\>` | ||
* RStudio: `offlinedatasci install rstudio \<path\>` | ||
* R packages: `offlinedatasci install minicran \<path\>` | ||
* Lessons: `offlinedatasci install lessons \<path\>` | ||
|
||
### Managing R and Python packages | ||
|
||
By default offlinedatasci creates local package mirrors of the most common data science packages. | ||
You can add additional packages yourself using `add-packages`, then language `r` or `python`, and the name of the packages to install: | ||
|
||
```sh | ||
offlinedatasci add-packages r package1 package2 ... \<path\>` | ||
``` | ||
|
||
```sh | ||
offlinedatasci add-packages python package1 package2 ... \<path\>` | ||
``` | ||
|
||
## Python interface | ||
|
||
Coming soon! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. offlinedatasci documentation master file, created by | ||
sphinx-quickstart on Sat Nov 18 22:08:21 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to offlinedatasci's documentation! | ||
========================================== | ||
|
||
offlinedatsci is a tool for supporting teaching and doing data science in internet-limited environments. | ||
It helps you download and configure common tools for teaching and doing data science without an internet connection. | ||
This includes: | ||
|
||
* Installers for data science languages: Currently R and Python | ||
* Installers for common data science IDEs: Currently RStudio | ||
* Partial, data science focused, local mirrors of package repositories: Currently CRAN (for R) and PyPI (for Python) | ||
* Locally browseable clones of data science teaching websites: Currently Data Carpentry, Software Carpentry, and Library Carpentry | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
installation | ||
getting-started | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Installation | ||
|
||
## Basic installation | ||
|
||
offlinedatasci is available for Python >=3.6 and can be installed using `pip`: | ||
|
||
``` | ||
pip install DeepForest | ||
``` | ||
|
||
## External dependencies | ||
|
||
offlinedatasci relies on two external dependencies: | ||
|
||
1. R - for for creating the partial CRAN mirror to deliver R packages | ||
2. wget - for downloading lesson material | ||
|
||
### wget | ||
|
||
#### Linux | ||
|
||
wget is available by default on almost all Linux distributions. | ||
|
||
#### macOS | ||
|
||
The easiest to install wget on macOS is using homebrew: | ||
|
||
``` | ||
brew install wget | ||
``` | ||
|
||
If you are using conda for Python environment management you can also install it using `conda`/`mamba`: | ||
|
||
``` | ||
conda install wget | ||
``` | ||
|
||
or | ||
|
||
``` | ||
mamba install wget | ||
``` | ||
|
||
#### Windows | ||
|
||
Download the appropriate wget executable from https://eternallybored.org/misc/wget/ and place it on your PATH. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sphinx==7.2.6 | ||
furo==2023.09.10 | ||
myst_parser==2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
offlinedatasci | ||
============== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
offlinedatasci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
offlinedatasci package | ||
====================== | ||
|
||
Submodules | ||
---------- | ||
|
||
offlinedatasci.cli module | ||
------------------------- | ||
|
||
.. automodule:: offlinedatasci.cli | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
offlinedatasci.main module | ||
-------------------------- | ||
|
||
.. automodule:: offlinedatasci.main | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: offlinedatasci | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |