-
Notifications
You must be signed in to change notification settings - Fork 20
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
Documentation created automatically #36
Documentation created automatically #36
Conversation
If we're going to keep generating this documentation automatically, I'm wondering if we should store it in a separate file. I believe there's a way to attach a docstring to a function defined elsewhere. I'm not insisting, but it looks like most of the file is taken up by the docstrings now, which makes it harder to navigate. What do you think? |
I tried to do that when using the man pages using something from the documentation but it didn't work. I will have time tomorrow and will test it again. |
I could only use Docile's external file when also using Lexicon, and I could only make it work on 0.4. |
What I had in mind is something like this (from the link you gave): """
Method ``f(::Any)``.
"""
f(x) = x
"""
Function ``f`` after definition.
"""
f The definition of |
That worked, but 0.3 has the limitation of not showing in the REPL. Should I add a conditional |
Is there a way to require it only for 0.3? |
From what I (didn't) found, it looks like there isn't. Someone asked a similar question on julia-users and the sole answer was negative. I also looked at other packages using Docile and no one did it. |
I propose that we not require |
Agreed |
I will destroy some commits in this |
0366db5
to
df6f73e
Compare
Commits squashed. |
Thanks! Will it also be possible to document the specialized interface? If the documentation is stored in a different file, I'm not sure how that works?! |
I believe it's possible too, I'll just create another file with the documentation for the specialized, but it may take a little more time because of all the variations in the interface. |
d79b922
to
bed166a
Compare
I noticed, running the script again in other computer, that the terminal size was interfering with the manual pages size, regardless of being called inside the script. So I fixed by setting the man width size to a large value. This also removes hyphenation and justification. |
With the last commit, both documentations are created. |
060a356
to
db4e635
Compare
I was gonna use |
Let's use plain docstrings everywhere. They work on 0.3 with Docile, and natively on 0.4. |
That's what I did. It's on file |
Well actually, maybe I'm wrong about that. I can't get any documentation to show in 0.3. Can you? |
Sorry that's not true. I get the docstrings from the Julia interface, but that's all. So defining the docstring elsewhere doesn't work in 0.3 at all, is that right? |
You're right, the documentation is not working with 0.3. In fact I needed Docile and Lexicon and to use To fix we need to return to |
Let's wait until 0.4 I think. I like the way you've set things up. |
Any chance that you could rebase? |
The documentation is in a separated file called `core_documentation.jl`. This documentation was generated automatically, so it is limited. It shows the function call, an excerpt of the man page (the DESCRIPTION), and the type of each variable. Then, it refers the user to the man page.
Inside the script, generating the interface, we need to set MANWIDTH so that different terminals create the same documentation. We set the MANWIDTH to a very large value so that hyphenation and justification between words are also removed because they made the documentation look bad. Note: We tried using `--nh` and `--nj` but the "less than" symbols were being not being processed, so this was the workaround.
Change the document name and put all documentation in a single docstring.
db4e635
to
4adc930
Compare
No problem. Rebased |
Documentation created automatically
Thanks! Sorry I was away for a while. |
This uses some pieces from the man page and the function arguments to create a simple documentation for the core interface.