From 28ac6262da1c8ff5f7f06c01b0a0cdfe584dee0a Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Mon, 24 Jun 2024 16:10:51 +0200 Subject: [PATCH] Misc minor changes --- .github/ISSUE_TEMPLATE.md | 5 + .github/PULL_REQUEST_TEMPLATE.md | 7 ++ README.md | 5 +- src/MemViews.jl | 2 +- sticker.svg | 191 +++++++++++++++++++++++++++---- 5 files changed, 184 insertions(+), 26 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..e352c42 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,5 @@ +Thank you for making an issue. +If you are submitting a bug report, it will help us if you include the following information: + +- Your version of Julia and all packages in your activated Julia environment +- A small example that demonstrates the bug. If possible, please make the code copy-pastable into a fresh REPL. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e9b3e4d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for your contribution! +If you have any questions about your PR, or need help completing it, you can ping the maintainers of this repository, who will be happy to help if they can find time. + +You can optionally use the following checklist when you work on your PR: +- [ ] I have updated any relevant documentation and docstrings. +- [ ] I have added unit tests, and the CodeCov bot shows tests cover my new code. +- [ ] I have mentioned my changes in the CHANGELOG.md file. diff --git a/README.md b/README.md index eaf579e..97b01e6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This package implements `MemView`, a simple, low-level view into a chunk of `Memory`, as well as the `MemKind` trait to guide dispatch of generic methods to memory views. It is intended to be used as a foundational base for other packages. -To learn how to use the package, [read the documentation](https://biojulia.github.io/MemViews.jl/stable/) +To learn how to use the package, [read the documentation](https://biojulia.github.io/MemViews.jl/dev/) ## Example ### Basic usage @@ -76,3 +76,6 @@ foo(x::AbstractString) = foo(codeunits(x)) requires heap-allocating a new `Memory` pointing to the existing memory of the string. This can be fixed if `String` is re-implemented to be backed by `Memory`, but I don't know enough details about the implementation of `String` to know if this is practical. + +## Contributing +Make an issue or PR on this repository, or get in touch with the BioJulia community over at the [Julia Slack](https://julialang.org/slack/) or Zulip servers. diff --git a/src/MemViews.jl b/src/MemViews.jl index ba52b01..a5f3906 100644 --- a/src/MemViews.jl +++ b/src/MemViews.jl @@ -78,7 +78,7 @@ struct MemView{T, M <: Union{Mutable, Immutable}} <: DenseVector{T} len::Int function MemView{T, M}(::Unsafe, ref::MemoryRef{T}, len::Int) where {T, M} - M == Union{} && error("Parameter M must be Mutable or Immutable") + (M === Mutable || M === Immutable) || error("Parameter M must be Mutable or Immutable") new{T, M}(ref, len) end end diff --git a/sticker.svg b/sticker.svg index 1b2ea24..c2c0b89 100644 --- a/sticker.svg +++ b/sticker.svg @@ -1,26 +1,169 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +