mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-10 17:31:14 +08:00
Compare commits
No commits in common. "main" and "v0.4.2" have entirely different histories.
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1 +1,2 @@
|
|||||||
|
github: kojix2
|
||||||
ko_fi: kojix2
|
ko_fi: kojix2
|
||||||
|
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -1,17 +1,18 @@
|
|||||||
name: test
|
name: test
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.os }} Ruby ${{ matrix.ruby }}
|
name: ${{ matrix.os }} Ruby ${{ matrix.ruby }}
|
||||||
runs-on: ${{ matrix.os }}-latest
|
runs-on: ${{ matrix.os }}-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: ["ubuntu", "macos"]
|
os: ['ubuntu', 'macos']
|
||||||
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
|
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
bundler-cache: true
|
- run: gem install bundler
|
||||||
|
- run: bundle install
|
||||||
- run: bundle exec rake test
|
- run: bundle exec rake test
|
||||||
|
23
.github/workflows/doc.yml
vendored
23
.github/workflows/doc.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
name: doc
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: ruby
|
|
||||||
- name: Generate document
|
|
||||||
run: gem install -N yard && yard doc
|
|
||||||
- name: Publish Documentation on GitHub Pages
|
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./doc
|
|
6
Gemfile
6
Gemfile
@ -4,9 +4,3 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
# Specify your gem's dependencies in youplot.gemspec
|
# Specify your gem's dependencies in youplot.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
group :test do
|
|
||||||
gem 'rake'
|
|
||||||
gem 'simplecov'
|
|
||||||
gem 'test-unit'
|
|
||||||
end
|
|
||||||
|
221
README.md
221
README.md
@ -1,46 +1,30 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="logo.svg">
|
<img src="logo.svg" width="66%" height="66%" />
|
||||||
<hr>
|
|
||||||
<a href="https://github.com/red-data-tools/YouPlot/actions/workflows/ci.yml"><img alt="Build Status" src="https://github.com/red-data-tools/YouPlot/workflows/test/badge.svg"></a>
|
|
||||||
<a href="https://rubygems.org/gems/youplot/"><img alt="Gem Version" src="https://badge.fury.io/rb/youplot.svg"></a>
|
|
||||||
<a href="https://zenodo.org/badge/latestdoi/283230219"><img alt="DOI" src="https://zenodo.org/badge/283230219.svg"></a>
|
|
||||||
<a href="https://rubydoc.info/gems/youplot/"><img alt="Docs Stable" src="https://img.shields.io/badge/docs-stable-blue.svg"></a>
|
|
||||||
<a href="LICENSE.txt"><img alt="The MIT License" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
|
||||||
|
|
||||||
YouPlot is a command line tool that draws plots on the terminal.
|
<hr>
|
||||||
|
|
||||||
|

