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
β”‚   β”œβ”€β”€ _version.py               # [core] Automatically generated version from git tags
β”‚   β”œβ”€β”€ config/                   # [core] Configuration files for OG1 format conversion
β”‚   β”‚   β”œβ”€β”€ OG1_global_attrs.yaml # [core] Global attributes for OG1 format
β”‚   β”‚   β”œβ”€β”€ OG1_var_names.yaml    # [core] Variable name mappings
β”‚   β”‚   β”œβ”€β”€ OG1_vocab_attrs.yaml  # [core] Vocabulary attribute mappings
β”‚   β”‚   β”œβ”€β”€ OG1_sensor_attrs.yaml # [core] Sensor attribute definitions
β”‚   β”‚   β”œβ”€β”€ OG1_author.yaml       # [core] Author information template
β”‚   β”‚   └── mission_yaml.yaml     # [core] Mission configuration template
β”‚   β”œβ”€β”€ 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
β”‚   β”œβ”€β”€ old-tools.py              # [core] Legacy functions (deprecated)
β”‚   └── utilities.py              # [core] Helper functions (e.g., file download or parsing)
β”‚
β”œβ”€β”€ tests/                        # [test] Unit tests using pytest
β”‚   β”œβ”€β”€ test_convertOG1.py        # [test] Test functions in convertOG1.py
β”‚   β”œβ”€β”€ test_plotters.py          # [test] Test functions in plotters.py
β”‚   β”œβ”€β”€ 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
β”‚   └── test_vocabularies.py      # [test] Test functions in vocabularies.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] Sample data files for testing and examples
β”‚   β”œβ”€β”€ demo_single_test.nc       # [data] Example data file for basic testing
β”‚   β”œβ”€β”€ sg*.nc                    # [data] Seaglider basestation files for testing
β”‚   └── *.log                     # [data] Log files corresponding to data files 
β”‚
β”œβ”€β”€ .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"
β”‚   β”‚   └── tests.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).

  • Configuration: OG1 format specifications are defined in YAML files in seagliderOG1/config/.

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

  • Docs: Sphinx documentation is in docs/.