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

Documentation improvements #4

Merged
merged 2 commits into from
May 9, 2022
Merged

Documentation improvements #4

merged 2 commits into from
May 9, 2022

Conversation

rustkas
Copy link
Contributor

@rustkas rustkas commented Apr 29, 2022

  • dispatch_compiler.erl

    • Replace unnesecarylly html Character Entity &lt; to <<.
    • Expanded the description of functions by -spec tag and EDoc tags.
    • Simplify -spec description.
  • EDoc

    • Tune css stylesheet.
  • GNUmakefile

    • Add documentation targets for generation public and private documenation.
  • rebar.config

    • Add documentation generation and testing profiles.
    • Add option to generate public and private documentation.
  • .gitignore

    • Add .gitignore option for generated documentation.
  • test/dispatch_compiler_basic_SUITE.erl

    • Fix "Warning: export_all"

dispatch_compiler.erl
 Replace unnesecarylly html Character Entity &lt; to <<.
 Expanded the description of functions by -spec tag and EDoc tags.
 Simplify -spec description.

EDoc
 Tune css stylesheet.

GNUmakefile
 Add documentation targets for generation public and private documenation.

rebar.config
 Add documentation generation and testing profiles.
 Add option to generate public and private documentation.

.gitignore
 Add .gitignore option for generated documentation.

test/dispatch_compiler_basic_SUITE.erl
 Fix  "Warning: export_all"
@mworrell
Copy link
Member

mworrell commented May 6, 2022

It seems that the newest rebar3 does not support OTP 21 anymore, making the test fail.

Maybe we can remove the 21 test and add 24?
In Zotonic 1.x we only support 22.3 and later.

@rustkas
Copy link
Contributor Author

rustkas commented May 6, 2022

It seems that the newest rebar3 does not support OTP 21 anymore, making the test fail.

Maybe we can remove the 21 test and add 24? In Zotonic 1.x we only support 22.3 and later.

Yes. You are right. I add modification to .github/workflows/test.yml. It should be worked.

In Zotonic 1.x only support 22.3 and later.
Copy link
Member

@mmzeeman mmzeeman left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Nice that there is some work done on the documentation. Now that they are more readable, they should probably be pushed to hex as well.

@rustkas
Copy link
Contributor Author

rustkas commented May 9, 2022

Looks good to me.

Nice that there is some work done on the documentation. Now that they are more readable, they should probably be pushed to hex as well.

Yes, Maas. You are right. I with Marc already have merged all of this using branch based on this one. It would be nice to merge this branch too in a way to save all that description related to this changes (saving this description for the history of changes.). I hope you can do it as good as possible.

I usually add documentation and updates to my hex.pm area in this way:

$ rebar3 do hex cut -i patch
$ rebar3 do hex publish --yes, hex docs

@mworrell mworrell merged commit ab52449 into zotonic:master May 9, 2022
@mworrell
Copy link
Member

mworrell commented May 9, 2022

And merged :-)

@mmzeeman
Copy link
Member

mmzeeman commented May 9, 2022

Nice... For hex it is probably just a matter of building the documentation on the machine you push the hex package from.

@mworrell
Copy link
Member

mworrell commented May 9, 2022

I have released 1.1.0

@mworrell
Copy link
Member

mworrell commented May 9, 2022

See https://hex.pm/packages/dispatch_compiler

@mmzeeman
Copy link
Member

mmzeeman commented May 9, 2022

This is going to look like something real.. \o/...

PS. @rustkas I used the same setup you provided for the type specs and doc strings in my educkdb package. (https://hexdocs.pm/educkdb/). So thanks a lot.

@rustkas
Copy link
Contributor Author

rustkas commented May 9, 2022

Publishing documentation on hex.pm rebar3 projects has nuances which described on rebar3_publish. To comply with all conventions, it is necessary to follow his recommendations.

I have already encountered some peculiarities of work when publishing documentation for Erlang libraries that I posted under my account.

To do this I just add this to the rebar.config file:

{plugins, [rebar3_hex]}.

{edoc_opts, [
  {doclet, edoc_doclet_chunks},
  {layout, edoc_layout_chunks},
  {dir, "doc"}]}.

I noticed that the configuration files of the Zotonic projects that I have already met has not yet had that settings.

@rustkas rustkas deleted the fix_doc branch May 10, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants