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

Numerous documentation fixes and updates, wavread can now read chunks fixed after subrange #86

Merged
merged 7 commits into from
Jul 26, 2020

Conversation

mgkuhn
Copy link
Contributor

@mgkuhn mgkuhn commented Jul 12, 2020

The documentation of functions in README.md had gotten seriously out of sync with the actual implementation, so I have now moved it all into docstrings and updated everything that I could spot. This way the documentation also becomes available from Julia's built-in help system, and it can now be built with Documenter.jl. (Keeping the function documentation closer to the code makes it more likely that it gets updated in future.)

I've also removed or updated several broken links from README.md.

While testing the updated documentation, I also spotted and fixed two problems in the implementation:

  • I simplified two include() calls by removing a redundant joinpath() (include does understand relative paths)
  • When wavread() was called with a subrange that didn't include the last sample, it would attempt to read subsequent chunks immediately after the last sample of the subrange, which results in garbage. I'm now passing the chuck length as an additional parameter to the low-level sample read functions, such that they can finish reading a subrange by skipping to the end of their chunk, where the caller can then proceed to read the next chunk.

I've also added to .travis.yaml the lines needed for the CI to build the HTML documentation with Documenter.jl. If that works, you can then complete the steps required to automatically host the HTML documentation on GitHub Pages.

mgkuhn added 7 commits July 11, 2020 20:45
The `read_*_samples()` functions did not leave the `io` read position
at the end of the `"data"` chunk if only a subrange that doesn't include
the last sample was read, which caused parsing of subsequent chunks
to fail. We therefore now pass on `chunk_size` to all the `read_*_sample()`
functions, such that they all can now always skip to the end of the chunk.
…tion

There were numerous problems, e.g. default behaviour of optional
arguments was not explained correctly, there were references to types
such as Range1{} that no longer exist in Julia 1.x, etc.

Also syntax fixes for Documenter.jl
Instructions for hosting the resulting HTML documentation of GitHub Pages:

  https://juliadocs.github.io/Documenter.jl/stable/man/hosting/
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 67.391% when pulling a35716d on mgkuhn:fixes into 701f960 on dancasimiro:main.

@dancasimiro
Copy link
Owner

Thanks for this contribution @mgkuhn. I will review as soon as I can.

Copy link
Owner

@dancasimiro dancasimiro left a comment

Choose a reason for hiding this comment

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

Thank you for this patch!

@dancasimiro dancasimiro merged commit 8949439 into dancasimiro:main Jul 26, 2020
dancasimiro added a commit that referenced this pull request Jul 26, 2020
Update the version number on Project.toml in preparation for releasing v1.0.4. This release fixes wavplay for modern Julia (#85), as well as integrates documentation into the julia help system (#86).
@bjarthur
Copy link
Contributor

thanks so much for the docstrings!!!

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