Skip to content

Commit

Permalink
Merge branch 'main' into 404
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Apr 5, 2023
2 parents ab00ad2 + 39e3403 commit f32a9ed
Show file tree
Hide file tree
Showing 45 changed files with 26,047 additions and 3,608 deletions.
10 changes: 9 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
* @lars-reimann
* @lars-reimann

# Documentation
/docs/ @Safe-DS/Stdlib
/mkdocs.yml @Safe-DS/Stdlib

# Code
/src/ @Safe-DS/Stdlib
/tests/ @Safe-DS/Stdlib
41 changes: 0 additions & 41 deletions .github/linters/.pylintrc

This file was deleted.

106 changes: 106 additions & 0 deletions .github/linters/.ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
ignore-init-module-imports = true
line-length = 120
target-version = "py310"

select = [
"F",
"E",
"W",
"I",
"N",
"D",
"UP",
"YTT",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"T20",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SIM",
"TID",
"TCH",
"INT",
"ARG",
"PTH",
"PD",
"PGH",
"PL",
"TRY",
"NPY",
"RUF"
]
ignore = [
# line-too-long (handled by black)
"E501",
# tab-indentation (handled by black)
"W191",
# trailing-whitespace (handled by black)
"W291",
# missing-newline-at-end-of-file (handled by black)
"W292",
# blank-line-with-witespace (handled by black)
"W293",
# boolean-positional-arg-in-function-definition (we leave it to the call-site)
"FBT001",
# boolean-default-value-in-function-definition (we leave it to the call-site)
"FBT002",
# builtin-attribute-shadowing (not an issue)
"A003",
# superfluous-else-return (sometimes it's more readable)
"RET505",
# superfluous-else-raise (sometimes it's more readable)
"RET506",
# superfluous-else-continue (sometimes it's more readable)
"RET507",
# superfluous-else-break (sometimes it's more readable)
"RET508",
# private-member-access (we cannot always avoid it if we want a clean API)
"SLF001",
# if-else-block-instead-of-if-exp (an if-else block can be more readable)
"SIM108",
# compare-to-empty-string (sometimes it's better to be explicit)
"PLC1901",
# too-many-return-statements
"PLR0911",
# too-many-branches
"PLR0912",
# too-many-arguments
"PLR0913",
# too-many-statements
"PLR0915",
# magic-value-comparison
"PLR2004",
# raise-vanilla-args
"TRY003",
]

[per-file-ignores]
"*test*.py" = [
# Undocumented declarations
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
]

[pydocstyle]
convention = "numpy"
6 changes: 6 additions & 0 deletions .github/linters/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "stylelint-config-standard",
"rules": {
"selector-class-pattern": null
}
}
9 changes: 9 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Dependency Review

on:
pull_request:
branches: [ main ]

jobs:
dependency-review:
uses: lars-reimann/.github/.github/workflows/dependency-review-reusable.yml@main
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ on:
jobs:
poetry-with-codecov:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
python-version:
- "3.10"
- "3.11"
uses: lars-reimann/.github/.github/workflows/poetry-codecov-reusable.yml@main
with:
working-directory: .
python-version: ${{ matrix.python-version }}
module-name: safeds_examples
coverage: ${{ matrix.python-version == '3.10' }}
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 ]

jobs:
megalinter:
uses: lars-reimann/.github/.github/workflows/megalinter-reusable.yml@main
secrets:
PAT: ${{ secrets.PAT }}
16 changes: 0 additions & 16 deletions .github/workflows/merge_queue.yml

