Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add more docstrings with some renaming #712

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/usr/bin/env python3

# flake8: noqa
# pylint: skip-file
import logging
import os
import sys
from pathlib import Path

from datetime import date

import fmu.dataio
Expand All @@ -15,6 +12,19 @@
sys.path.insert(1, os.path.abspath("../ext"))


class PydanticAutodocFilter(logging.Filter):
"""A logging filter to suppress warnings about duplicate object descriptions when
generating Pydantic model documentation. These warnings are a result of generating a
new nested model document wherever one occurs, even if this Pydantic model is used
in multiple places."""

def filter(self, record: logging.LogRecord) -> bool:
return "duplicate object description" not in record.getMessage()


logging.getLogger("sphinx").addFilter(PydanticAutodocFilter())


# -- General configuration ---------------------------------------------

# The full version, including alpha/beta/rc tags.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/datamodel/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ documentation of these two models can be inspected from here.
.. toctree::
:maxdepth: -1

fmu.dataio.datastructure.meta.meta.FMUDataClassMeta
fmu.dataio.datastructure.meta.meta.FMUCaseClassMeta
~fmu.dataio.datastructure.meta.meta.ObjectMetadata
~fmu.dataio.datastructure.meta.meta.CaseMetadata


About the data model
Expand Down
Loading