Skip to content

Commit

Permalink
Prepare 2.4 (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
gampleman authored Oct 6, 2023
1 parent 3e9e0a2 commit c04053b
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 1,525 deletions.
65 changes: 5 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,6 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: lts/*

# Re-use node_modules between runs until package-lock.json changes.
- name: Cache node_modules
id: internal-cache-node_modules
uses: actions/cache@v3
with:
path: node_modules
key: internal-node_modules-ubuntu-latest.x-${{ hashFiles('package-lock.json') }}

# Re-use ~/.elm between runs until elm.json, elm-tooling.json or
# review/elm.json changes. The Elm compiler saves downloaded Elm packages
# to ~/.elm, and elm-tooling saves downloaded tool executables there.
- name: Cache ~/.elm
uses: actions/cache@v3
with:
path: ~/.elm
key: elm-${{ hashFiles('elm.json', 'review/elm.json') }}

- name: Install npm dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'

run: npm ci --omit dev

- name: Run tests
run: npm test

publish:
if: github.ref == 'refs/heads/master' # run only on master
needs: [test] # make sure all your other jobs succeed before trying to publish

# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -70,7 +28,7 @@ jobs:
path: node_modules
key: internal-node_modules-ubuntu-latest.x-${{ hashFiles('package-lock.json') }}

# Re-use ~/.elm between runs until elm.json or
# Re-use ~/.elm between runs until elm.json, elm-tooling.json or
# review/elm.json changes. The Elm compiler saves downloaded Elm packages
# to ~/.elm, and elm-tooling saves downloaded tool executables there.
- name: Cache ~/.elm
Expand All @@ -81,21 +39,8 @@ jobs:

- name: Install npm dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
env:
# If you have a `"postinstall": "elm-tooling install"` script in your
# package.json, this turns it into a no-op. We’ll run it in the next
# step because of the caching. If elm-tooling.json changes but
# package-lock.json does not, the postinstall script needs running
# but this step won’t.
NO_ELM_TOOLING_INSTALL: 1
run: npm ci


# We could optionally enable this?
# # Runs a single command using the runners shell
# - name: Elm Publish
# uses: dillonkearns/elm-publish-action@v1
# with:
# # Token provided by GitHub
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-elm: ./node_modules/.bin/elm
run: npm ci --omit dev

- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.14.0
v19.5.0
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![Elm-visualization](https://code.gampleman.eu/elm-visualization/misc/Logo-600.png)

[Docs](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/) | [Examples](https://elm-visualization.netlify.com/) | [GitHub](https://github.com/gampleman/elm-visualization) | [Changelog](https://github.com/gampleman/elm-visualization/releases) | `#visualization` on [Elm slack](https://elmlang.herokuapp.com)
[Tutorial](https://github.com/gampleman/elm-visualization/blob/master/docs/INTRO.md) | [Docs](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/) | [Examples](https://elm-visualization.netlify.com/) | [GitHub](https://github.com/gampleman/elm-visualization) | [Changelog](https://github.com/gampleman/elm-visualization/releases) | `#visualization` on [Elm slack](https://elmlang.herokuapp.com)

This project is designed to give you all the tools needed to build data visualizations.
It is not a charting library in the sense that you have pre-bundled Excel-style
Expand All @@ -12,6 +12,8 @@ that uniquely suite your needs.

[![Examples](https://code.gampleman.eu/elm-visualization/misc/examples-600.png)](https://elm-visualization.netlify.com/)

or [read the introduction](https://github.com/gampleman/elm-visualization/blob/master/docs/INTRO.md).

## Getting started

You will need to have [elm](https://elm-lang.org) installed. Then run:
Expand All @@ -26,53 +28,58 @@ However, there are other packages that you will likely need to produce a visuali
- [avh4/elm-color](https://package.elm-lang.org/packages/avh4/elm-color/latest) for the `Color` type
- [elm-community/typed-svg](https://package.elm-lang.org/packages/elm-community/typed-svg/latest) for rendering
- [folkertdev/one-true-path-experiment](https://package.elm-lang.org/packages/folkertdev/one-true-path-experiment/latest) for the `Path` type
- [gampleman/elm-rosetree](https://package.elm-lang.org/packages/gampleman/elm-rosetree/latest) for the `Tree` type

You can use [this Ellie](https://ellie-app.com/d6JBvDHFhRBa1) to run the examples, since it has all the dependencies already installed into it.
You can use [this Ellie](https://ellie-app.com/p6X5hXxcdRCa1) to run the examples, since it has all the dependencies already installed into it.

## What's included?

### [Scales](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Scale/)
### [Scales](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Scale/)

Most of the time you have data that has properties that you want to display on the
screen, however these properties typically aren't in pixels. Scales solve this
fundamental problem by giving you convenient ways to transform raw data into positions,
sizes, colors, labels and other ways to display data.

### [Axis](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Axis/)
### [Axis](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Axis/)

A component that allows you to visualize a Scale. Those little ticks that describe
the dimensions of a plot.

### [Shapes](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Shape/)
### [Shapes](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Shape/)

This module gives you ways to draw some fundamental shapes used in data visualization, including lines (as in line or area charts),
as well as arcs (as in pie charts).

### [Force Layout](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Force/)
### [Force Layout](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Force/)

Use a simulation of physical forces to do layout. Suitable for i.e. network graphs.

### [Interpolation](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Interpolation/)
### [Hierarchy](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Hierarchy/)

Layout algorithms for dealing with trees.

### [Interpolation](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Interpolation/)

Smoothly transition between pairs of values. Useful for animation, or generating gradients of values.

### [Transition](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Transition/)
### [Transition](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Transition/)

Build complex animations using Interpolation.

### [Histogram](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Histogram/)
### [Histogram](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Histogram/)

Compute histograms of data.

### [Brush](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Brush/)
### [Brush](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Brush/)

Interactively select subregions of a dataset.

### [Zoom](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Zoom/)
### [Zoom](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Zoom/)

Build pan and zoom user interactions.

### [Statistics](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.3.0/Statistics/)
### [Statistics](https://package.elm-lang.org/packages/gampleman/elm-visualization/2.4.0/Statistics/)

Process data to extract useful insights for visualizations.

Expand Down
2 changes: 1 addition & 1 deletion docs.json

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions elm-analyse.json

This file was deleted.

3 changes: 2 additions & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "gampleman/elm-visualization",
"summary": "A data visualization package for Elm",
"license": "MIT",
"version": "2.3.0",
"version": "2.4.0",
"exposed-modules": [
"Scale",
"Scale.Color",
Expand All @@ -29,6 +29,7 @@
"elm/time": "1.0.0 <= v < 2.0.0",
"elm-community/list-extra": "8.2.4 <= v < 9.0.0",
"folkertdev/one-true-path-experiment": "5.0.0 <= v < 7.0.0",
"gampleman/elm-rosetree": "1.0.0 <= v < 2.0.0",
"ianmackenzie/elm-geometry": "3.6.0 <= v < 4.0.0",
"ianmackenzie/elm-units-prefixed": "2.0.0 <= v < 3.0.0",
"justinmimbs/time-extra": "1.0.1 <= v < 2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/LayeredTree.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module LayeredTree exposing (main)

import Color
import Hierarchy
import Hierarchy.Tree as Tree exposing (Tree)
import Path
import Shape
import Tree exposing (Tree)
import TypedSvg exposing (g, rect, svg)
import TypedSvg.Attributes exposing (dy, fill, pointerEvents, stroke, style, transform, viewBox)
import TypedSvg.Attributes.InPx exposing (fontSize, height, rx, width, x, y)
Expand Down
2 changes: 1 addition & 1 deletion examples/Sunburst.elm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import Csv.Decode as Csv
import Curve
import Example
import Hierarchy
import Hierarchy.Tree as Tree exposing (Tree)
import Html exposing (Html)
import Http
import List.Extra
Expand All @@ -47,6 +46,7 @@ import Scale.Color
import Set
import Shape
import Svg.Lazy
import Tree exposing (Tree)
import TypedSvg exposing (g, rect, svg, text_)
import TypedSvg.Attributes exposing (dy, fill, stroke, textAnchor, transform, viewBox)
import TypedSvg.Attributes.InPx exposing (height, rx, strokeWidth, width, x, y)
Expand Down
2 changes: 1 addition & 1 deletion examples/TidyTree.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Browser
import Color
import Curve
import Hierarchy
import Hierarchy.Tree as Tree exposing (Tree)
import List.Extra
import Path
import Shape
import Tree exposing (Tree)
import TypedSvg exposing (g, rect, svg)
import TypedSvg.Attributes exposing (dy, fill, href, id, pointerEvents, stroke, style, textAnchor, transform, viewBox)
import TypedSvg.Attributes.InPx exposing (fontSize, height, width, x, y)
Expand Down
2 changes: 1 addition & 1 deletion examples/Treemap.elm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module Treemap exposing (TilingMethod, main)
import Color exposing (Color)
import Example
import Hierarchy
import Hierarchy.Tree as Tree exposing (Tree)
import Html exposing (Html)
import Scale exposing (OrdinalScale)
import Scale.Color
import Tree exposing (Tree)
import TypedSvg exposing (g, rect, svg)
import TypedSvg.Attributes exposing (fill, href, id, transform, viewBox)
import TypedSvg.Attributes.InPx exposing (height, width, x)
Expand Down
1 change: 1 addition & 0 deletions examples/elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"elm-explorations/webgl": "1.1.3",
"folkertdev/one-true-path-experiment": "6.0.0",
"gampleman/elm-examples-helper": "2.0.0",
"gampleman/elm-rosetree": "1.1.0",
"ianmackenzie/elm-geometry": "3.11.0",
"ianmackenzie/elm-units-prefixed": "2.8.0",
"justinmimbs/time-extra": "1.1.1",
Expand Down
8 changes: 0 additions & 8 deletions review/suppressed/NoUnused.CustomTypeConstructorArgs.json

This file was deleted.

8 changes: 0 additions & 8 deletions review/suppressed/NoUnused.Exports.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/Hierarchy.elm
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ profitably interpreted abstractly. For instance one may produce a horizontal dia

import Hierarchy.Partition
import Hierarchy.Tidy
import Hierarchy.Tree as Tree exposing (Tree)
import Hierarchy.Treemap
import Tree exposing (Tree)


{-| Used to indicate which attributes go with which layout functions.
Expand Down
2 changes: 1 addition & 1 deletion src/Hierarchy/Partition.elm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Hierarchy.Partition exposing (layout)

import Hierarchy.Tree as Tree exposing (Tree)
import Hierarchy.Treemap as Treemap
import Tree exposing (Tree)


layout :
Expand Down
2 changes: 1 addition & 1 deletion src/Hierarchy/Tidy.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For a description, see <https://www.zxch3n.com/tidy/tidy/>.

import Array exposing (Array)
import Dict
import Hierarchy.Tree as Tree exposing (Tree)
import Tree exposing (Tree)



Expand Down
Loading

0 comments on commit c04053b

Please sign in to comment.