This file was deleted.

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
6 changes: 5 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ concurrency:
jobs:
poetry-with-codecov:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
python-version:
- "3.10"
- "3.11"
uses: lars-reimann/.github/.github/workflows/poetry-codecov-reusable.yml@main
with:
working-directory: .
python-version: ${{ matrix.python-version }}
module-name: safeds_examples
coverage: ${{ matrix.python-version == '3.10' }}
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ jobs:
working-directory: .
python-version: "3.10"
secrets:
GITHUB_PAT: ${{ secrets.PAT }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
permissions:
contents: write
issues: write
pull-requests: write
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ htmlcov/
.coverage
coverage.xml

# ruff
.ruff_cache/

# mkdocs
/site/

Expand Down
58 changes: 58 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
## [0.9.1](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.9.0...v0.9.1) (2023-04-04)


### Bug Fixes

* compatibility with `safe-ds` v0.9.0 ([#47](https://github.com/Safe-DS/Stdlib-Examples/issues/47)) ([357db59](https://github.com/Safe-DS/Stdlib-Examples/commit/357db59bb8bd10523873d74906579920a67caef8))

## [0.9.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.8.0...v0.9.0) (2023-03-31)


### Features

* compatibility with `safe-ds` v0.8.0 ([#44](https://github.com/Safe-DS/Stdlib-Examples/issues/44)) ([5d79140](https://github.com/Safe-DS/Stdlib-Examples/commit/5d79140fc5ad3ba3b96002719f7df56dc507ebdf))

## [0.8.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.7.0...v0.8.0) (2023-03-29)


### Features

* compatibility with `safe-ds` v0.7.0 ([#42](https://github.com/Safe-DS/Stdlib-Examples/issues/42)) ([8962627](https://github.com/Safe-DS/Stdlib-Examples/commit/8962627e4e692906501ea5b0fc84d191a4290900))
* subclass of `Table` that can include column descriptions ([#43](https://github.com/Safe-DS/Stdlib-Examples/issues/43)) ([56aff62](https://github.com/Safe-DS/Stdlib-Examples/commit/56aff6212f306973d21aecaa8600a8dd2b2fe3c7)), closes [#41](https://github.com/Safe-DS/Stdlib-Examples/issues/41)

## [0.7.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.6.0...v0.7.0) (2023-03-27)


### Features

* compatibility with `safe-ds` v0.6.0 ([#40](https://github.com/Safe-DS/Stdlib-Examples/issues/40)) ([b4f89e1](https://github.com/Safe-DS/Stdlib-Examples/commit/b4f89e1d5b842caaa77cf8c445d2ce4f6c1f67d4))

## [0.6.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.5.0...v0.6.0) (2023-03-26)


### Features

* compatibility with `safe-ds` v0.5.0 ([#39](https://github.com/Safe-DS/Stdlib-Examples/issues/39)) ([ac71b90](https://github.com/Safe-DS/Stdlib-Examples/commit/ac71b90404c072e1e511f79114f25332ee4348dc))

## [0.5.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.4.0...v0.5.0) (2023-03-26)


### Features

* compatibility with `safe-ds` v0.4.0 ([#36](https://github.com/Safe-DS/Stdlib-Examples/issues/36)) ([33b79d6](https://github.com/Safe-DS/Stdlib-Examples/commit/33b79d6fcd136ae2d22ac976897630087c3bebe5))

## [0.4.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.3.0...v0.4.0) (2023-03-17)


### Features

* add "id" column to Titanic dataset ([#29](https://github.com/Safe-DS/Stdlib-Examples/issues/29)) ([34f1389](https://github.com/Safe-DS/Stdlib-Examples/commit/34f1389142658c95e860715b29c4261dee52b61a))

## [0.3.0](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.2.1...v0.3.0) (2023-03-15)


### Features

* house sales example ([#23](https://github.com/Safe-DS/Stdlib-Examples/issues/23)) ([be847cd](https://github.com/Safe-DS/Stdlib-Examples/commit/be847cdb807b133f0341c366933e92d1a7d22446)), closes [#14](https://github.com/Safe-DS/Stdlib-Examples/issues/14)
* Titanic column names & description ([#24](https://github.com/Safe-DS/Stdlib-Examples/issues/24)) ([1ee9a48](https://github.com/Safe-DS/Stdlib-Examples/commit/1ee9a482f7d7f54b36d21ce53c5dbfa3299fece8))

## [0.2.1](https://github.com/Safe-DS/Stdlib-Examples/compare/v0.2.0...v0.2.1) (2023-03-14)


Expand Down
14 changes: 12 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Safe-DS Python Library - Examples

[![PyPI](https://img.shields.io/pypi/v/safe-ds-examples)](https://pypi.org/project/safe-ds-examples/)
[![PyPI](https://img.shields.io/pypi/v/safe-ds-examples)](https://pypi.org/project/safe-ds-examples)
[![Main](https://github.com/Safe-DS/Stdlib-Examples/actions/workflows/main.yml/badge.svg)](https://github.com/Safe-DS/Stdlib-Examples/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/Safe-DS/Stdlib-Examples/branch/main/graph/badge.svg?token=X5CU9V952H)](https://codecov.io/gh/Safe-DS/Stdlib-Examples)
[![Documentation Status](https://readthedocs.org/projects/stdlib-examples/badge/?version=latest)](https://stdlib-examples.safe-ds.com)
[![Documentation Status](https://readthedocs.org/projects/stdlib-examples/badge/?version=stable)](https://stdlib-examples.safe-ds.com)

Ready-to-use examples for the [Safe-DS Python Library](https://github.com/Safe-DS/Stdlib).

## Documentation

You can find the full documentation [here](https://stdlib-examples.safe-ds.com).

## Installation

Get the latest version from [PyPI](https://pypi.org/project/safe-ds-examples):

```shell
pip install safe-ds-examples
```
1 change: 1 addition & 0 deletions docs/examples/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Information about the included example datasets."""
10 changes: 10 additions & 0 deletions docs/examples/disable_warnings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Disable output of warnings."""

import logging
import warnings


def disable_warnings() -> None:
"""Disable output of warnings."""
logging.root.setLevel(logging.ERROR)
warnings.filterwarnings("ignore")
Loading

0 comments on commit f32a9ed

Please sign in to comment.