html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/4345#issuecomment-674589019,https://api.github.com/repos/pydata/xarray/issues/4345,674589019,MDEyOklzc3VlQ29tbWVudDY3NDU4OTAxOQ==,5635139,2020-08-16T23:02:14Z,2020-08-18T19:57:11Z,MEMBER,"Maybe we keep it focused on one issue, but another oddity — JupyterLab seems to list the signature as `xr.Dataset(*args, **kwds)`, but the signature is explicit: https://github.com/pydata/xarray/blob/v0.16.0/xarray/core/dataset.py#L468-L475","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-675234132,https://api.github.com/repos/pydata/xarray/issues/4345,675234132,MDEyOklzc3VlQ29tbWVudDY3NTIzNDEzMg==,1217238,2020-08-18T03:54:57Z,2020-08-18T03:54:57Z,MEMBER,"I don't think it's unusual to document constructor parameters on `__init__`. For example, that's the recommendation of the Google Python style-guide, followed by most Google Python projects (e.g., TensorFlow). So I think Spyder would be improved by documenting `__init__`, too. That said, I don't have any principled reason for deviating from the NumPy docstring standards here. I also agree that the `Dataset` constructor would be improved by adding usage examples of how to create a Dataset.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674588981,https://api.github.com/repos/pydata/xarray/issues/4345,674588981,MDEyOklzc3VlQ29tbWVudDY3NDU4ODk4MQ==,5635139,2020-08-16T23:01:55Z,2020-08-16T23:01:55Z,MEMBER,"Thanks @keewis , good spot. That looks right @Illviljan , so unless there's other information, it looks like we should move it to the class. Is there any reason to keep it on the `__init__`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674583004,https://api.github.com/repos/pydata/xarray/issues/4345,674583004,MDEyOklzc3VlQ29tbWVudDY3NDU4MzAwNA==,14371165,2020-08-16T21:57:36Z,2020-08-16T22:02:34Z,MEMBER,"Creating a decorator for this sounds a bit too fancy compared to just moving the init docstring to the class docstring in my opinion. Is xarray following the numpy docstring guidelines? Reading up on the numpy guidelines they recommend that the constructor (__init__) should be documented at the class docstring. https://numpydoc.readthedocs.io/en/latest/format.html#class-docstring And after looking around some more the modules that prefers having init parameters at the class docstring are: * numpy - https://github.com/numpy/numpy/blob/master/numpy/core/records.py#L98 * scipy - https://github.com/scipy/scipy/blob/v1.5.2/scipy/interpolate/interpolate.py * pandas - https://github.com/pandas-dev/pandas/blob/v1.1.0/pandas/core/frame.py#L339-L9257 * dask - https://github.com/dask/dask/blob/master/dask/blockwise.py#L135","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674576523,https://api.github.com/repos/pydata/xarray/issues/4345,674576523,MDEyOklzc3VlQ29tbWVudDY3NDU3NjUyMw==,14808389,2020-08-16T20:53:44Z,2020-08-16T20:53:44Z,MEMBER,"`python -m pydoc xarray.Dataset` displays `__doc__` and then all methods / attributes / properties and their `__doc__`, so that's not a problem there. As @Illviljan pointed out, `ipython` / `jupyter` display the docstring of `Dataset.__init__` as a special `Init docstring` section. So I guess this is a ""bug"" in spyder (and maybe also other IDEs?), but we could work around that using a decorator.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674575204,https://api.github.com/repos/pydata/xarray/issues/4345,674575204,MDEyOklzc3VlQ29tbWVudDY3NDU3NTIwNA==,14371165,2020-08-16T20:40:16Z,2020-08-16T20:40:16Z,MEMBER,"My opinion is that it is a general issue but maybe that's because I prefer Spyder? Jupyterlab is the other IDE I know that has this functionality it seems to print class and init information. Are there any others? Checking `pd.DataFrame()` in JupyterLab: ![image](https://user-images.githubusercontent.com/14371165/90343218-9c05a100-e00e-11ea-8ec2-fc6db19065f5.png) Checking `xr.Dataset()` in JupyterLab: ![image](https://user-images.githubusercontent.com/14371165/90343240-d96a2e80-e00e-11ea-911b-49b1a2a80e9b.png) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674557633,https://api.github.com/repos/pydata/xarray/issues/4345,674557633,MDEyOklzc3VlQ29tbWVudDY3NDU1NzYzMw==,5635139,2020-08-16T18:01:48Z,2020-08-16T18:01:48Z,MEMBER,Any idea whether this is a Spyder issue only or more general?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674491988,https://api.github.com/repos/pydata/xarray/issues/4345,674491988,MDEyOklzc3VlQ29tbWVudDY3NDQ5MTk4OA==,14371165,2020-08-16T07:30:14Z,2020-08-16T07:30:14Z,MEMBER,"Yeah, I've read the same thing that either `__init__` or the class can be used. I liked adding it in `__init__` too when I've developed classes because it's consistent with other functions and methods. But now that I'm on the **user side** I think the class docstring is the way to go. Pandas and scipy seems to be pretty consistent with this as well: * Series - https://github.com/pandas-dev/pandas/blob/v1.1.0/pandas/core/series.py#L139-L4979 * Interpolate- https://github.com/scipy/scipy/blob/v1.5.2/scipy/interpolate/interpolate.py The Spyder help pane simply reads `xr.Dataset.__doc__` and it would correctly read the `__init__` doc if I I typed out `xr.Dataset.__init__` too, but which users prefers to do that? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175 https://github.com/pydata/xarray/issues/4345#issuecomment-674453249,https://api.github.com/repos/pydata/xarray/issues/4345,674453249,MDEyOklzc3VlQ29tbWVudDY3NDQ1MzI0OQ==,5635139,2020-08-15T22:28:18Z,2020-08-15T22:28:18Z,MEMBER,"Thanks for the feedback; I agree there's more to initializing a Dataset than a DataFrame, and we should make the docs as accessible as possible. In this specific case, is this a Spyder issue only or more general? IIUC using the `__init__` or the class are both standard for the class docstring","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,679575175