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

Add Aqua.jl tests #99

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading