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

Docs and minor ergonomic changes #2

Merged
merged 11 commits into from
Nov 22, 2024
Merged

Docs and minor ergonomic changes #2

merged 11 commits into from
Nov 22, 2024

Conversation

ross-spencer
Copy link
Collaborator

@ross-spencer ross-spencer commented Nov 21, 2024

  • Documenting exported functions and variables.
  • Additional justfile helpers.
  • So far, one set of magic numbers replaced with consts (runtime skip values).
  • Tests: the tests were found to not be indempotent and so have been updated to compare data on a structural level.
  • Docs, README.md was already out of date with the error interface and so examples have been moved to godoc where they are tested as part of go test they are also runnable in the online godoc package registry. Offline docs based example look as follows (docs can be started using just docs:

image

* go test
* godoc
* addiitional setup for godoc install
* Corrects goimports (this command may still take some nuancing)
Docs for remaining functions and factory structures.
Tests need to be tested without cache at times to prove their
idempotency.
Ordering in YAML and TOML meant that comparison of strings
was failing. We make sure that the tests pass consistently here
by re-loading the data back into memory and comparing the
data on a structural level.
We replace the magic number for the default weight at the same time.
Docs examples are tested as part of `go test` and so they remain
up-to-date when they are changed in error. They are also useful
entry-points when looking at the library via the docs.
@ross-spencer
Copy link
Collaborator Author

@je4 just requesting re-review on these. I noticed some issues with the unit tests as they were (more info in the respective commit). And I have made some changes to the README.md to provide some more interactivity via godocs and also some plain-examples on the README.

@ross-spencer ross-spencer requested a review from je4 November 22, 2024 12:13
@ross-spencer ross-spencer changed the title WIP: docs and minor ergonomic changes Docs and minor ergonomic changes Nov 22, 2024
@ross-spencer ross-spencer merged commit 6e6f823 into main Nov 22, 2024
7 of 8 checks passed
@ross-spencer ross-spencer deleted the dev/docs branch November 22, 2024 13:06
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.

2 participants