SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

Documentation macros/substitutions #227

Open awig opened 5 years ago

awig commented 5 years ago

I don't know about you guys but I get tired of typing out solarforecastarbiter.metrics.preprocessing.my_new_function and it is also more error prone and harder to read.

I'd like to consider we use substitutions/macros by creating a subs.hrst or macros.hrst file.

For instance,

.. |ForecastObservation| replace:: :class:`solarforecastarbiter.datamodel.ForecastObservation`

# somewhere else in the codebase...
def new_func(fxobs):
  """
  ...
  Parameters
  -----------
  fxobs : |ForecastObservation|
  """
...

Reference: https://sublime-and-sphinx-guide.readthedocs.io/en/latest/reuse.html

Let me know if you like the idea and I can take a crack at it sometime.

wholmgren commented 5 years ago

Cool, I didn't know about those features.