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

Rework documentation #200

Merged
merged 4 commits into from
Dec 21, 2023
Merged

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Dec 17, 2023

Based on feedback from this threat in the Erlang Forums, I thought of entirely reworking the documentation. I was never really a big fan of that large README file with everything, never found it much readable and most of my knowledge of the library really came from how we use it in MongooseIM. So I decided to split that big readme and move most of it to the respective types and function definitions defined in the wpool module, taking care of all the links working right. That also puts documentation next to the code, which might be easier to maintain in the future.

The best way to review this would be to build docs locally with rebar3 ex_doc and browse :)

I also added a function that creates the child-spec directly, so that it can be added to a supervision tree.

It is on top of the commit added to #198 for convenience for me mostly, so merging that one first would be best :)

Now, for the documentation to build correctly and display all the information in the defined types, we really need to let rebar3_format allow comments directly below types, as this is how ex_doc builds docs for types :|

@NelsonVides NelsonVides marked this pull request as draft December 17, 2023 14:16
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Show resolved Hide resolved
@NelsonVides NelsonVides marked this pull request as ready for review December 20, 2023 15:29
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
src/wpool.erl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9ddf1aa) 92.54% compared to head (223450a) 92.57%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   92.54%   92.57%   +0.03%     
==========================================
  Files          10       10              
  Lines         456      458       +2     
==========================================
+ Hits          422      424       +2     
  Misses         34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elbrujohalcon elbrujohalcon merged commit 575ef91 into inaka:main Dec 21, 2023
4 checks passed
@NelsonVides NelsonVides deleted the rework_documentation branch December 21, 2023 09:12
@NelsonVides
Copy link
Collaborator Author

Lovely to see this merged! Wanna publish a new package @elbrujohalcon to have the docs public? 😁

@elbrujohalcon
Copy link
Member

Done already. https://hexdocs.pm/worker_pool/readme.html

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.

4 participants