Open michaelweinold opened 1 year ago
During investigation of https://github.com/brightway-lca/brightway-documentation/issues/111 I found that Sphinx currently throws a number of warnings related to the use of the :ref: role in the Python function docstrings. Some examples:
:ref:
api/bw2data/backends/single_file/proxies/index.rst:73: WARNING: undefined label: 'activity' api/bw2data/data_store/index.rst:27: WARNING: undefined label: 'serialized-dict' api/bw2data/data_store/index.rst:134: WARNING: undefined label: 'mapping' api/bw2data/data_store/index.rst:134: WARNING: undefined label: 'geomapping' api/bw2data/data_store/index.rst:140: WARNING: undefined label: 'processing-data'
I investigated two cases:
geomapping
The :ref: that throws the error is used in
class ProcessedDataStore in bw2data/data_store.py:
class ProcessedDataStore
bw2data/data_store.py
This method takes the entire dataset, and loads objects to :ref:`mapping` or :ref:`geomapping` as needed.
aliased at
bw2data/meta.py:
bw2data/meta.py
geomapping = GeoMapping()
and originally defined as class GeoMapping() in bw2data/meta.py.
class GeoMapping()
In this case: We should investigate if/how Sphinx can work with aliases of this nature (this is actually related to the larger discussion here: https://github.com/brightway-lca/brightway-documentation/discussions/83#discussioncomment-5914938).
serialized-dict
class DataStore in bw2data/data_store.py:
class DataStore
* **metadata**: A :ref:`serialized-dict` instance, e.g. ``databases`` or ``methods``.
and originally defined as class SerializedDict() in bw2data/serialization.py.
class SerializedDict()
bw2data/serialization.py
In this case: Since serialized-dict is used only once in bw2data and only in a docstring, it seems that it was never aliased to SerializedDict.
bw2data
SerializedDict
We should clear this up because:
linkcheck
...@cmutel, this could be a job for @Cerebrovinny later this year - let's discuss this at/around Brightcon.
During investigation of https://github.com/brightway-lca/brightway-documentation/issues/111 I found that Sphinx currently throws a number of warnings related to the use of the
:ref:
role in the Python function docstrings. Some examples:I investigated two cases:
geomapping
The
:ref:
that throws the error is used inclass ProcessedDataStore
inbw2data/data_store.py
:aliased at
bw2data/meta.py
:and originally defined as
class GeoMapping()
inbw2data/meta.py
.In this case: We should investigate if/how Sphinx can work with aliases of this nature (this is actually related to the larger discussion here: https://github.com/brightway-lca/brightway-documentation/discussions/83#discussioncomment-5914938).
serialized-dict
The
:ref:
that throws the error is used inclass DataStore
inbw2data/data_store.py
:and originally defined as
class SerializedDict()
inbw2data/serialization.py
.In this case: Since
serialized-dict
is used only once inbw2data
and only in a docstring, it seems that it was never aliased toSerializedDict
.We should clear this up because:
:ref:
use.:ref:
use, since this would likely disallow for the planned use of thelinkcheck
builder: https://github.com/brightway-lca/brightway-documentation/issues/95:ref:
is limited in scope.