Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jun 28, 2021
0 parents commit ee801db
Show file tree
Hide file tree
Showing 16 changed files with 6,468 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
coverage

**/*.js
**/*.d.ts
**/*.js.map

test/test-packages/**/*.ts
test/data/
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname, // this is the reason this is a .js file
project: ['./tsconfig.eslint.json'],
},
extends: [
'@rubensworks'
],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'interface',
'format': ['PascalCase'],
'custom': {
'regex': '^[A-Z]',
'match': true
}
}
],
}
};
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI
on: [push, pull_request]
jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-lint-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: yarn install
- run: yarn run lint

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version:
- 12.x
- 14.x
- 16.x
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Ensure line endings are consistent
run: git config --global core.autocrlf input
- name: Check out repository
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-test-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Build project
run: yarn run build
- name: Run tests
run: yarn run test
- name: Submit coverage results
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true

coveralls:
needs: test
runs-on: ubuntu-latest
steps:
- name: Consolidate test coverage from different jobs
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules
.idea
lerna-debug.log
yarn-error.log
**/lib/**/*.js
**/lib/**/*.js.map
**/lib/**/*.d.ts
**/test/**/*.js
**/test/**/*.js.map
**/test/**/*.d.ts
**/bin/**/*.js
**/bin/**/*.js.map
**/bin/**/*.d.ts
**/index.js
**/index.js.map
**/index.d.ts
coverage
documentation
.eslintcache
queries
output.csv
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog
All notable changes to this project will be documented in this file.

<a name="v1.0.0"></a>
## [v1.0.0] - 2021-06-28

Initial release
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright © 2021–now Ruben Taelman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Process SPARQL Benchmark Results

[![Build status](https://github.com/rubensworks/process-sparql-benchmark-results.js/workflows/CI/badge.svg)](https://github.com/rubensworks/process-sparql-benchmark-results.js/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/rubensworks/process-sparql-benchmark-results.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/process-sparql-benchmark-results.js?branch=master)
[![npm version](https://badge.fury.io/js/@rubensworks/sparql-benchmark-runner.svg)](https://www.npmjs.com/package/@rubensworks/sparql-benchmark-runner)

TODO

## Installation

```bash
$ npm install -g @rubensworks/sparql-benchmark-runner
```

or

```bash
$ yarn global add @rubensworks/sparql-benchmark-runner
```

## Usage

TODO

## License
This code is copyrighted by [Ghent University – imec](http://idlab.ugent.be/)
and released under the [MIT license](http://opensource.org/licenses/MIT).
2 changes: 2 additions & 0 deletions bin/psbr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./psbr.js')
3 changes: 3 additions & 0 deletions bin/psbr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
import { runCli } from '../lib/cli/CliRunner';
runCli(process.cwd(), process.argv);
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/cli/CliRunner';
16 changes: 16 additions & 0 deletions lib/cli/CliRunner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';

export function runCli(cwd: string, argv: string[]): void {
const { argv: params } = yargs(hideBin(argv))
.options({
verbose: {
type: 'boolean',
alias: 'v',
describe: 'If more logging output should be generated',
},
})
.commandDir('commands')
.demandCommand()
.help();
}
98 changes: 98 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"name": "@rubensworks/process-sparql-benchmark-results",
"version": "1.0.0",
"description": "Personal tools to post-process query results from SPARQL benchmarks",
"repository": "https://github.com/rubensworks/process-sparql-benchmark-results.js",
"keywords": [
"sparql",
"benchmark",
"runner"
],
"license": "MIT",
"bin": {
"psbr": "./bin/psbr"
},
"bugs": {
"url": "https://github.com/rubensworks/process-sparql-benchmark-results.js/issues"
},
"homepage": "https://github.com/rubensworks/process-sparql-benchmark-results.js#readme",
"main": "index.js",
"typings": "index",
"files": [
"bin/**/*.d.ts",
"bin/**/*.js",
"lib/**/*.d.ts",
"bin/psbr",
"lib/**/*.js",
"lib/**/*.json",
"index.d.ts",
"index.ts"
],
"scripts": {
"build": "tsc",
"test": "jest ${1}",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"lint": "eslint . --ext .ts --cache",
"prepare": "npm run build",
"version": "manual-git-changelog onversion"
},
"husky": {
"hooks": {
"pre-commit": "npm run build && npm run lint && npm run test"
}
},
"jest": {
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.json"
}
},
"transform": {
"^.+\\.ts$": "ts-jest"
},
"testRegex": "/test/.*-test.ts$",
"moduleFileExtensions": [
"ts",
"js"
],
"collectCoverage": true,
"coveragePathIgnorePatterns": [
"test"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"dependencies": {
"@types/yargs": "^16.0.1",
"yargs": "^16.2.0"
},
"devDependencies": {
"@rubensworks/eslint-config": "^1.0.1",
"@types/jest": "^26.0.0",
"@types/node": "^14.14.7",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.1.1",
"coveralls": "^3.0.0",
"eslint": "^7.9.0",
"eslint-config-es": "^3.23.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-tsdoc": "^0.2.7",
"eslint-plugin-unused-imports": "^0.1.3",
"fs-extra": "^9.0.0",
"husky": "^4.2.5",
"jest": "^26.6.3",
"jest-extended": "^0.11.2",
"manual-git-changelog": "^1.0.1",
"streamify-array": "^1.0.1",
"ts-jest": "^26.4.3",
"typescript": "^4.2.4"
}
}
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"github>rubensworks/renovate-presets:js"
]
}
12 changes: 12 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"include": [
"index.ts",
"lib/**/*.ts",
"test/**/*.ts",
"bin/**/*.ts"
],
"exclude": [
"**/node_modules"
]
}
28 changes: 28 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"compileOnSave": true,
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"target": "es2017",
"noImplicitAny": true,
"removeComments": false,
"preserveConstEnums": true,
"sourceMap": true,
"inlineSources": true,
"declaration": true,
"importHelpers": false,
"strict": true
},
"include": [
"index.ts",
"bin/**/*",
"lib/**/*"
],
"exclude": [
"**/node_modules",
"**/test/*"
]
}

0 comments on commit ee801db

Please sign in to comment.