What’s in seagliderOG1 project?

πŸ” Project Structure Overview

The overall structure of the seagliderOG1 package is as below.

seagliderOG1/
β”œβ”€β”€ seagliderOG1                  # [core] Main Python package with scientific code
β”‚   β”œβ”€β”€ __init__.py               # [core] Makes this a Python package
β”‚   β”œβ”€β”€ convertOG1.py             # [core] Functions to convert data into OG1 format
β”‚   β”œβ”€β”€ plotters.py               # [core] Functions to plot data
β”‚   β”œβ”€β”€ readers.py                # [core] Functions to read raw data into xarray datasets
β”‚   β”œβ”€β”€ writers.py                # [core] Functions to write data (e.g., to NetCDF)
β”‚   β”œβ”€β”€ tools.py                  # [core] Utilities for unit conversion, calculations, etc.
β”‚   β”œβ”€β”€ vocabularies.py           # [core] Vocabularies for OG1 format & standardisation
β”‚   β”œβ”€β”€ logger.py                 # [core] Structured logging configuration for reproducible runs
β”‚   β”œβ”€β”€ template_project.mplstyle # [core] Default plotting parameters
β”‚   └── utilities.py              # [core] Helper functions (e.g., file download or parsing)
β”‚
β”œβ”€β”€ tests/                        # [test] Unit tests using pytest
β”‚   β”œβ”€β”€ test_readers.py           # [test] Test functions in readers.py
β”‚   β”œβ”€β”€ test_tools.py             # [test] Test functions in tools.py
β”‚   β”œβ”€β”€ test_utilities.py         # [test] Test functions in utilities.py
β”‚   └── ...
β”‚
β”œβ”€β”€ docs/                         # [docs]
β”‚   β”œβ”€β”€ source/                   # [docs] Sphinx documentation source files
β”‚   β”‚   β”œβ”€β”€ conf.py               # [docs] Setup for documentation
β”‚   β”‚   β”œβ”€β”€ index.rst             # [docs] Main page with menus in *.rst
β”‚   β”‚   β”œβ”€β”€ setup.md              # [docs] One of the documentation pages in *.md
β”‚   β”‚   β”œβ”€β”€ project_structure.md  # [docs] This doc, to describe the project structure
β”‚   β”‚   β”œβ”€β”€ seagliderOG1.rst      # [docs] The file to create the API based on docstrings
β”‚   β”‚   β”œβ”€β”€ ...                   # [docs] More *.md or *.rst linked in index.rst
β”‚   β”‚   └── _static               # [docs] Figures
β”‚   β”‚       β”œβ”€β”€ css/custom.css    # [docs, style] Custom style sheet for docs
β”‚   β”‚       └── logo.png          # [docs] logo for top left of docs/
β”‚   └── Makefile                  # [docs] Build the docs
β”‚
β”œβ”€β”€ notebooks/                    # [demo] Example notebooks
β”‚   β”œβ”€β”€ demo.ipynb                # [demo] Also run in docs.yml to appear in docs
β”‚   └── run_dataset.ipynb         # [demo] To run a full dataset through conversion
β”‚
β”œβ”€β”€ data/                         # [data]
β”‚   └── demo_single_test.nc       # [data] Example data file 
β”‚
β”œβ”€β”€ logs/                         # [core] Log output from structured logging
β”‚   └── *.log                     # [core] Log file describing a conversion
β”‚
β”œβ”€β”€ .github/                      # [ci] GitHub-specific workflows (e.g., Actions)
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   β”œβ”€β”€ docs.yml              # [ci] Test build documents on *pull-request*
β”‚   β”‚   β”œβ”€β”€ docs_deploy.yml       # [ci] Build and deploy documents on "merge"
β”‚   β”‚   β”œβ”€β”€ pypi.yml              # [ci] Package and release on GitHub.com "release"
β”‚   β”‚   └── test.yml              # [ci] Run pytest on tests/test_<name>.py on *pull-request*
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE.md         # [ci, meta] Template for issues on Github
β”‚   └── PULL_REQUEST_TEMPLATE.md  # [ci, meta] Template for pull requests on Github
β”‚
β”œβ”€β”€ .gitignore                    # [meta] Exclude build files, logs, data, etc.
β”œβ”€β”€ requirements.txt              # [meta] Pip requirements
β”œβ”€β”€ requirements-dev.txt          # [meta] Pip requirements for development (docs, tests, linting)
β”œβ”€β”€ .pre-commit-config.yaml       # [style] Instructions for pre-commits to run (linting)
β”œβ”€β”€ pyproject.toml                # [ci, meta, style] Build system and config linters
β”œβ”€β”€ CITATION.cff                  # [meta] So Github can populate the "cite" button
β”œβ”€β”€ README.md                     # [meta] Project overview and getting started
└── LICENSE                       # [meta] Open source license (e.g., MIT as default)

The tags above give an indication of what parts of this project are used for what purposes, where:

  • # [core] – Scientific core logic or core functions used across the project.

  • # [docs] – Documentation sources, configs, and assets for building project docs.

  • # [test] – Automated tests for validating functionality.

  • # [demo] – Notebooks and minimal working examples for demos or tutorials.

  • # [data] – Sample or test data files.

  • # [ci] – Continuous integration setup (GitHub Actions).

  • # [style] – Configuration for code style, linting, and formatting.

  • # [meta] – Project metadata (e.g., citation info, license, README).

Note: If you run this locally, there may also be files that you could generate but which don’t necessarily appear in the project on GitHub.com (due to being ignored by your .gitignore). These may include your environment (venv/, if you use pip and virtual environments), distribution files dist/ for building packages to deploy on http://pypi.org, htmlcov/ for coverage reports for tests, seagliderOG1.egg-info for editable installs (e.g., pip install -e .).

πŸ’‘ Notes

  • Modularity: Code is split by function (reading, writing, tools).

  • Logging: All major functions support structured logging to logs/.

  • Tests: Pytest-compatible tests are in tests/, with one file per module.

  • Docs: Sphinx documentation is in docs/.