Skip to content

Commit

Permalink
Merge pull request #172 from unipept/next
Browse files Browse the repository at this point in the history
Reimplement the CLI in TypeScript
  • Loading branch information
bmesuere authored Nov 28, 2024
2 parents 5fd591f + 1096d2e commit c7b0a12
Show file tree
Hide file tree
Showing 137 changed files with 7,105 additions and 6,513 deletions.
18 changes: 0 additions & 18 deletions .devcontainer/devcontainer.json

This file was deleted.

5 changes: 0 additions & 5 deletions .document

This file was deleted.

46 changes: 26 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,38 @@ name: CI
on: [push]

jobs:
test:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2"]
fail-fast: false
name: Test Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Test
node-version: 22.x
cache: yarn
- name: Install dependencies
run: |
bundle exec rake test
lint:
name: Lint
yarn install
- name: Lint
run: |
yarn lint
- name: Type check
run: |
yarn typecheck
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
bundler-cache: true
node-version: 22.x
cache: yarn
- name: Install dependencies
run: |
yarn install
- name: Test
run: |
bundle exec rake test_style
yarn test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ pkg

# For rubinius:
#*.rbc

node_modules/**
dist/**
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
7 changes: 0 additions & 7 deletions .rakeTasks

This file was deleted.

43 changes: 0 additions & 43 deletions .rubocop.yml

This file was deleted.

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

34 changes: 0 additions & 34 deletions .vscode/tasks.json

This file was deleted.

18 changes: 0 additions & 18 deletions Gemfile

This file was deleted.

109 changes: 0 additions & 109 deletions Gemfile.lock

This file was deleted.

23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
# unipept-cli

[![Gem Version](https://badge.fury.io/rb/unipept.svg)](http://badge.fury.io/rb/unipept)
![NPM Version](https://img.shields.io/npm/v/unipept-cli)

Unipept-cli offers a command line interface to the [Unipept](http://unipept.ugent.be) web service.
Documentation about the web service can be found at [http://unipept.ugent.be/apidocs](http://unipept.ugent.be/apidocs), documentation about the command line tools at [http://unipept.ugent.be/clidocs](http://unipept.ugent.be/clidocs).

## Installation

To use the Unipept CLI, Ruby version 2.7 or higher needs to be installed. You can check this by running `ruby -v` on the commandline:
To use the Unipept CLI, node 22 or higher needs to be installed. You can check this by running `node -v` on the commandline:

```
$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin21]
$ node -v
v22.3.0
```

More information on installing Ruby can be found at https://www.ruby-lang.org/en/installation/
More information on installing Node can be found at https://nodejs.org/en/download/package-manager

The Unipept CLI is available as a _gem_. This means it can easily be installed with the following command:
The Unipept CLI is available as an npm package. This means it can easily be installed with the following command:

```bash
$ gem install unipept
Successfully installed unipept-1.0.1
Parsing documentation for unipept-1.0.1
Done installing documentation for unipept after 0 seconds
1 gem installed
$ npm install -g unipept-cli
added 3 packages in 986ms
```

After successful installation, the unipept command should be available:

```bash
$ unipept -v
1.0.1
$ unipept --version
4.0.0
```

The help can be accessed by running `unipept -h`.
Loading

0 comments on commit c7b0a12

Please sign in to comment.