Skip to content

Commit

Permalink
Add Aqua.jl tests (#99)
Browse files Browse the repository at this point in the history
* Add Aqua.jl tests

* Update README
  • Loading branch information
adrhill authored Aug 7, 2023
1 parent 1f9ba36 commit 86d0e24
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
![](./docs/logo/DitheredPunk.png)
# 💀 DitherPunk.jl 💀

| **Documentation** | **Build Status** |
|:--------------------------------------------------------------------- |:----------------------------------------------------- |
| [![][docs-stab-img]][docs-stab-url] [![][docs-dev-img]][docs-dev-url] | [![][ci-img]][ci-url] [![][codecov-img]][codecov-url] |
| **Documentation** | **Build Status** |
|:--------------------------------------------------------------------- |:------------------------------------------------------------------------------- |
| [![][docs-stab-img]][docs-stab-url] [![][docs-dev-img]][docs-dev-url] | [![][ci-img]][ci-url] [![][codecov-img]][codecov-url] [![][aqua-img]][aqua-url] |

A dithering / digital halftoning package inspired by Lucas Pope's [Obra Dinn](https://obradinn.com) and [Surma's blogpost](https://surma.dev/things/ditherpunk/) of the same name.
**[Check out the gallery](https://JuliaImages.github.io/DitherPunk.jl/stable/generated/gallery_images/)** for an overview of all currently implemented algorithms.
A dithering / digital halftoning package
inspired by Lucas Pope's [Obra Dinn](https://obradinn.com)
and [Surma's blogpost](https://surma.dev/things/ditherpunk/) of the same name.
**[Check out the gallery](https://JuliaImages.github.io/DitherPunk.jl/stable/generated/gallery_images/)**
for an overview of all currently implemented algorithms.

## Installation
To install this package and its dependencies, open the Julia REPL and run
Expand Down Expand Up @@ -38,7 +41,8 @@ If no color palette is provided, DitherPunk will apply binary dithering to each
Any of the [29 implemented algorithms][alg-list-url] can be used.

### Color dithering
All error diffusion, ordered dithering and halftoning methods support custom color palettes. Define your own palette or use those from [ColorSchemes.jl](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue):
All error diffusion, ordered dithering and halftoning methods support custom color palettes.
Define your own palette or use those from [ColorSchemes.jl](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue):
```julia
using ColorSchemes

Expand Down Expand Up @@ -123,7 +127,7 @@ Check out our [talk at JuliaCon 2022][juliacon-url] for a demonstration of the p
* `ShiauFan2`
* `SimpleErrorDiffusion`
* Ordered dithering:
* `Bayer` (default level = 1)
* `Bayer`
* Halftoning:
* `ClusteredDots`
* `CentralWhitePoint`
Expand All @@ -147,7 +151,8 @@ Check out our [talk at JuliaCon 2022][juliacon-url] for a demonstration of the p

___

**Share your creations in the [discussions tab](https://github.com/JuliaImages/DitherPunk.jl/discussions/categories/show-and-tell) and leave a GitHub Issue if you know of any cool algorithms you'd like to see implemented! 🔬🔧**
**Share your creations in the [discussions tab](https://github.com/JuliaImages/DitherPunk.jl/discussions/categories/show-and-tell)
and leave a GitHub Issue if you know of any cool algorithms you'd like to see implemented! 🔬🔧**

[docs-stab-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stab-url]: https://JuliaImages.github.io/DitherPunk.jl/stable
Expand All @@ -158,6 +163,9 @@ ___
[ci-img]: https://github.com/JuliaImages/DitherPunk.jl/workflows/CI/badge.svg
[ci-url]: https://github.com/JuliaImages/DitherPunk.jl/actions

[aqua-img]: https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg
[aqua-url]: https://github.com/JuliaTesting/Aqua.jl

[codecov-img]: https://codecov.io/gh/JuliaImages/DitherPunk.jl/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/JuliaImages/DitherPunk.jl

Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
ImageBase = "c817782e-172a-44cc-b673-b171935fbb9e"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using DitherPunk
using Test
using Aqua
using ImageBase: Gray

# Run Aqua.jl quality assurance tests
Aqua.test_all(DitherPunk; ambiguities=false)
Aqua.test_ambiguities([DitherPunk, Core])

# Run package tests
function gradient_image(height, width)
row = reshape(range(0; stop=1, length=width), 1, width)
grad = Gray.(vcat(repeat(row, height))) # Linear gradient
Expand Down

0 comments on commit 86d0e24

Please sign in to comment.