No documentation available about the expected type of the arguments
Closed this issue · 9 comments
The methods of the metrics
library should be documented with the type of parameters it expects. This is what we have in the code:
def __init__(self, es_url, es_index, start=None, end=None, esfilters={},
interval=None, offset=None):
"""es connection and filter to be used"""
self.es_url = es_url
..
If we go to the help offered by the module, we just get this:
| ----------------------------------------------------------------------
| Methods inherited from manuscripts.metrics.metrics.Metrics:
|
| __init__(self, es_url, es_index, start=None, end=None, esfilters={}, interval=None, offset=None)
| es connection and filter to be used
|
| get_agg(self)
| Returns an aggregated value
|
| get_definition(self)
|
| get_list(self)
|
| get_metrics_data(self, query)
| Get the metrics data from ES
Good point, @sanacl.
@aswanipranjal what do you think about taking care of this? Maybe it could be a good way of improving your understanding of the internals of Manuscripts...
Yes @jgbarah I'll get started on this. Although, a lot of the libraries and functions in manuscript need docstrings and implementation details.
I'll start with the files in the metrics folder.
@jgbarah @aswanipranjal @sanacl I will try yo help in this process of documenting all. Until now, manuscripts was an evolutionary prototype and we don't care enough the documentation and testing. It is time to fix that, yes!
@aswanipranjal I plan to work on docstrings right now. I hope you have not invested time yet. I will send a PR. I have implemented most of the methods, so documenting them should be something direct to do. We can improve it in new iterations.
@acs I am still in the process of experimenting with the methods for the Notebooks. Go right ahead!!!
Just a quick note: to use pydoc inside a venv
python -m pydoc manuscripts.metrics.gerrit
pretty useful to check that all look like it should be.
Most of the work done in: #54
Pending to review: esquery.py
. config.py
is just a copy of this file from mordred so the docstrings must be fixed there and then copy this file here another time. Once I have finished I will ask you to PR review!
All work done in #54. Just pending the review from you guys: @jgbarah @aswanipranjal @sanacl .
All done! Closing this ticket!