Skip to content

Commit

Permalink
Initialize monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Mar 21, 2024
0 parents commit 2df773c
Show file tree
Hide file tree
Showing 61 changed files with 14,095 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .componentsjs-generator-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"source": "lib",
"ignorePackagePaths": [
"engines/query-sparql-hdt"
],
"ignoreComponents": [

],
"modulePrefix": {}
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
coverage

**/*.js
**/*.d.ts
**/*.js.map
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#### Issue type:

_Only keep the issue types that are applicable._

- :bug: Bug
- :heavy_plus_sign: Feature request
- :snail: Performance issue
- :question: Question

#### Description:

____
#### Environment:

_Exact versions of the software in your environment, not just *latest*. Only needed for :bug: and :snail:._

| software | version(s)
| ------------------- | -------
| Comunica Init Actor | <!-- In most cases, this will be the version of `@comunica/actor-init-sparql` -->
| Comunica | <!-- Only needed if you installed Comunica by cloning this repo -->
| node |
| npm | <!-- Only if installed using npm -->
| yarn | <!-- Only if installed using yarn -->
| Operating System |
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "🐛 Bug report"
about: If something is not working as expected or crashes

---

#### Issue type:

- :bug: Bug <!--Don't change this issue type!-->

____
#### Description:

<!--A clear and concise description of what the bug is.-->

____
#### Environment:

<!--Output of the `comunica-sparql -v` command.-->
<!--If running in a development environment, this must be the output of `node ./packages/actor-init-sparql/bin/query.js -v`-->

#### Crash log:

<!--Only required for crashes.-->
<!--Don't paste contents here directly, but use something like http://pastebin.com/-->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "➕ Feature request"
about: Suggest an idea for this project

---

#### Issue type:

- :heavy_plus_sign: Feature request <!--Don't change this issue type!-->

____
#### Description:

<!--A clear and concise description of what you want to happen.-->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/Performance_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "🐌 Performance issue"
about: An issue with the performance, such as abnormally slow queries.

---

#### Issue type:

- :snail: Performance issue <!--Don't change this issue type!-->

____
#### Description:

<!--A clear and concise description of what the issue is.-->

____
#### Environment:

<!--Output of the `comunica-sparql -v` command.-->
<!--If running in a development environment, this must be the output of `node ./packages/actor-init-sparql/bin/query.js -v`-->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "❓ Question"
about: A general question

---

#### Issue type:

- :question: Question <!--Don't change this issue type!-->

____
#### Question:

<!--A clear and concisely formulated question.-->
6 changes: 6 additions & 0 deletions .github/get-next-alpha-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Obtain the next alpha version id of Comunica
latest=$(yarn tag list @comunica/actor-http-inrupt-solid-client-authn | grep "next:" | sed "s/^.*next: \(.*\)$/\1/")
latest_id=$(echo $latest | sed "s/^.*-alpha\.\(.*\)\.0$/\1/")
next_id=$(($latest_id+1))
echo $next_id
21 changes: 21 additions & 0 deletions .github/issue-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
labels:
- name: "bug 🐛"
labeled:
issue:
body: Thanks for reporting!
- name: "feature ➕"
labeled:
issue:
body: Thanks for the suggestion!
- name: "performance 🐌"
labeled:
issue:
body: Thanks for reporting!
- name: "question ❓"
labeled:
issue:
body: Someone will answer your question soon. In the meantime, you might be able to get help more quickly on our [Gitter channel](https://gitter.im/comunica/Lobby).
- name: invalid-template
labeled:
issue:
body: '@{{ issue.user.login }} Your issue appears to be not following one of the allowed issue templates, which breaks our automation tools. Please update your issue to the proper template.'
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bug 🐛:
- '- :bug: Bug'
feature ➕:
- '- :heavy_plus_sign: Feature request'
performance 🐌:
- '- :snail: Performance issue'
question ❓:
- '- :question: Question'
20 changes: 20 additions & 0 deletions .github/typedoc-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

typedocjson='{
"extends": [
"../../typedoc.base.json"
],
"entryPoints": [
"lib/index.ts"
]
}'

for package in packages/* engines/*; do
tdpath="$package/typedoc.json"
indexpath="$package/lib/index.ts"
if [[ "$1" = "create" && -f "$indexpath" ]]; then
echo "$typedocjson" > "$tdpath"
elif [[ "$1" = "remove" && -f "$tdpath" ]]; then
rm "$tdpath"
fi
done
130 changes: 130 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: "CI"
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version:
- 16.x
- 18.x
- 20.x
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
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@v3
- name: Load cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-test-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: Build project
run: yarn run build
- name: Run tests
run: yarn run test-ci
- 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

lint:
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-lint-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: Run linter
run: yarn run lint

docker:
needs:
- test
- lint
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-docker-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: Install Lerna Docker
run: sh -c "`curl -fsSl https://raw.githubusercontent.com/rubensworks/lerna-docker/master/install.sh`"
- name: Build Docker images
run: ~/.lerna-docker/bin/lerna-docker comunica build
- name: Deploy Docker images
if: startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
run: ~/.lerna-docker/bin/lerna-docker comunica push
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

docs:
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-docs-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: Build docs
run: yarn run doc
- name: Deploy TSDoc to GitHub Pages
if: startsWith(github.ref, 'refs/heads/master')
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: documentation
clean: true
24 changes: 24 additions & 0 deletions .github/workflows/close-issues-no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Close issues that received no response"
on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "more-information-needed"
stale-issue-message: 'This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we do not have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.'
days-before-close: 14
days-before-stale: -1
- uses: actions/stale@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
only-labels: "invalid-template"
stale-issue-label: "invalid-template"
stale-issue-message: 'This issue has been automatically closed because it does not follow the issue template. Feel free to recreate this issue'
days-before-close: 7
days-before-stale: -1
24 changes: 24 additions & 0 deletions .github/workflows/issue-label-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Comment on issues by label"
on:
issues:
types: [labeled]

jobs:
comment:
runs-on: ubuntu-18.04
steps:
- name: get comment count
id: getCommentCount
env:
comments: ${{ github.event.issue.comments }}
run: |
echo "$comments"
CL=$(echo $comments | jq '. | length' )
echo "::set-output name=comments_length::$CL"
- uses: actions/checkout@v2
if: steps.getCommentCount.outputs.comments_length == 0
- uses: peaceiris/actions-label-commenter@v1
if: steps.getCommentCount.outputs.comments_length == 0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/issue-commenter.yml
28 changes: 28 additions & 0 deletions .github/workflows/issue-label-to-project-board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Add labeled issues to project board"
on:
issues:
types: [labeled]

env:
MY_GITHUB_TOKEN: ${{ secrets.PAT }}

jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Maintenance Issues
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'bug 🐛') ||
contains(github.event.issue.labels.*.name, 'performance 🐌') ||
contains(github.event.issue.labels.*.name, 'question ❓')
with:
project: 'https://github.com/orgs/comunica/projects/2'
column_name: 'Triage'
- name: Development Issues
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'feature ➕')
with:
project: 'https://github.com/orgs/comunica/projects/3'
column_name: 'Triage'
Loading

0 comments on commit 2df773c

Please sign in to comment.