Skip to content

Commit 48ed62f

Browse files
authored
Merge pull request #6 from haileyajohnson/docs
add documentation
2 parents 8f805a7 + 1bd96c4 commit 48ed62f

10 files changed

Lines changed: 129 additions & 1 deletion

File tree

docs/dev_guide/contribute.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Contributors guide
2+
- welcome contributions!
3+
- types on contributions
4+
- workflow
5+
6+
## Setting up your git workflow
7+
8+
## Tips & tricks

docs/dev_guide/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Installing CDIPpy for development
2+
This page contains instructions for CDIPpy users interested in customizing or contributiing to the library.
3+
4+
## Download from source
5+
6+
## Install with dev tools
7+
8+
### testing
9+
10+
### linting

docs/examples/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 🚧 **UNDER CONSTRUCTION** 🚧
2+
3+
This section is still being developed.

docs/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CDIPpy
2+
CDIPpy is python library for navigating and accessing products provided by the [Coastal Data Information Program (CDIP)](https://cdip.ucsd.edu/m/about/) at Scripps Institution of Oceanography (SIO). It is a collection of utilities used within CDIP software operations that have useful potential for CDIP end-users as well.
3+
4+
A goal of publishing this library as an open source, contributable package is to foster closer collaboration between CDIP and the coommunity of users.
5+
6+
## Navigating these docs
7+
The CDIP user community spans a brooad expertise and vastly different backgrounds in python development and usage - use the following guidelines to determine where to start in the documentation:
8+
9+
* If you a relatively comfortable working with python, visit the [Quickstart Guide](quickstart.md).
10+
* If you would like more explicit, step by step instructions for:
11+
* Using `cdippy` as an end user: see the [Users Guide](user_guide/index.md)
12+
* Making changes to `cdippy`: see the [Developers Guide](dev_guide/index.md)

docs/quickstart.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Installation
2+
To install CDIPpy locally, you can either
3+
1. clone the repository, navigate to the root directory, and run `pip install .` or
4+
2. without cloning the repositorym, install from github: `pip install git+https://github.com/cdipsw/CDIPpy.git`
5+
6+
🚧 **UNDER CONSTRUCTION** 🚧
7+
8+
*TODO* add test snippet to check installation here
9+
10+
---
11+
12+
## Development
13+
To set up a development copy of CDIPpy, install the project form source using [`uv`](https://docs.astral.sh/uv/):
14+
``` bash
15+
>>> pip install uv
16+
>>> uv venv
17+
>>> source activate .venv/bin/activate
18+
>>> uv pip install -e .[dev]
19+
```
20+
This creates a local, virtual environment at `./.venv`, and installs a version of CDIPpy that is editable (`-e`), along with several additional dev dependencies (`[dev]`).
21+
---
22+
23+
### Testing
24+
This project uses python's built in `unittest` package. To run all tests:
25+
~~~ bash
26+
>>> python -m unittest discover
27+
~~~
28+
To run with [coverage](https://coverage.readthedocs.io/en/7.8.2/):
29+
~~~ bash
30+
>>> coverage run -m unittest discover
31+
~~~
32+
To view the coverage report:
33+
~~~ bash
34+
>>> coverage report
35+
~~~
36+
---
37+
38+
### Contributing
39+
Contributions are welcome and should be merged via pull request on the `main` branch from a forked repository. Before a PR can be merged, it needs to pass the following checks:
40+
41+
* all tests passed
42+
* coverage >= threshhold
43+
* passes [`flake8`](https://flake8.pycqa.org/en/latest/) linter
44+
* there must be at least one reviewer approval
45+
* a CLA must be signed by the contributor, if this is their first commit
46+
47+
If you do not wish you manually check the style for every commit, there is a pre-commit hook that can do it for you. After setting up CDIPpy for development, install the hook with: `pre-commit install`. The installed hook will auto-format the files in your commit with [`black`](https://black.readthedocs.io/en/stable/) and checked for any remaining format errors with `flake8`.

docs/user_guide/data_access.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 🚧 **UNDER CONSTRUCTION** 🚧
2+
3+
This page is still being written.

docs/user_guide/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# CDIPpy end users guide
2+
This page contains instructions for CDIPpy users who just want to navigate, access, and visualize CDIP data products.
3+
4+
## Installation
5+
There are few options for installing `CDIPpy`:
6+
7+
1) Install from PyPI (easiest):
8+
🚧 **UNDER CONSTRUCTION** 🚧
9+
Publishing to PyPI would allow users to install with just `pip install cdippy
10+
11+
2) Install from source (for developing or local control of library):
12+
**Pre-requisite:** [`git`](https://git-scm.com/doc) must be installed
13+
The `cdippy`source code lives [here](https://github.com/cdipsw/CDIPpy).
14+
* Clone the repository: `git clone
15+
16+
3) Install from GitHub (easiest when package is not published)
17+
**Pre-requisite:** [`pip`](https://pip.pypa.io/en/stable/) must be installed
18+
19+
---
20+
21+
## Contained in this library
22+
🚧 **UNDER CONSTRUCTION** 🚧
23+
24+
*TODO* Work on a comprehensive list of tools/features/uses of this library
25+
26+
---

docs/user_guide/plotting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 🚧 **UNDER CONSTRUCTION** 🚧
2+
3+
This page is still being written.

mkdocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
site_name: CDIPpy Docs
2+
theme:
3+
name: readthedocs
4+
5+
nav:
6+
- Home: index.md
7+
- Quick start: quickstart.md
8+
- Users guide:
9+
- Installation: user_guide/index.md
10+
- Data access: user_guide/data_access.md
11+
- Data visualization: user_guide/plotting.md
12+
- Developers guide:
13+
- Installation: dev_guide/index.md
14+
- Contributing: dev_guide/contribute.md
15+
- Examples: examples/index.md

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dev = [
2323
"black",
2424
"coverage",
2525
"flake8",
26-
"pre-commit",
26+
"mkdocs",
27+
"pre-commit"
2728
]
2829

2930
[project.urls]

0 commit comments

Comments
 (0)