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/
.