Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set up documentation using Documenter.jl #4

Merged
merged 3 commits into from May 23, 2021
Merged

Conversation

fzierler
Copy link
Collaborator

This sets up the file structure for automatically creating docs using Documenter.jl. As an example I have added docs for the autocorrelation functions. To create docs locally make sure that Documenter.jl is added to your global environment (the same environment as e.g. Revise) and run the docs/make.jl file. The documentation can then be found at docs/build/index.html

Returns autocorrelation function for a distance of lag, i.e. between values of
```x[t]``` and ```x[t+lag]```. The autocorrelation function is normalized such
that ```autocor(x,0) = 1```. This is equvivalent to the quantity
``\\Gamma_X(t)`` of equation (4.61) in Gattringer/Lang.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better citation of the book would be nice.
Is there anything in documenter.jl to have something like a "Reference"-section with Bibliography to link to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that there is a dedicated plug-in package for this DocumenterCitations.jl . I had to modify the standard .bib entries generated by inspire for it to work and the bibliography style cannot be customized (yet) (see ali-ramadhan/DocumenterCitations.jl#22 ) but this should do it for now.

# Autocorrelation for a specifig lag
function autocor(x::AbstractVector, lag::Integer)
"""
autocor(x,lag)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason I miss for calling it lag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the same name that is being used in StatsBase.jl - we could call it something else. Calling it time or t could be misleading but maybe something like steps or timesteps?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay yes makes sense to stick to something that has already been around for some time.

@briederer briederer added the documentation Improvements or additions to documentation label May 23, 2021
@briederer
Copy link
Owner

I am fine with merging for now.
Thoug I still would suggest to use a separate Project.toml for the docs folder to keep src clear (see for instance PlotDocs.jl)

@fzierler
Copy link
Collaborator Author

I have added a separate Project.toml file. I don't know if CompatHelper will work for this? I am also happy with merging this for now.

@briederer
Copy link
Owner

Good question.
Seems like all the julia projects I saw which use these kind of separation don't have any [compat] sections at all in the docs/Project.toml.
Will open an issue for further discussion and merge the branch.

@briederer briederer mentioned this pull request May 23, 2021
5 tasks
@briederer briederer merged commit d497e43 into master May 23, 2021
@fzierler fzierler deleted the documentationFZ branch May 23, 2021 20:37
fzierler added a commit that referenced this pull request May 24, 2021
Enable citations in docs using DocumenterCitations.jl

add separate Project.toml file for docs
briederer pushed a commit that referenced this pull request May 25, 2021
  + Enable citations in docs using DocumenterCitations.jl

  + add separate Project.toml file for docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants