Skip to content

Commit 843b654

Browse files
update docs (#7)
1 parent 48ed62f commit 843b654

10 files changed

Lines changed: 34 additions & 66 deletions

File tree

README.md

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,5 @@
11
# CDIPpy
22
A python library for navigating and accessing CDIP products.
33

4-
## In this package
5-
_List of functions, WIP_
6-
* data access
7-
*
8-
9-
## Installation
10-
To install CDIPpy locally, you can either
11-
1. clone the repository, navigate to the root directory, and run `pip install .` or
12-
2. without cloning the repositorym, install from github: `pip install git+https://github.com/cdipsw/CDIPpy.git`
13-
14-
15-
## Usage
16-
_Directions for use, WIP_
17-
18-
## Development
19-
To set up a development copy of CDIPpy, install the project form source using `uv`:
20-
``` bash
21-
pip install uv
22-
uv venv
23-
source activate .venv/bin/activate
24-
uv pip install -e .[dev]
25-
```
26-
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]`).
27-
28-
### Testing
29-
This project uses python's built in `unittest` package. To run all tests:
30-
~~~bash
31-
python -m unittest discover
32-
~~~
33-
To run with coverage:
34-
~~~bash
35-
coverage run -m unittest discover
36-
~~~
37-
To view the coverage report:
38-
~~~bash
39-
coverage report
40-
~~~
41-
42-
### Contributing
43-
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:
44-
45-
* all tests passed
46-
* coverage >= 90%
47-
* passes `flake8` linter
48-
* there must be at least one reviewer approval
49-
* a CLA must be signed by the contributor, if this is their first commit
50-
51-
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` and check for any remaining format errors with `flake8`.
4+
## Quick Start
5+
See the docs @ [https://cdipsw.github.io/CDIPpy/quickstart/](https://cdipsw.github.io/CDIPpy/quickstart/)

docs/examples/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# 🚧 **UNDER CONSTRUCTION** 🚧
21

3-
This section is still being developed.
2+
{{ under_construction("This section is still being developed.") }}

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CDIPpy
22
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.
33

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.
4+
A goal of publishing this library as an open source, contributable package is to foster closer collaboration between CDIP and the community of users.
55

66
## Navigating these docs
77
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:

docs/quickstart.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
## Installation
22
To install CDIPpy locally, you can either
33
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`
4+
2. without cloning the repository, install from github:
5+
*https: `pip install git+https://github.com/cdipsw/CDIPpy.git`*
6+
*ssh: `pip install git+ssh://github.com/cdipsw/CDIPpy.git`*
57

6-
🚧 **UNDER CONSTRUCTION** 🚧
7-
8-
*TODO* add test snippet to check installation here
8+
{{ under_construction("add test snippet to check installation here") }}
99

1010
---
1111

12-
## Development
12+
## Development
1313
To set up a development copy of CDIPpy, install the project form source using [`uv`](https://docs.astral.sh/uv/):
1414
``` bash
1515
>>> pip install uv
1616
>>> uv venv
1717
>>> source activate .venv/bin/activate
1818
>>> uv pip install -e .[dev]
1919
```
20+
2021
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-
---
2222

23+
---
2324
### Testing
2425
This project uses python's built in `unittest` package. To run all tests:
2526
~~~ bash

docs/user_guide/data_access.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# 🚧 **UNDER CONSTRUCTION** 🚧
2-
3-
This page is still being written.
1+
{{ under_construction("This page is still being developed.") }}

docs/user_guide/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This page contains instructions for CDIPpy users who just want to navigate, acce
55
There are few options for installing `CDIPpy`:
66

77
1) Install from PyPI (easiest):
8-
🚧 **UNDER CONSTRUCTION** 🚧
9-
Publishing to PyPI would allow users to install with just `pip install cdippy
8+
{{ under_construction("TODO: Publishing to PyPI would allow users to install with just `pip install cdippy`") }}
9+
1010

1111
2) Install from source (for developing or local control of library):
1212
**Pre-requisite:** [`git`](https://git-scm.com/doc) must be installed
@@ -19,7 +19,7 @@ Publishing to PyPI would allow users to install with just `pip install cdippy
1919
---
2020

2121
## Contained in this library
22-
🚧 **UNDER CONSTRUCTION** 🚧
22+
{{ under_construction("This section is still being developed.") }}
2323

2424
*TODO* Work on a comprehensive list of tools/features/uses of this library
2525

docs/user_guide/plotting.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# 🚧 **UNDER CONSTRUCTION** 🚧
2-
3-
This page is still being written.
1+
{{ under_construction("This page is still being written.") }}

main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def define_env(env):
2+
@env.macro
3+
def under_construction(message="This section is under construction."):
4+
return f"""
5+
<div style="border-radius:6px; overflow:hidden; margin:1em 0; font-family:inherit; box-shadow:0 1px 3px rgba(0,0,0,0.1);">
6+
<div style="background-color:#FFA500; color:black; padding:10px 12px; font-weight:bold; font-size:1.1em;">
7+
🚧 <strong>UNDER CONSTRUCTION</strong> 🚧
8+
</div>
9+
<div style="background-color:rgba(255, 165, 0, 0.15); color:black; padding:10px 12px;">
10+
{message}
11+
</div>
12+
</div>
13+
"""

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
site_name: CDIPpy Docs
2+
3+
plugins:
4+
- macros
5+
26
theme:
37
name: readthedocs
48

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dev = [
2424
"coverage",
2525
"flake8",
2626
"mkdocs",
27+
"mkdocs-macros-plugin",
2728
"pre-commit"
2829
]
2930

0 commit comments

Comments
 (0)