docs: fix usage docs - Config as single interface, remove StreamConfi…#195
docs: fix usage docs - Config as single interface, remove StreamConfi…#195ModaHarsh wants to merge 3 commits into
Conversation
|
@kwilcox Thank you for taking the time to look at this PR. I’d be grateful for any feedback. I’d also love to contribute more to ioos_qc when I can. If there are ever small issues or tasks where a contributor could be useful—docs, tests, or code—I’d be happy to learn and help where it’s helpful. |
martaw22
left a comment
There was a problem hiding this comment.
I looked over these changes and they seem correct to me. I asked for one small update to the wording. Note that PR #100 removed references to StreamConfig from the code, and this cleans up some of the remaining old references in the Usage doc.
| The highest level and most flexible configuration object is a ``Config``. Use ``Config`` for all configuration loading (single stream, multiple contexts, files, or in-memory dicts). It can describe quality control configurations for any number of regions, windows and streams. | ||
|
|
||
| .. note:: | ||
| If you are looking for ``StreamConfig``: that class does not exist. Use ``Config`` for all configuration loading (e.g. ``from ioos_qc.config import Config``). |
There was a problem hiding this comment.
Can you change the wording of this sentence to read:
If you are looking for StreamConfig: that class has been deprecated.
or something along those lines
Fixes #99
Summary
Updates the usage documentation so it matches the current API and resolves the issue where the docs suggested importing
StreamConfigfromioos_qc.config, which does not exist. The correct interface for loading any config isConfig.Changes
Single interface: At the start of the Configurations section, the docs now state that
from ioos_qc.config import Configis the only interface needed to load any QC configuration (single-stream, multi-context, YAML, JSON, dict, netCDF, etc.), with a short code example.StreamConfig: Added a
.. _streamconfig:anchor so existing links tousage.html#streamconfigstill work. Added a note that theStreamConfigclass does not exist and that users should useConfiginstead.Results section: Replaced the incorrect reference to
StreamConfigResult(no such class inioos_qc.results) withContextResult, which is what Streams yield when run with aConfig.ConfigGeneration section: Updated wording so that
QcConfigCreatoris described as generating a config for use withConfig(notQcConfig), and the section "Create config for QcConfig" is now "Create config for Config" with wording that the generated config is used withConfig(e.g.c = Config(config)).Rationale
Per moderator feedback: "The docs need to be updated, the only interface you need to load any config object is the Config class: from ioos_qc.config import Config". This PR aligns the docs with that and removes references to the non-existent
StreamConfigand the outdated recommendation to useQcConfigfor loading configs.