Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
Co-authored-by: KAWAKUBO Toru <[email protected]>
Co-authored-by: Kentaro Wada <[email protected]>
Co-authored-by: Toru Shibamiya <[email protected]>
Co-authored-by: Ryota Kojima <[email protected]>
Co-authored-by: yibe <[email protected]>
Co-authored-by: wkaisei <[email protected]>
Co-authored-by: tanan <[email protected]>
Co-authored-by: Zeeshan Ahmed <[email protected]>
Co-authored-by: DanielChen86 <[email protected]>
Co-authored-by: Andreas Thomasen <[email protected]>
  • Loading branch information
10 people committed Nov 24, 2022
0 parents commit 6649a98
Show file tree
Hide file tree
Showing 274 changed files with 44,301 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]

max-line-length = 88
33 changes: 33 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Contributor License Agreement

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
cla:
runs-on: ubuntu-latest

steps:
- name: Get CLA Manager access token
id: cla-token
uses: getsentry/[email protected]
with:
app_id: ${{ secrets.CLA_MANAGER_APP_ID }}
private_key: ${{ secrets.CLA_MANAGER_PRIVATE_KEY}}

- name: cla
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ steps.cla-token.outputs.token }}
with:
path-to-document: 'https://cla.qunasys.com'
remote-organization-name: 'QunaSys'
remote-repository-name: 'cla'
branch: 'main'
path-to-signatures: 'signatures/v1/cla.json'
custom-notsigned-prcomment: '<br/>Thank you for your submission, we really appreciate it. We ask that $you sign our [Contributor License Agreement](https://cla.qunasys.com) before we can accept your contribution. This CLA will also cover your future contributions submitted to QunaSys. You can sign the CLA by just posting a pull request comment same as the below format.<br/>'
50 changes: 50 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Document

on:
pull_request:
push:
branches: [main]

jobs:
build-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'

- name: Download pandoc
if: steps.cache-pandoc.outputs.cache-hit != 'true'
run: |
wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb
- name: Install pandoc
run: |
yes | sudo dpkg -i pandoc-2.18-1-amd64.deb
- run: |
poetry install -vvv
- run: poetry run make html
working-directory: docs

- name: deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/_build'
production-branch: main
alias: deploy-preview-${{ github.event.number }}
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: c809dd00-1b20-41de-adc9-ad4c882d452d
51 changes: 51 additions & 0 deletions .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check licenses of dependencies

on:
pull_request:
paths:
- .licenses/**
- packages/*/pyproject.toml
push:
branches: [main]
paths:
- packages/*/pyproject.toml
schedule:
- cron: '0 0 * * MON-FRI'
workflow_dispatch:
branches: [main]

jobs:
check-licenses:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: 'packages/*/pyproject.toml'

- run: python -m venv venv
- run: |
. venv/bin/activate
pip install -e packages/*
- uses: jonabc/[email protected]
with:
version: '3.x'

- run: licensed cache
- run: licensed status

- uses: slackapi/[email protected]
if: failure() && github.event_name == 'schedule'
with:
payload: |
{
"message": "License check for QURI Parts failed.",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
pull_request:
push:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'

- run: |
poetry install -vvv
- run: poetry run isort . --check --diff
if: success() || failure()

- run: poetry run black . --check
if: success() || failure()

- run: poetry run flake8
if: success() || failure()

- run: poetry run mypy .
if: success() || failure()

- run: poetry run docformatter -c -r .
if: success() || failure()
63 changes: 63 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Package and release

on:
pull_request:
push:
branches: [main]
release:
types: [published]

jobs:
package:
runs-on: ubuntu-latest

steps:
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
poetry self add "poetry-dynamic-versioning[plugin]"
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- uses: actions/checkout@v3
with:
# Necessary to get tags for correct versioning
fetch-depth: 0

- run: |
mkdir -p dist
poetry build
for pkg in packages/*
do
cd $pkg
poetry build
mv dist/* ../../dist
cd ../..
done
- uses: actions/upload-artifact@v3
with:
name: QURI parts packages
path: dist/*
if-no-files-found: error

release:
needs: [package]
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: QURI parts packages

- name: Install Twine
run: python -m pip install twine

- name: Release to PyPI
run: python -m twine upload *
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.TWINE_API_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'

- run: |
poetry install -vvv
- run: poetry run pytest
Loading

0 comments on commit 6649a98

Please sign in to comment.