Finding documentation and function descriptions

A problem I often face while trying to learn about new packages is finding the documentation, detailed list and description of functions etc. Often we search how to perform a certain task in Julia and our search leads us to a github page. Take for example the Distances.jl package here. This page explains the usage of only a very few of the functions in this package. However, I could not find the word “documentaion” anywhere in the page. Could you tell me how to find the documentation in these cases ? For example, I am trying to find the squared distance function this package claims to have.

Quite simply, some packages have much better or sometimes just bigger documentation than others.

If the doc is lacking or minimal, sometimes it’s useful to look at the source, and particularly the test files will often show how the authors expected it to be used.

The documentation for that particular package is on the page you linked to, but it’s just one flat file which you can see by scrolling down (README.md). Searching for squared will give relevant hits.

Perhaps you might want something like this:

julia> using Distances
julia> evaluate(SqEuclidean(),[1 2 3], [3 4 5])
12
2 Likes

In at least one case, the tests are the documentation.

3 Likes

Thank you. So readme.md is the file to look for.

Additionally, once you invest the time to study the package and answer your questions about usage, please consider contributing to the docs. It takes very little time (you can just edit the README in Github) and makes a huge difference for both users and maintainers.

3 Likes

Absolutely