Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add my code from Simple-ML repo #1

Merged
merged 7 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.yaml,*.yml}]
indent_size = 2
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Compilation/build outputs
build/
dist/
out/
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.eslint.json',
},
settings: {
jest: {
version: 28,
},
},
extends: '@lars-reimann',
};
9 changes: 9 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]
extend-ignore =
# line too long (black handles that)
E501,
# Line break occurred before a binary operator (seems to conflict with the linter)
W503
per-file-ignores =
# imported but unused
__init__.py: F401
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @lars-reimann
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Root
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

# DSL
- package-ecosystem: "gradle"
directory: "/DSL"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/DSL/de.unibonn.simpleml.vscode"
schedule:
interval: "monthly"

# Runtime
- package-ecosystem: "pip"
directory: "/Runtime/safe-ds"
schedule:
interval: "monthly"
- package-ecosystem: "pip"
directory: "/Runtime/safe-ds-runner"
schedule:
interval: "monthly"
16 changes: 16 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Dependency Review'

on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- name: 'Dependency Review'
uses: actions/dependency-review-action@v1
125 changes: 125 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Main
on:
push:
branches: [ main ]

jobs:
# Build and test DSL component
build-dsl:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./DSL
strategy:
matrix:
java-version: [ 17 ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
cache: gradle

# See https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Test with Gradle
run: ./gradlew check

- name: Upload test report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Test report
# upload-artifact does not use working-directory
path: DSL/de.unibonn.simpleml/build/reports/tests/test/

# Build and test Runtime > Runner component
build-runtime-runner:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Runtime/safe-ds-runner
strategy:
matrix:
python-version: [ "3.10" ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install library
run: poetry install --no-interaction

# Requires installation of pytest and pytest-cov
- name: Test with pytest
run: poetry run pytest --doctest-modules

# Build and test Runtime > Stdlib component
build-runtime-stdlib:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Runtime/safe-ds-runner
strategy:
matrix:
python-version: [ "3.10" ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install library
run: poetry install --no-interaction

# Requires installation of pytest and pytest-cov
- name: Test with pytest
run: poetry run pytest --doctest-modules
11 changes: 11 additions & 0 deletions .github/workflows/megalinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: MegaLinter

on:
pull_request:
branches: [main, master]

jobs:
run-megalinter:
uses: lars-reimann/.github/.github/workflows/megalinter-reusable.yml@main
secrets:
PAT: ${{ secrets.PAT }}
13 changes: 13 additions & 0 deletions .github/workflows/pr-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull Request Format

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened

jobs:
check-format:
uses: lars-reimann/.github/.github/workflows/pr-format-reusable.yml@main
Loading