Skip to content
New issue

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

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

Already on GitHub? # to your account

API reference improvements #347

Closed
qwwdfsad opened this issue Feb 29, 2024 · 1 comment · Fixed by #367
Closed

API reference improvements #347

qwwdfsad opened this issue Feb 29, 2024 · 1 comment · Fixed by #367
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@qwwdfsad
Copy link
Contributor

qwwdfsad commented Feb 29, 2024

It would be nice to systematically and extensively improve our API reference:

For every API endpoint, it would be nice to provide the following (example is the place where the property does not hold):

  • Extensively document what the entity represents, whether it follows ISO-8601, how the entity can be acquired, and what time scale it comes from. Example
  • Provide a minimum of how the entity can be used. Example
  • Thoroughly explain the allowed and expected contract and behaviours and system-specifics. Example
  • If applicable, provide contexts in which the entity is expected/recommended to be used (e.g. our README shines at that) and how it interacts with other (core) entities. Example
  • Provide a basic usage example. Example
  • If applicable, provide details about conversion rules, gotchas and recommendations. Example
  • Where appropriate, information about conversions and interactions with native types (e.g. Instant <-> Java Instant conversion)
  • Ensure that information used in our README is, in fact, deducible from the core entities documentation
@qwwdfsad qwwdfsad added the documentation Improvements or additions to documentation label Feb 29, 2024
@dkhalanskyjb
Copy link
Collaborator

If applicable, provide details about conversion rules, gotchas and recommendations. Example

I don't know of gotchas related to Instant. The only one that comes to mind is that instant + 1.days is a non-calendar operation (this could be worth documenting in the plus function), but I'd argue it's Duration's gotcha. Instant seems tough to use incorrectly to me. What gotchas did you have in mind?

Where appropriate, information about conversions and interactions with native types (e.g. Instant <-> Java Instant conversion)

When you have specific behavior on some platforms, you document it in the common code, makes sense; but when you have some extra interactions with platform code, you can't document them in common code (because symbols aren't resolved). If you have platform-specific documentation, in the IDE, it is either ignored (when writing common code) or replaces the common documentation. In the latter case, you have to repeat the common documentation for platforms and include platform-specific additions, which I think just isn't worth it.

If the system was a bit different and platform-specific documentation was added to the common documentation (and maybe the IDE would be smart enough to show the documentation for the platforms the project actually uses), then I agree that mentioning platform-specific converters and so on would be beneficial. Or better yet, if there was "extension documentation" along with extension functions: then we'd be able to show NSDate conversions in the Instant documentation for Darwin targets.

dkhalanskyjb added a commit that referenced this issue Mar 12, 2024
@dkhalanskyjb dkhalanskyjb added this to the 0.6.0 milestone Apr 12, 2024
@dkhalanskyjb dkhalanskyjb self-assigned this Apr 12, 2024
dkhalanskyjb added a commit that referenced this issue Apr 16, 2024
dkhalanskyjb added a commit that referenced this issue Apr 29, 2024
dkhalanskyjb added a commit that referenced this issue May 13, 2024
Fixes #347

We methodically went through the complete KDoc-based documentation
and reworked it, adding usage examples, clarifying the specifics
of behaviors, proposing the expected usage patterns, etc.

Additionally, we enabled Dokka's fail-on-warnings flag.

---------

Co-authored-by: Danil.Pavlov <danil.pavlov@jetbrains.com>
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Co-authored-by: ilya-g <ilya.gorbunov@jetbrains.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants