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

upgrade to latest template #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changes here will be overwritten by Copier
_commit: v5.0.2
_commit: v6.1.0
_src_path: gh:eccenca/cmem-plugin-template
author_mail: [email protected]
author_name: Denis Streitmatter
github_page: https://github.com/dbpedia/cmem-plugin-databus
project_description: Load and publish datasets from a DBpedia databus service.
project_slug: databus
pypi: false
pypi: true

4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

17 changes: 5 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
check:

runs-on: ubuntu-latest
concurrency: testing_environment

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v1
Expand All @@ -41,21 +42,13 @@ jobs:
run: |
poetry self add "poetry-dynamic-versioning[plugin]"

- name: bandit
run: |
task check:bandit

- name: flake8
run: |
task check:flake8

- name: mypy
run: |
task check:mypy

- name: pylint
- name: ruff
run: |
task check:pylint
task check:ruff

- name: pytest
env:
Expand All @@ -69,7 +62,7 @@ jobs:
task check:safety

- name: Publish Test Report in Action
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: dist/junit-*.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v1
Expand Down
32 changes: 6 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,15 @@ stages:
- build
- publish

bandit:
ruff:
stage: test
script:
- task check:bandit
- task check:ruff
artifacts:
when: always
reports:
junit:
- dist/junit-bandit.xml

flake8:
stage: test
script:
- task check:flake8
artifacts:
when: always
reports:
junit:
- dist/junit-flake8.xml
- dist/junit-ruff.xml

mypy:
stage: test
Expand All @@ -49,16 +39,6 @@ mypy:
junit:
- dist/junit-mypy.xml

pylint:
stage: test
script:
- task check:pylint
artifacts:
when: always
reports:
junit:
- dist/junit-pylint.xml

pytest:
stage: test
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
Expand All @@ -70,6 +50,8 @@ pytest:
coverage_report:
coverage_format: cobertura
path: dist/coverage.xml
junit:
- dist/junit-pytest.xml
paths:
- dist/badge-coverage.svg
- dist/badge-tests.svg
Expand All @@ -84,7 +66,6 @@ safety:
build:
stage: build
needs:
- bandit
- mypy
- pytest
- safety
Expand All @@ -100,8 +81,7 @@ pypi:
# publishing only available on a tag
stage: publish
needs:
- flake8
- pylint
- ruff
- build
allow_failure: true
when: manual
Expand Down
7 changes: 3 additions & 4 deletions .idea/cmem-plugin-databus.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 33 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,37 @@
repos:
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
exclude: '^tests/.*$'
language: system
types: [python]
- repo: local
hooks:
- id: forbidden-files
name: forbidden files
entry: found copier update rejection files; review them and remove them
language: fail
files: "\\.rej$"

- id: ruff
name: check:ruff
entry: task check:ruff
language: python
types_or: [python, pyi]
pass_filenames: false

- id: poetry-check
name: poetry-check
description: run poetry check to validate config
entry: poetry check
language: python
pass_filenames: false
files: ^(.*/)?pyproject\.toml$

- id: poetry-lock
name: poetry-lock
description: run poetry lock to update lock file
entry: poetry lock
language: python
pass_filenames: false
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$

- id: poetry-install
name: poetry-install
description: >
run poetry install to install dependencies from the lock file
entry: poetry install
language: python
pass_filenames: false
stages: [post-checkout, post-merge]
always_run: true

1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Load and publish datasets from a DBpedia databus service.

[![eccenca Corporate Memory](https://img.shields.io/badge/eccenca-Corporate%20Memory-orange)](https://documentation.eccenca.com) [![workflow](https://github.com/dbpedia/cmem-plugin-databus/actions/workflows/check.yml/badge.svg)](https://github.com/dbpedia/cmem-plugin-databus/actions)
[![eccenca Corporate Memory](https://img.shields.io/badge/eccenca-Corporate%20Memory-orange)](https://documentation.eccenca.com) [![workflow](https://github.com/dbpedia/cmem-plugin-databus/actions/workflows/check.yml/badge.svg)](https://github.com/dbpedia/cmem-plugin-databus/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-databus)](https://pypi.org/project/databus) [![license](https://img.shields.io/pypi/l/cmem-plugin-databus)](https://pypi.org/project/cmem-plugin-databus)

## Development

Expand Down
Loading
Loading