"bySubject URL" used in the help for "dataLocation"
Before we can start
Before moving on, please check some things first:
- [x] Your issue may already be reported! Please search on the issue tracker before creating one.
Nothing found with "bySubject"
- [x] Is this something you can debug and fix? Send a pull request! For more information, see the Contributor Guide.
Would take me some time setting up as it would be a first contribution
- [x] We as maintainers foster an open and welcoming environment. Be respectfull, supportive and nice to each other! :)
Prerequisites
- [x] Are you running the expected version of pyDataverse? (check via
pip freeze).
pyDataverse==0.3.3
Bug report
In the get_datasets_by_data_location documentation, the URL used is wrongly copy-pasted from get_datasets_by_subject https://github.com/gdcc/pyDataverse/blob/3b6fe063dfc73d6fa3aa674cc02313504c40204f/pyDataverse/api.py#L708C1-L722C6
To write a bug report, we have defined a small, helpful workflow, to keep communication effective.
1. Describe your environment
- [x] OS: Fedora Linux 40 64bit
- [x] pyDataverse: 0.3.3
- [x] Python: 3.12.4
- [x] Dataverse: not relevant here
2. Actual behaviour:
help(MetricsApi) returns
[...]
get_datasets_by_data_location(self, data_location, auth=False)
GET https://$server/api/info/metrics/datasets/bySubject
$type can be set to dataverses, datasets, files or downloads.
[...]
3. Expected behaviour:
URL in the GET should be the one used in the function https://$SERVER/api/info/metrics/datasets/?dataLocation
But to be fair, it even feels a bit weird that a parameter like this would be put as a separate function as an endpoint like bySubject
4. Steps to reproduce
- run
help(MetricsApi) - check help for function get_datasets_by_data_location
5. Possible solution
Update the function documentation with the correct URL.
Improvement suggestion : list and explain the possible values for dataLocation (local data, remote data (e.g. harvested), or all)