Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a documentation static site #18

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"proseWrap": "always"
}
23 changes: 0 additions & 23 deletions app-frame/docs/index.md

This file was deleted.

17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Macrostrat Python libraries

Welcome to the documentation for the Macrostrat monorepo! This repository
contains various Python libraries developed by the Macrostrat team. These
libraries are designed to provide functionality that can be used across
geoscience software products and applications.

## Libraries

- [`macrostrat.app-frame`](app-frame): A skeleton to scaffold application
control scripts
- [`macrostrat.database`](macrostrat/database.md): Tools to maintain
"database-driven" applications, especially PostgreSQL and PostGIS
- [`macrostrat.dinosaur`](dinosaur): A library for database schema evolution
- [`macrostrat.utils`](utils): A collection of utility functions
- [`macrostrat.package-tools`](package-tools): Tools for managing Python
packages
30 changes: 30 additions & 0 deletions docs/macrostrat/app-frame.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Macrostrat application frame

This is a CLI toolset for managing data and services for a Dockerized
application. It was originally developed for the
[Sparrow](https://sparrow-data.org) application, but it has been generalized for
use with other projects including [Macrostrat](https://macrostrat.org), Mapboard
and other systems.

It is designed to work well with projects managed using Docker Compose, but may
eventually acquire features for managing Kubernetes-based applications.

# Basic usage

```python
app = Application(
"Mapboard",
restart_commands={"gateway": "caddy reload --config /etc/caddy/Caddyfile"},
log_modules=["mapboard.server"],
compose_files=[MAPBOARD_ROOT / "system" / "docker-compose.yaml"],
)
cli = app.control_command()
```

The `cli` is a [Typer](https://typer.tiangolo.com/) application that can be used
to control the system, with abilities to start, stop, and restart services, with
extension points to add new functionality.

## Application

::: macrostrat.app_frame.Application
7 changes: 7 additions & 0 deletions docs/macrostrat/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Macrostrat Database

<!-- prettier-ignore-start -->
## ::: macrostrat.database.Database
options:
show_root_heading: true
<!-- prettier-ignore-end -->
15 changes: 15 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
site_name: Macrostrat Python libraries
theme:
name: "material"
nav:
- Home: "index.md"
- Macrostrat:
- App Frame: "macrostrat/app-frame.md"
- Database: "macrostrat/database.md"
- Dinosaur: "macrostrat/dinosaur.md"
- Package Tools: "macrostrat/package_tools.md"
- Utils: "macrostrat/utils.md"

plugins:
- search
- mkdocstrings
1,443 changes: 1,059 additions & 384 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
authors = ["Daven Quinn <[email protected]>"]
description = "Macrostrat Python libraries"
name = "macrostrat.python_libraries"
version = "1.3.1"
version = "1.4.0"
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
Expand All @@ -20,6 +21,11 @@ requests = "^2.27.1"
rich = "^13"
toml = "^0.10.2"
isort = "^5.13.2"
mkdocs = "^1.5.3"
mkdocs-material = "^9.5.3"
mkdocs-monorepo-plugin = "^1.0.5"
mkdocstrings = {extras = ["python"], version = "^0.24.1"}


[tool.pytest.ini_options]
addopts = "--confcutdir=."
Expand Down
Loading