Skip to content

Cleanup and add docs#86

Open
ChrisspyB wants to merge 13 commits intodevelopfrom
feature/tidy-and-docs
Open

Cleanup and add docs#86
ChrisspyB wants to merge 13 commits intodevelopfrom
feature/tidy-and-docs

Conversation

@ChrisspyB
Copy link
Copy Markdown
Member

Description

Some long awaited cleanup:

  • More consistent ordering of headers.
  • Removal of unused headers.
  • Change directory structure of source files.
  • All API-related files now exist in a single directory.
  • Add documentation to API files.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

ChrisspyB and others added 6 commits March 19, 2026 16:49
…, pragma once placement

- Remove duplicate GribJumpBase.h include in GribJumpBase.cc
- Reorder includes in Forwarder.cc, Range.cc, gribjump_c.cc, Request.cc
  (system headers first, then third-party, then project headers)
- Move pragma once before includes in GribJumpFactory.h
- Remove redundant GribJumpBase.h include from GribJump.h, add direct
  includes for types actually used (map, PathName, Metrics)
- Fix GribJumpFactory.h to include Config.h directly instead of
  relying on transitive includes through GribJump.h
Move source files from flat layout into api/, core/, config/, plugins/
subdirectories and update all include paths across the codebase.

Directory structure:
- api/: Public API (GribJump, GribJumpBase, GribJumpFactory, gribjump_c,
  ExtractionData, ExtractionItem, ExtractionIterator, Types, GribJumpException)
- core/: Internal engine (Engine, Task, Lister, Forwarder, LocalGribJump,
  URIHelper, GribJumpDataAccessor)
- config/: Configuration (LibGribJump, Config, Metrics, Stats, LogRouter)
- plugins/: FDB plugin

Updated CMakeLists.txt source paths and all #include directives in
src/, tests/, and tools/ to reflect new locations.
- Add full Doxygen blocks to 5 public API headers: GribJump.h,
  GribJumpBase.h, gribjump_c.h, ExtractionData.h, ExtractionItem.h
- Create docs/Doxyfile for HTML API reference generation
- Create docs/examples/simple_extract.cc minimal C++ extraction example
- Create docs/examples/README.md with setup and run instructions
ResultsMap was defined in GribJumpBase.h but used in Engine.h and
Request.h which only included Types.h. Move it to Types.h where all
other type aliases live, resolving the undeclared identifier errors.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.89%. Comparing base (4ba3682) to head (66d95cb).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #86      +/-   ##
===========================================
- Coverage    77.90%   77.89%   -0.01%     
===========================================
  Files           97       97              
  Lines         4920     4923       +3     
  Branches       443      443              
===========================================
+ Hits          3833     3835       +2     
- Misses        1087     1088       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

/// @param s Input stream containing a serialised ExtractionResult.
explicit ExtractionResult(eckit::Stream& s);

/// @brief Copy construction is disabled (move-only type).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of doc is not useful.

/// @param filename File path.
/// @param scheme URI scheme (for example "file").
/// @param offset Byte offset of the target GRIB message.
/// @param host Optional host for remote access.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say host port are optional, but the implementation does not.

#include <algorithm>
#include <cassert>

#include "Range.h"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well update these to use full paths while we're at it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not actually a useful example without FDB archival.

@ChrisspyB ChrisspyB mentioned this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants