-
Notifications
You must be signed in to change notification settings - Fork 109
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 updates #1021
Documentation updates #1021
Conversation
7c34844
to
bd2f271
Compare
CONTRIBUTING.md
Outdated
|
||
> Note: You should include a short `/* comment */` trailing the `#ifndef` entry mentioning the file where the function is actually documented. | ||
```{admonition} Note: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is {admonition}
something parsed from GitHub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just discovered that this format doesn't work well, so I am already in the process of changing all of the {admonition}
's to a more portable style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
README.Md
Outdated
@@ -26,9 +26,9 @@ might be supported in a near future. | |||
|
|||
Getting Started | |||
=============== | |||
There is much more information, including a more complete (["Getting Started Guide"](https://www.atomvm.net/doc/master/getting-started-guide.html)), ([extensive documentation](https://www.atomvm.net/doc/master/build-instructions.html)), ([examples](https://www.atomvm.net/sample-code)), detailed ([build instructions](https://www.atomvm.net/doc/master/build-instructions.html)) and ([contact information](https://www.atomvm.net/contact)) available on the [AtomVM](https://atomvm.net) project website. | |||
There is much more information, including a more complete ["Getting Started Guide"](https://www.atomvm.net/doc/master/getting-started-guide.html), [extensive documentation](https://www.atomvm.net/doc/master/build-instructions.html), [examples](https://www.atomvm.net/sample-code), detailed [build instructions](https://www.atomvm.net/doc/master/build-instructions.html) and [contact information](https://www.atomvm.net/contact) available on the [AtomVM](https://atomvm.net) project website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are changing this block of text, would you mind trying to fit as much as possible into 100 character columns?
Let's change it while changing the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Update links for build instructions on various platforms. Fixes several links in the Getting Started section that were places within parentheses, which led to undesireable formatting in the rendered text. Signed-off-by: Winford <winford@object.stream>
Various typo corrections, add missing parmaters, and other format fixes for the API documentation generated from library source code files. Signed-off-by: Winford <winford@object.stream>
The fix in uwiger/edown#30 has been merged upsteam, so we should now return to using the upstream tool available from hex. Removes unnecessary `ex_doc` plugin. Signed-off-by: Winford <winford@object.stream>
34d5dc4
to
0c2a7ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to build locally; looks great!
(Pid :: pid(), memory) -> {memory, non_neg_integer()}; | ||
(Pid :: pid(), links) -> {links, [pid()]}. | ||
-spec process_info(Pid :: pid(), Key :: atom()) -> | ||
{LookupKey :: atom(), Value :: non_neg_integer()} | {links, [LinkPid :: pid()]}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure about this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see how the current spec
gets published here:
https://www.atomvm.net/doc/master/apidocs/erlang/estdlib/erlang.html#process-info-2
I believe the updated spec
is correct, and the formatting looks much better, here in a screenshot of how the updated spec changes the output:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind reverting this change, but I think the more concise version looks better, while still conveying all of the correct information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a point of reference here is the OTP spec:
process_info(Pid, Item) -> InfoTuple | [] | undefined
process_info(Pid, ItemList) -> InfoTupleList | [] | undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better if I change this to closer to the OTP definition, and add a typespec for InfoTuple.
libs/exavmlib/mix.exs.in
Outdated
@@ -0,0 +1,75 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure why this is .in
file, can't we make a real mix.exs file instead of templating it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was included by mistake. It was from a work-in-progress to include the elixir documentation in our published API docs, which is not ready to PR yet. It has been removed.
0c2a7ff
to
3a49789
Compare
%% @param TargetOrHandle Target or handle | ||
%% @returns ok or `{error, Reason}' | ||
%% @end | ||
-spec unregister_touchcancel_callback(TargetOrHandle :: html5_target() | listener_handle()) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is changing spec from unregister_touchcancel_callback(html5_target() | listener_handle())
to unregister_touchcancel_callback(TargetOrHandle :: html5_target() | listener_handle())
a requirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not including the argument name in in the spec (i.e. only the type) prevents the argument from being displayed in the documentation.
- The `emscripten:promise_resolve/1,2` and `emscripten:promise_reject/1,2` nifs dispatch a message in the browser's main thread. | ||
- The dispatched function retrieves the promise from its index, resolves or rejects it, with the value passed to `emscripten:promise_resolve/2` or `emscripten:promise_reject/2` and destroys it. | ||
1. A promise is created (in the browser's main thread) in a map to prevent Javascript garbage collection (this is done by Emscripten's promise glue code). | ||
1. An Erlang resource is created to encapsulate the promise so it is properly destroyed when garbage collected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I'm understanding this kind of change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed that from and unordered list to and ordered one, since this is a specific sequence of events. The rendered list will be numbered 1, 2, 3, etc automatically.
I feel like this is quite hard to deal with this kind of PR, it mixes together changes to how we build documentation (CMakeLists.txt), to configuration, typos and typespecs. |
I did make sure that any changes that to actual code is in a separate commit. But I can pull out the build changes from the documentation updates into a separate commit. |
Various corrections, formatting fixes, updates, and visual enhancements to the generated documentation. Signed-off-by: Winford <winford@object.stream>
Adds pdf template and stylesheet to fix the way links to sections are rendered by the spinx `rinoh` plugin, using the given section name for the link rather than replacing them with the section heading number. Reduces the verbosity of Doxgen, and no longer produce the duplicate doxygen html content. Removes unnecessary Sphinx plugins, adds html metadata (for better SEO), and reorganizes `conf.py.in` so that settings are less scattered and grouped into labeled sections. Several configuration options have been added to help solve many of the build warings, and several kinds of unhelpful, or false-positive warnings from Sphinx have been supressed. Changes to CMakeLists.txt remove several unnecessary steps, as well as including some changes necessary to fix broken links. The verbosity of the sphinx build jobs has been reduced so that only warnings and errors are shown, this will make diagnosing problems easier, and should speed up build times in the CI. Signed-off-by: Winford <winford@object.stream>
3a49789
to
619d56c
Compare
I have moved the changes in the build system into a separate commit. I had not intended for this PR to be so large, but as I was making additions I realized the number of build errors had grown considerably, and some of the dead links needed to be corrected in the build system itself. I didn't want to flood the PR queue with doc related requests, and I was hoping to avoid merge conflicts. In the future I will try to make these kinds of changes in separate PRs. |
I will be breaking this up and sending it to the release-0.6 branch. |
Updates and corrections to the documentation, as well as some cleanup of the documentation build system itself.
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later