|
||||||
|
[](https://badge.fury.io/rb/youplot)
|
||||||
|
[](https://rubydoc.info/gems/youplot)
|
||||||
|
[](LICENSE.txt)
|
||||||
|
[](https://zenodo.org/badge/latestdoi/283230219)
|
||||||
|
|
||||||
|
YouPlot is a command line tool that draws plots in a terminal.
|
||||||
|
|
||||||
:bar_chart: Powered by [UnicodePlot](https://github.com/red-data-tools/unicode_plot.rb)
|
:bar_chart: Powered by [UnicodePlot](https://github.com/red-data-tools/unicode_plot.rb)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
brew install youplot
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
gem install youplot
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
nix shell nixpkgs#youplot
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
guix install youplot
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
conda install -c conda-forge ruby
|
|
||||||
conda install -c conda-forge compilers
|
|
||||||
gem install youplot
|
gem install youplot
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png" width=160> <img alt="histogram" src="https://user-images.githubusercontent.com/5798442/101999820-21cafc00-3d24-11eb-86db-e410d19b07df.png" width=160> <img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png" width=160> <img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png" width=160> <img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png" width=160>
|
* `cat data.tsv | uplot <command> [options]` or
|
||||||
|
* `uplot <command> [options] <data.tsv>`
|
||||||
`uplot <command> [options] <data.tsv>`
|
|
||||||
|
|
||||||
### barplot
|
### barplot
|
||||||
|
|
||||||
@ -52,23 +36,16 @@ curl -sL https://git.io/ISLANDScsv \
|
|||||||
```
|
```
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png">
|
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# For offline user: Sorts files in a directory by size and shows a bar graph.
|
|
||||||
ls -l | awk '{print $9, $5}' | sort -nk 2 | uplot bar -d ' '
|
|
||||||
```
|
|
||||||
|
|
||||||
### histogram
|
### histogram
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
echo -e "from numpy import random;" \
|
echo -e "from numpy import random;" \
|
||||||
"n = random.randn(10000);" \
|
"n = random.randn(10000);" \
|
||||||
"print('\\\n'.join(str(i) for i in n))" \
|
"print('\\\n'.join(str(i) for i in n))" \
|
||||||
| python3 \
|
| python \
|
||||||
| uplot hist --nbins 20
|
| uplot hist --nbins 20
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -88,14 +65,6 @@ curl -sL https://git.io/AirPassengers \
|
|||||||
<img alt="lineplot" src="https://user-images.githubusercontent.com/5798442/101999825-24c5ec80-3d24-11eb-99f4-c642e8d221bc.png">
|
<img alt="lineplot" src="https://user-images.githubusercontent.com/5798442/101999825-24c5ec80-3d24-11eb-99f4-c642e8d221bc.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
```sh
|
|
||||||
# For offline users: Calculates sin values (0-2*pi) and plots a sine wave.
|
|
||||||
python3 -c '
|
|
||||||
from math import sin, pi
|
|
||||||
data = "\n".join(f"{i*pi/50}\t{sin(i*pi/50)}" for i in range(101))
|
|
||||||
print(data)' | uplot line
|
|
||||||
```
|
|
||||||
|
|
||||||
### scatter
|
### scatter
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -108,12 +77,6 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png">
|
<img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# For offline users
|
|
||||||
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot scatter -H -d, -t IRIS
|
|
||||||
```
|
|
||||||
|
|
||||||
### density
|
### density
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -126,11 +89,6 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png">
|
<img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
```sh
|
|
||||||
# For offline users
|
|
||||||
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot density -H -d, -t IRIS
|
|
||||||
```
|
|
||||||
|
|
||||||
### boxplot
|
### boxplot
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -143,20 +101,11 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png">
|
<img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
```sh
|
|
||||||
# For offline users
|
|
||||||
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot boxplot -H -d, -t IRIS
|
|
||||||
```
|
|
||||||
|
|
||||||
### count
|
### count
|
||||||
|
|
||||||
Count processes by user ID.
|
In this example, YouPlot counts the number of chromosomes where the gene is located from the human gene annotation file and it creates a bar chart. The human gene annotation file can be downloaded from the following website.
|
||||||
|
|
||||||
```sh
|
* https://www.gencodegenes.org/human/
|
||||||
ps aux | awk '{print $1}' | uplot count
|
|
||||||
```
|
|
||||||
|
|
||||||
Count the number of chromosomes where genes are located.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat gencode.v35.annotation.gff3 \
|
cat gencode.v35.annotation.gff3 \
|
||||||
@ -168,20 +117,23 @@ cat gencode.v35.annotation.gff3 \
|
|||||||
<img alt="count" src="https://user-images.githubusercontent.com/5798442/101999832-30b1ae80-3d24-11eb-96fe-e5000bed1f5c.png">
|
<img alt="count" src="https://user-images.githubusercontent.com/5798442/101999832-30b1ae80-3d24-11eb-96fe-e5000bed1f5c.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
* [GENCODE - Human Release](https://www.gencodegenes.org/human/)
|
|
||||||
|
|
||||||
Note: `count` is not very fast because it runs in a Ruby script.
|
Note: `count` is not very fast because it runs in a Ruby script.
|
||||||
This is fine in most cases, as long as the data size is small. If you want to visualize huge data, it is faster to use a combination of common Unix commands as shown below.
|
This is fine in most cases, as long as the data size is small. If you want to visualize huge data, it is faster to use a combination of common Unix commands as shown below.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat gencode.v35.annotation.gff3 | grep -v '#' | grep 'gene' | cut -f1 \
|
cat gencode.v35.annotation.gff3 | grep -v '#' | grep 'gene' | cut -f1 \
|
||||||
| sort | uniq -c | sort -nrk1 \
|
| sort | uniq -c | sort -nrk2 | awk '{print $2,$1}' \
|
||||||
| uplot bar --fmt yx -d ' ' -t "The number of human gene annotations per chromosome" -c blue
|
| uplot bar -d ' ' -t "The number of human gene annotations per chromosome" -c blue
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Commands
|
### Why YouPlot?
|
||||||
|
|
||||||
|
Wouldn't it be a pain to have to run R, Python, Julia, gnuplot or whatever REPL just to check your data?
|
||||||
|
YouPlot is a command line tool for this purpose. With YouPlot, you can continue working without leaving your terminal and shell.
|
||||||
|
|
||||||
|
### How to use YouPlot?
|
||||||
|
|
||||||
`uplot` is the shortened form of `youplot`. You can use either.
|
`uplot` is the shortened form of `youplot`. You can use either.
|
||||||
|
|
||||||
@ -191,7 +143,18 @@ cat gencode.v35.annotation.gff3 | grep -v '#' | grep 'gene' | cut -f1 \
|
|||||||
| `uplot <command> [options] data.tsv ...` | Take input from files |
|
| `uplot <command> [options] data.tsv ...` | Take input from files |
|
||||||
| `pipeline1 \| uplot <command> -O \| pipeline2` | Outputs data from stdin to stdout |
|
| `pipeline1 \| uplot <command> -O \| pipeline2` | Outputs data from stdin to stdout |
|
||||||
|
|
||||||
### Subcommands
|
### Where to output the plot?
|
||||||
|
|
||||||
|
By default, the plot is output to *standard error output*.
|
||||||
|
The output file or stream for the plot can be specified with the `-o` option.
|
||||||
|
|
||||||
|
### Where to output the input data?
|
||||||
|
|
||||||
|
By default, the input data is not shown anywhere.
|
||||||
|
The `-O` option, with no arguments, outputs the input data directly to the standard output.
|
||||||
|
This is useful when passing data to a subsequent pipeline.
|
||||||
|
|
||||||
|
### What types of plots are available?
|
||||||
|
|
||||||
The following sub-commands are available.
|
The following sub-commands are available.
|
||||||
|
|
||||||
@ -204,83 +167,66 @@ The following sub-commands are available.
|
|||||||
| scatter | s | draw a scatter plot |
|
| scatter | s | draw a scatter plot |
|
||||||
| density | d | draw a density plot |
|
| density | d | draw a density plot |
|
||||||
| boxplot | box | draw a horizontal boxplot |
|
| boxplot | box | draw a horizontal boxplot |
|
||||||
| | | |
|
|
||||||
| count | c | draw a barplot based on the number of occurrences (slow) |
|
|
||||||
| | | |
|
|
||||||
| colors | color | show the list of available colors |
|
|
||||||
|
|
||||||
### Output the plot
|
See Quick Start for `count`.
|
||||||
|
|
||||||
* `-o`
|
| command | short | how it works |
|
||||||
* By default, the plot is output to **standard error output**.
|
|-----------|-------|----------------------------------------------------------|
|
||||||
* If you want to output to standard output, Use hyphen ` -o -` or no argument `uplot s -o | `.
|
| count | c | draw a barplot based on the number of occurrences (slow) |
|
||||||
|
|
||||||
### Output the input data
|
### What if the header line is included?
|
||||||
|
|
||||||
* `-O`
|
If your input data contains a header line, you need to specify the `-H` option.
|
||||||
* By default, the input data is not shown anywhere.
|
|
||||||
* If you want to pass the input data directly to the standard output, Use hyphen `-O -` or no argument `uplot s -O |`.
|
|
||||||
* This is useful when passing data to a subsequent pipeline.
|
|
||||||
|
|
||||||
### Header
|
### How to specify the delimiter?
|
||||||
|
|
||||||
* `-H`
|
Use the `-d` option. To specify a blank space, you can use `uplot bar -d ' ' data.txt`.
|
||||||
* If input data contains a header line, you need to specify the `-H` option.
|
You do not need to use `-d` option for tab-delimited text since the default value is tab.
|
||||||
|
|
||||||
### Delimiter
|
### Is there a way to specify a column as the x-axis or y-axis?
|
||||||
|
|
||||||
* `-d`
|
Not yet.
|
||||||
* You do not need to use `-d` option for tab-delimited text since the default value is tab.
|
YouPlot treats the first column as the X axis and the second column as the Y axis.
|
||||||
* To specify a blank space, you can use `uplot bar -d ' ' data.txt`.
|
When working with multiple series, the first column is the X axis, the second column is series Y1, the third column is series Y2, and so on.
|
||||||
|
If you pass only one column of data for `line` and `bar`, YouPlot will automatically use a sequential number starting from 1 as the X-axis.
|
||||||
|
|
||||||
### Real-time data
|
* `--fmt xyy` `--fmt xyxy` `--fmt yx` options give you a few more choices.
|
||||||
|
See `youplot <command> --help` for more details.
|
||||||
|
|
||||||
* `-p` `--progress`
|
* Use `awk '{print $2, $1}'` to swap lines.
|
||||||
* Experimental progressive mode is currently under development.
|
* Use `paste` to concatenate series.
|
||||||
* `ruby -e 'loop{puts rand(100)}' | uplot line --progress`
|
|
||||||
|
|
||||||
### Show detailed options for subcommands
|
### How to plot real-time data?
|
||||||
|
|
||||||
* `--help`
|
Experimental progressive mode is currently under development.
|
||||||
* The `--help` option will show more detailed options for each subcommand.
|
|
||||||
* `uplot hist --help`
|
|
||||||
|
|
||||||
### Set columns as x-axis or y-axis
|
```sh
|
||||||
|
ruby -e 'loop{puts rand(100)}' | uplot line --progress
|
||||||
* YouPlot treats the first column as the X axis and the second column as the Y axis. When working with multiple series, the first column is the X axis, the second column is series Y1, the third column is series Y2, and so on.
|
|
||||||
* If you pass only one column of data for `line` and `bar`, YouPlot will automatically use a sequential number starting from 1 as the X-axis.
|
|
||||||
|
|
||||||
* `--fmt`
|
|
||||||
* `--fmt xyy` `--fmt xyxy` `--fmt yx` options give you a few more choices. See `youplot <command> --help` for more details.
|
|
||||||
* The fmt option may be renamed in the future.
|
|
||||||
* The `-x` and `-y` options might be used to specify columns in the future.
|
|
||||||
|
|
||||||
* Use `awk '{print $2, $1}'` to swap columns. Use `paste` to concatenate series.
|
|
||||||
|
|
||||||
### Categorical data
|
|
||||||
|
|
||||||
* With GNU datamash, you can manage to handle categorized data.
|
|
||||||
* `cat test/fixtures/iris.csv | sed '/^$/d' | datamash --header-in --output-delimiter=: -t, -g5 collapse 3,4 | cut -f2-3 -d: | sed 's/:/\n/g' | uplot s -d, -T --fmt xyxy`
|
|
||||||
* This is not so easy...
|
|
||||||
|
|
||||||
### Time series
|
|
||||||
|
|
||||||
* Not yet supported.
|
|
||||||
|
|
||||||
### YouPlot Configuration (youplotrc)
|
|
||||||
|
|
||||||
You can specify default options in a configuration file in YAML format. For more information, enter the following command.
|
|
||||||
|
|
||||||
```
|
|
||||||
uplot --config
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tools that are useful to use with YouPlot
|
### How to view detailed command line options?
|
||||||
|
|
||||||
* [csvtk](https://github.com/shenwei356/csvtk)
|
Use `--help` to print command-specific options.
|
||||||
* [GNU datamash](https://www.gnu.org/software/datamash/)
|
|
||||||
* [awk](https://www.gnu.org/software/gawk/)
|
`uplot hist --help`
|
||||||
* [xsv](https://github.com/BurntSushi/xsv)
|
|
||||||
|
```
|
||||||
|
Usage: uplot histogram [options] <in.tsv>
|
||||||
|
|
||||||
|
Options for histogram:
|
||||||
|
--symbol VAL character to be used to plot the bars
|
||||||
|
--closed VAL side of the intervals to be closed [left]
|
||||||
|
-n, --nbins VAL approximate number of bins
|
||||||
|
|
||||||
|
Options:
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### How to view the list of available colors?
|
||||||
|
|
||||||
|
```sh
|
||||||
|
uplot colors
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@ -302,13 +248,8 @@ git clone https://github.com/your_name/YouPlot
|
|||||||
bundle install # Install the gem dependencies
|
bundle install # Install the gem dependencies
|
||||||
bundle exec rake test # Run the test
|
bundle exec rake test # Run the test
|
||||||
bundle exec rake install # Installation from source code
|
bundle exec rake install # Installation from source code
|
||||||
bundle exec exe/uplot # Run youplot (Try out the edited code)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Do you need commit rights to my repository?
|
|
||||||
Do you want to get admin rights and take over the project?
|
|
||||||
If so, please feel free to contact us.
|
|
||||||
|
|
||||||
### Acknowledgements
|
### Acknowledgements
|
||||||
|
|
||||||
* [sampo grafiikka](https://jypg.net/sampo_grafiikka) - Project logo creation
|
* [sampo grafiikka](https://jypg.net/sampo_grafiikka) - Project logo creation
|
||||||
|
@ -6,12 +6,6 @@ require_relative 'youplot/parameters'
|
|||||||
require_relative 'youplot/command'
|
require_relative 'youplot/command'
|
||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
# @run_as_executable = true / false
|
|
||||||
# YouPlot behaves slightly differently when run as a command line tool
|
|
||||||
# and when run as a script (e.g. for testing). In the event of an error,
|
|
||||||
# when run as a command line tool, YouPlot will display a short error message
|
|
||||||
# and exit abnormally. When run as a script, it will just raise an error.
|
|
||||||
@run_as_executable = false
|
|
||||||
class << self
|
class << self
|
||||||
attr_accessor :run_as_executable
|
attr_accessor :run_as_executable
|
||||||
|
|
||||||
@ -19,4 +13,5 @@ module YouPlot
|
|||||||
@run_as_executable
|
@run_as_executable
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@run_as_executable = false
|
||||||
end
|
end
|
||||||
|
@ -6,27 +6,6 @@
|
|||||||
require_relative 'processing'
|
require_relative 'processing'
|
||||||
require 'unicode_plot'
|
require 'unicode_plot'
|
||||||
|
|
||||||
# If the line color is specified as a number, the program will display an error
|
|
||||||
# message to the user and exit. Remove this patch when UnicodePlot is improved.
|
|
||||||
|
|
||||||
module UnicodePlot
|
|
||||||
class << self
|
|
||||||
alias lineplot_original lineplot
|
|
||||||
def lineplot(*args, **kw)
|
|
||||||
if kw[:color].is_a? Numeric
|
|
||||||
warn <<~EOS
|
|
||||||
YouPlot: Line colors cannot be specified by numerical values.
|
|
||||||
|
|
||||||
For more information, please see the following issue.
|
|
||||||
https://github.com/red-data-tools/unicode_plot.rb/issues/34
|
|
||||||
EOS
|
|
||||||
YouPlot.run_as_executable ? exit(1) : raise(Error)
|
|
||||||
end
|
|
||||||
lineplot_original(*args, **kw)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
# plotting functions.
|
# plotting functions.
|
||||||
module Backends
|
module Backends
|
||||||
@ -127,10 +106,11 @@ module YouPlot
|
|||||||
|
|
||||||
def plot_xyxy(data, method1, params)
|
def plot_xyxy(data, method1, params)
|
||||||
headers = data.headers
|
headers = data.headers
|
||||||
series2 = data.series
|
series = data.series
|
||||||
.map { |s| s.map(&:to_f) }
|
|
||||||
.each_slice(2).to_a
|
|
||||||
method2 = get_method2(method1)
|
method2 = get_method2(method1)
|
||||||
|
series.map! { |s| s.map(&:to_f) }
|
||||||
|
series2 = series.each_slice(2).to_a
|
||||||
|
series = nil
|
||||||
params.name ||= headers[0] if headers
|
params.name ||= headers[0] if headers
|
||||||
params.xlim ||= series2.map(&:first).flatten.minmax # why need?
|
params.xlim ||= series2.map(&:first).flatten.minmax # why need?
|
||||||
params.ylim ||= series2.map(&:last).flatten.minmax # why need?
|
params.ylim ||= series2.map(&:last).flatten.minmax # why need?
|
||||||
@ -202,7 +182,7 @@ module YouPlot
|
|||||||
series = data.series
|
series = data.series
|
||||||
if series.size == 1
|
if series.size == 1
|
||||||
warn <<~EOS
|
warn <<~EOS
|
||||||
YouPlot: There is only one series of input data. Please check the delimiter.
|
youplot: There is only one series of input data. Please check the delimiter.
|
||||||
|
|
||||||
Headers: \e[35m#{data.headers.inspect}\e[0m
|
Headers: \e[35m#{data.headers.inspect}\e[0m
|
||||||
The first item is: \e[35m\"#{series[0][0]}\"\e[0m
|
The first item is: \e[35m\"#{series[0][0]}\"\e[0m
|
||||||
|
@ -63,15 +63,9 @@ module YouPlot
|
|||||||
# normal mode
|
# normal mode
|
||||||
else
|
else
|
||||||
# Sometimes the input file does not end with a newline code.
|
# Sometimes the input file does not end with a newline code.
|
||||||
begin
|
while (input = Kernel.gets(nil))
|
||||||
begin
|
|
||||||
input = Kernel.gets(nil)
|
|
||||||
rescue Errno::ENOENT => e
|
|
||||||
warn e.message
|
|
||||||
next
|
|
||||||
end
|
|
||||||
main(input)
|
main(input)
|
||||||
end until input
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -141,12 +135,7 @@ module YouPlot
|
|||||||
rescue CSV::MalformedCSVError => e
|
rescue CSV::MalformedCSVError => e
|
||||||
warn 'Failed to parse the text. '
|
warn 'Failed to parse the text. '
|
||||||
warn 'Please try to set the correct character encoding with --encoding option.'
|
warn 'Please try to set the correct character encoding with --encoding option.'
|
||||||
warn e.backtrace.grep(/youplot/).first
|
raise e
|
||||||
exit 1
|
|
||||||
rescue ArgumentError => e
|
|
||||||
warn 'Failed to parse the text. '
|
|
||||||
warn e.backtrace.grep(/youplot/).first
|
|
||||||
exit 1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
data
|
data
|
||||||
@ -160,9 +149,9 @@ module YouPlot
|
|||||||
@backend.barplot(data, params, count: true, reverse: options[:reverse])
|
@backend.barplot(data, params, count: true, reverse: options[:reverse])
|
||||||
when :hist, :histogram
|
when :hist, :histogram
|
||||||
@backend.histogram(data, params)
|
@backend.histogram(data, params)
|
||||||
when :line, :lineplot, :l
|
when :line, :lineplot
|
||||||
@backend.line(data, params, options[:fmt])
|
@backend.line(data, params, options[:fmt])
|
||||||
when :lines, :lineplots, :ls
|
when :lines, :lineplots
|
||||||
@backend.lines(data, params, options[:fmt])
|
@backend.lines(data, params, options[:fmt])
|
||||||
when :scatter, :s
|
when :scatter, :s
|
||||||
@backend.scatter(data, params, options[:fmt])
|
@backend.scatter(data, params, options[:fmt])
|
||||||
@ -180,7 +169,7 @@ module YouPlot
|
|||||||
def output_data(input)
|
def output_data(input)
|
||||||
# Pass the input to subsequent pipelines
|
# Pass the input to subsequent pipelines
|
||||||
case options[:pass]
|
case options[:pass]
|
||||||
when IO, StringIO
|
when IO
|
||||||
options[:pass].print(input)
|
options[:pass].print(input)
|
||||||
else
|
else
|
||||||
if options[:pass]
|
if options[:pass]
|
||||||
|
@ -9,8 +9,7 @@ module YouPlot
|
|||||||
class Error < StandardError; end
|
class Error < StandardError; end
|
||||||
|
|
||||||
attr_reader :command, :options, :params,
|
attr_reader :command, :options, :params,
|
||||||
:main_parser, :sub_parser,
|
:main_parser, :sub_parser
|
||||||
:config_file, :config
|
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@command = nil
|
@command = nil
|
||||||
@ -31,61 +30,6 @@ module YouPlot
|
|||||||
@params = Parameters.new
|
@params = Parameters.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def apply_config_file
|
|
||||||
return if !config_file && find_config_file.nil?
|
|
||||||
|
|
||||||
read_config_file
|
|
||||||
configure
|
|
||||||
end
|
|
||||||
|
|
||||||
def config_file_candidate_paths
|
|
||||||
# keep the order of the paths
|
|
||||||
paths = []
|
|
||||||
paths << ENV['MYYOUPLOTRC'] if ENV['MYYOUPLOTRC']
|
|
||||||
paths << '.youplot.yml'
|
|
||||||
paths << '.youplotrc'
|
|
||||||
if ENV['HOME']
|
|
||||||
paths << File.join(ENV['HOME'], '.youplotrc')
|
|
||||||
paths << File.join(ENV['HOME'], '.youplot.yml')
|
|
||||||
paths << File.join(ENV['HOME'], '.config', 'youplot', 'youplotrc')
|
|
||||||
paths << File.join(ENV['HOME'], '.config', 'youplot', 'youplot.yml')
|
|
||||||
end
|
|
||||||
paths
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_config_file
|
|
||||||
config_file_candidate_paths.each do |file|
|
|
||||||
path = File.expand_path(file)
|
|
||||||
next unless File.exist?(path)
|
|
||||||
|
|
||||||
@config_file = path
|
|
||||||
ENV['MYYOUPLOTRC'] = path
|
|
||||||
return @config_file
|
|
||||||
end
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def read_config_file
|
|
||||||
require 'yaml'
|
|
||||||
@config = YAML.load_file(config_file)
|
|
||||||
end
|
|
||||||
|
|
||||||
def configure
|
|
||||||
option_members = @options.members
|
|
||||||
param_members = @params.members
|
|
||||||
# It would be more useful to be able to configure by plot type
|
|
||||||
config.each do |k, v|
|
|
||||||
k = k.to_sym
|
|
||||||
if option_members.include?(k)
|
|
||||||
@options[k] ||= v
|
|
||||||
elsif param_members.include?(k)
|
|
||||||
@params[k] ||= v
|
|
||||||
else
|
|
||||||
raise Error, "Unknown option/param in config file: #{k}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_base_parser
|
def create_base_parser
|
||||||
OptionParser.new do |parser|
|
OptionParser.new do |parser|
|
||||||
parser.program_name = 'YouPlot'
|
parser.program_name = 'YouPlot'
|
||||||
@ -114,10 +58,10 @@ module YouPlot
|
|||||||
parser.on('-t', '--title STR', String, 'print string on the top of plot') do |v|
|
parser.on('-t', '--title STR', String, 'print string on the top of plot') do |v|
|
||||||
params.title = v
|
params.title = v
|
||||||
end
|
end
|
||||||
parser.on('--xlabel STR', String, 'print string on the bottom of the plot') do |v|
|
parser.on('-x', '--xlabel STR', String, 'print string on the bottom of the plot') do |v|
|
||||||
params.xlabel = v
|
params.xlabel = v
|
||||||
end
|
end
|
||||||
parser.on('--ylabel STR', String, 'print string on the far left of the plot') do |v|
|
parser.on('-y', '--ylabel STR', String, 'print string on the far left of the plot') do |v|
|
||||||
params.ylabel = v
|
params.ylabel = v
|
||||||
end
|
end
|
||||||
parser.on('-w', '--width INT', Numeric, 'number of characters per row') do |v|
|
parser.on('-w', '--width INT', Numeric, 'number of characters per row') do |v|
|
||||||
@ -151,7 +95,7 @@ module YouPlot
|
|||||||
parser.on('-M', '--monochrome', TrueClass, 'no colouring even if writing to a tty') do |_v|
|
parser.on('-M', '--monochrome', TrueClass, 'no colouring even if writing to a tty') do |_v|
|
||||||
UnicodePlot::IOContext.define_method(:color?) { false } # FIXME
|
UnicodePlot::IOContext.define_method(:color?) { false } # FIXME
|
||||||
end
|
end
|
||||||
parser.on('--encoding STR', String, 'specify the input encoding') do |v|
|
parser.on('--encoding STR', String, 'Specify the input encoding') do |v|
|
||||||
options[:encoding] = v
|
options[:encoding] = v
|
||||||
end
|
end
|
||||||
# Optparse adds the help option, but it doesn't show up in usage.
|
# Optparse adds the help option, but it doesn't show up in usage.
|
||||||
@ -160,9 +104,6 @@ module YouPlot
|
|||||||
puts parser.help
|
puts parser.help
|
||||||
exit if YouPlot.run_as_executable?
|
exit if YouPlot.run_as_executable?
|
||||||
end
|
end
|
||||||
parser.on('--config FILE', 'specify a config file') do |v|
|
|
||||||
@config_file = v
|
|
||||||
end
|
|
||||||
parser.on('--debug', TrueClass, 'print preprocessed data') do |v|
|
parser.on('--debug', TrueClass, 'print preprocessed data') do |v|
|
||||||
options[:debug] = v
|
options[:debug] = v
|
||||||
end
|
end
|
||||||
@ -189,12 +130,12 @@ module YouPlot
|
|||||||
scatter s draw a scatter plot
|
scatter s draw a scatter plot
|
||||||
density d draw a density plot
|
density d draw a density plot
|
||||||
boxplot box draw a horizontal boxplot
|
boxplot box draw a horizontal boxplot
|
||||||
count c draw a barplot based on the number of
|
|
||||||
occurrences (slow)
|
|
||||||
colors color show the list of available colors
|
colors color show the list of available colors
|
||||||
|
|
||||||
|
count c draw a baplot based on the number of
|
||||||
|
occurrences (slow)
|
||||||
|
|
||||||
General options:
|
General options:
|
||||||
--config print config file info
|
|
||||||
--help print command specific help menu
|
--help print command specific help menu
|
||||||
--version print the version of YouPlot
|
--version print the version of YouPlot
|
||||||
MSG
|
MSG
|
||||||
@ -202,36 +143,10 @@ module YouPlot
|
|||||||
# Help for the main parser is simple.
|
# Help for the main parser is simple.
|
||||||
# Simply show the banner above.
|
# Simply show the banner above.
|
||||||
main_parser.on('--help', 'print sub-command help menu') do
|
main_parser.on('--help', 'print sub-command help menu') do
|
||||||
show_main_help
|
puts main_parser.banner
|
||||||
|
puts
|
||||||
|
exit if YouPlot.run_as_executable?
|
||||||
end
|
end
|
||||||
|
|
||||||
main_parser.on('--config', 'show config file info') do
|
|
||||||
show_config_info
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show_main_help(out = $stdout)
|
|
||||||
out.puts main_parser.banner
|
|
||||||
out.puts
|
|
||||||
exit if YouPlot.run_as_executable?
|
|
||||||
end
|
|
||||||
|
|
||||||
def show_config_info
|
|
||||||
if ENV['MYYOUPLOTRC']
|
|
||||||
puts "config file : #{ENV['MYYOUPLOTRC']}"
|
|
||||||
puts config.inspect
|
|
||||||
else
|
|
||||||
puts <<~EOS
|
|
||||||
Configuration file not found.
|
|
||||||
It should be a YAML file, like this example:
|
|
||||||
width : 40
|
|
||||||
height : 20
|
|
||||||
By default, YouPlot will look for the configuration file in these locations:
|
|
||||||
#{config_file_candidate_paths.map { |s| ' ' + s }.join("\n")}
|
|
||||||
If you have the file elsewhere, you can specify its location with the `MYYOUPLOTRC` environment variable.
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
exit if YouPlot.run_as_executable?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def sub_parser_add_symbol
|
def sub_parser_add_symbol
|
||||||
@ -301,13 +216,10 @@ module YouPlot
|
|||||||
case command
|
case command
|
||||||
|
|
||||||
# If you type only `uplot` in the terminal.
|
# If you type only `uplot` in the terminal.
|
||||||
# Output help to standard error output.
|
|
||||||
when nil
|
when nil
|
||||||
show_main_help($stderr)
|
warn main_parser.banner
|
||||||
|
warn "\n"
|
||||||
# Output help to standard output.
|
exit 1 if YouPlot.run_as_executable?
|
||||||
when :help
|
|
||||||
show_main_help
|
|
||||||
|
|
||||||
when :barplot, :bar
|
when :barplot, :bar
|
||||||
sub_parser_add_symbol
|
sub_parser_add_symbol
|
||||||
@ -330,14 +242,14 @@ module YouPlot
|
|||||||
params.nbins = v
|
params.nbins = v
|
||||||
end
|
end
|
||||||
|
|
||||||
when :lineplot, :line, :l
|
when :lineplot, :line
|
||||||
sub_parser_add_canvas
|
sub_parser_add_canvas
|
||||||
sub_parser_add_grid
|
sub_parser_add_grid
|
||||||
sub_parser_add_fmt_yx
|
sub_parser_add_fmt_yx
|
||||||
sub_parser_add_ylim
|
sub_parser_add_ylim
|
||||||
sub_parser_add_xlim
|
sub_parser_add_xlim
|
||||||
|
|
||||||
when :lineplots, :lines, :ls
|
when :lineplots, :lines
|
||||||
sub_parser_add_canvas
|
sub_parser_add_canvas
|
||||||
sub_parser_add_grid
|
sub_parser_add_grid
|
||||||
sub_parser_add_fmt_xyxy
|
sub_parser_add_fmt_xyxy
|
||||||
@ -366,19 +278,14 @@ module YouPlot
|
|||||||
options[:color_names] = v
|
options[:color_names] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
# Currently it simply displays the configuration file,
|
|
||||||
# but in the future this may be changed to open a text editor like Vim
|
|
||||||
# to edit the configuration file.
|
|
||||||
when :config
|
|
||||||
show_config_info
|
|
||||||
|
|
||||||
else
|
else
|
||||||
error_message = "YouPlot: unrecognized command '#{command}'"
|
error_message = "uplot: unrecognized command '#{command}'"
|
||||||
raise Error, error_message unless YouPlot.run_as_executable?
|
if YouPlot.run_as_executable?
|
||||||
|
warn error_message
|
||||||
warn error_message
|
exit 1
|
||||||
exit 1
|
else
|
||||||
|
raise Error, error_message
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -386,7 +293,7 @@ module YouPlot
|
|||||||
begin
|
begin
|
||||||
create_main_parser.order!(argv)
|
create_main_parser.order!(argv)
|
||||||
rescue OptionParser::ParseError => e
|
rescue OptionParser::ParseError => e
|
||||||
warn "YouPlot: #{e.message}"
|
warn "uplot: #{e.message}"
|
||||||
exit 1 if YouPlot.run_as_executable?
|
exit 1 if YouPlot.run_as_executable?
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -395,14 +302,7 @@ module YouPlot
|
|||||||
begin
|
begin
|
||||||
create_sub_parser&.parse!(argv)
|
create_sub_parser&.parse!(argv)
|
||||||
rescue OptionParser::ParseError => e
|
rescue OptionParser::ParseError => e
|
||||||
warn "YouPlot: #{e.message}"
|
warn "uplot: #{e.message}"
|
||||||
exit 1 if YouPlot.run_as_executable?
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
apply_config_file
|
|
||||||
rescue StandardError => e
|
|
||||||
warn "YouPlot: #{e.message}"
|
|
||||||
exit 1 if YouPlot.run_as_executable?
|
exit 1 if YouPlot.run_as_executable?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
VERSION = '0.4.6'
|
VERSION = '0.4.2'
|
||||||
end
|
end
|
||||||
|
@ -69,12 +69,6 @@ class YouPlotIRISTest < Test::Unit::TestCase
|
|||||||
assert_equal fixture('iris-lineplot.txt'), @stderr_file.read
|
assert_equal fixture('iris-lineplot.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
# l is an undocumented alias of lineplot.
|
|
||||||
test :l do
|
|
||||||
YouPlot::Command.new(['l', '-H', '-d,', '-t', 'IRIS-LINEPLOT']).run
|
|
||||||
assert_equal fixture('iris-lineplot.txt'), @stderr_file.read
|
|
||||||
end
|
|
||||||
|
|
||||||
test :lineplots do
|
test :lineplots do
|
||||||
YouPlot::Command.new(['lineplots', '-H', '-d,', '-t', 'IRIS-LINEPLOTS']).run
|
YouPlot::Command.new(['lineplots', '-H', '-d,', '-t', 'IRIS-LINEPLOTS']).run
|
||||||
assert_equal fixture('iris-lineplots.txt'), @stderr_file.read
|
assert_equal fixture('iris-lineplots.txt'), @stderr_file.read
|
||||||
@ -85,12 +79,6 @@ class YouPlotIRISTest < Test::Unit::TestCase
|
|||||||
assert_equal fixture('iris-lineplots.txt'), @stderr_file.read
|
assert_equal fixture('iris-lineplots.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
# ls is an undocumented alias of lineplots.
|
|
||||||
test :ls do
|
|
||||||
YouPlot::Command.new(['lines', '-H', '-d,', '-t', 'IRIS-LINEPLOTS']).run
|
|
||||||
assert_equal fixture('iris-lineplots.txt'), @stderr_file.read
|
|
||||||
end
|
|
||||||
|
|
||||||
test :scatter do
|
test :scatter do
|
||||||
YouPlot::Command.new(['scatter', '-H', '-d,', '-t', 'IRIS-SCATTER']).run
|
YouPlot::Command.new(['scatter', '-H', '-d,', '-t', 'IRIS-SCATTER']).run
|
||||||
assert_equal fixture('iris-scatter.txt'), @stderr_file.read
|
assert_equal fixture('iris-scatter.txt'), @stderr_file.read
|
||||||
|
@ -155,11 +155,21 @@ class YouPlotSimpleTest < Test::Unit::TestCase
|
|||||||
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test :line_x do
|
||||||
|
YouPlot::Command.new(['line', '-x', 'X-LABEL']).run
|
||||||
|
assert_equal fixture('simple-lineplot-xlabel.txt'), @stderr_file.read
|
||||||
|
end
|
||||||
|
|
||||||
test :line_ylabel do
|
test :line_ylabel do
|
||||||
YouPlot::Command.new(['line', '--ylabel', 'Y-LABEL']).run
|
YouPlot::Command.new(['line', '--ylabel', 'Y-LABEL']).run
|
||||||
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test :line_y do
|
||||||
|
YouPlot::Command.new(['line', '-y', 'Y-LABEL']).run
|
||||||
|
assert_equal fixture('simple-lineplot-ylabel.txt'), @stderr_file.read
|
||||||
|
end
|
||||||
|
|
||||||
test :line_width do
|
test :line_width do
|
||||||
YouPlot::Command.new(['line', '--width', '17']).run
|
YouPlot::Command.new(['line', '--width', '17']).run
|
||||||
assert_equal fixture('simple-lineplot-width-17.txt'), @stderr_file.read
|
assert_equal fixture('simple-lineplot-width-17.txt'), @stderr_file.read
|
||||||
|
@ -12,13 +12,17 @@ Gem::Specification.new do |spec|
|
|||||||
spec.description = 'A command line tool for Unicode Plotting'
|
spec.description = 'A command line tool for Unicode Plotting'
|
||||||
spec.homepage = 'https://github.com/red-data-tools/YouPlot'
|
spec.homepage = 'https://github.com/red-data-tools/YouPlot'
|
||||||
spec.license = 'MIT'
|
spec.license = 'MIT'
|
||||||
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
||||||
|
|
||||||
spec.files = Dir['*.{md,txt}', '{lib,exe}/**/*']
|
spec.files = Dir['*.{md,txt}', '{lib,exe}/**/*']
|
||||||
spec.bindir = 'exe'
|
spec.bindir = 'exe'
|
||||||
spec.executables = %w[uplot youplot]
|
spec.executables = %w[uplot youplot]
|
||||||
spec.require_paths = ['lib']
|
spec.require_paths = ['lib']
|
||||||
|
|
||||||
spec.add_dependency 'csv'
|
spec.add_runtime_dependency 'unicode_plot'
|
||||||
spec.add_dependency 'unicode_plot', '>= 0.0.5'
|
spec.add_development_dependency 'bundler'
|
||||||
|
spec.add_development_dependency 'rake'
|
||||||
|
spec.add_development_dependency 'rubocop'
|
||||||
|
spec.add_development_dependency 'simplecov'
|
||||||
|
spec.add_development_dependency 'test-unit'
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user