Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changes here will be overwritten by Copier
project_slug=ulid
package_dir=cmem_plugin_ulid

7 changes: 4 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Changes here will be overwritten by Copier
_commit: v5.3.3
_commit: v7.2.0-5-g30b73b4
_src_path: gh:eccenca/cmem-plugin-template
author_mail: cmempy-developer@eccenca.com
author_name: eccenca GmbH
github_page: https://github.com/eccenca/cmem-plugin-ulid
project_description: Create ULID's(Universally Unique Lexicographically Sortable Identifier)
in transformations
project_description: Create Universally Unique Lexicographically Sortable Identifiers
(ULID) in transformations.
project_slug: ulid
project_type: plugin
pypi: true

4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v1
uses: arduino/setup-task@v2

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand All @@ -42,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 @@ -65,6 +57,10 @@ jobs:
run: |
task check:pytest

- name: deptry
run: |
task check:deptry

- name: safety
run: |
task check:safety
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v1
uses: arduino/setup-task@v2

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
37 changes: 10 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
default:
image: docker-registry.eccenca.com/eccenca-python:v3.11.4
image: docker-registry.eccenca.com/eccenca-python:v3.11.9-2
# all jobs can be interrupted in case a new commit is pushed
interruptible: true
before_script:
Expand All @@ -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 @@ -78,6 +58,11 @@ pytest:
- dist/coverage
- dist/coverage.xml

deptry:
stage: test
script:
- task check:deptry

safety:
stage: test
script:
Expand All @@ -86,7 +71,6 @@ safety:
build:
stage: build
needs:
- bandit
- mypy
- pytest
- safety
Expand All @@ -102,8 +86,7 @@ pypi:
# publishing only available on a tag
stage: publish
needs:
- flake8
- pylint
- ruff
- build
allow_failure: true
when: manual
Expand Down
2 changes: 1 addition & 1 deletion .idea/cmem-plugin-ulid.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

19 changes: 19 additions & 0 deletions .tasks-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://taskfile.dev
---
version: '3'

tasks:

install:
desc: Install plugin package in Corporate Memory
cmds:
- task build
- poetry run cmemc admin workspace python install dist/cmem_plugin_ulid*.tar.gz
- poetry run cmemc admin workspace python list-plugins

uninstall:
desc: Unnstall plugin package in Corporate Memory
cmds:
- task build
- poetry run cmemc admin workspace python uninstall cmem-plugin-ulid
- poetry run cmemc admin workspace python list-plugins
20 changes: 16 additions & 4 deletions README-public.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# cmem-plugin-ulid

Create ULID's(Universally Unique Lexicographically Sortable Identifier) in transformations
Create Universally Unique Lexicographically Sortable Identifiers (ULID) in transformations.

This is a plugin for [eccenca](https://eccenca.com) [Corporate Memory](https://documentation.eccenca.com).
[![eccenca Corporate Memory][cmem-shield]][cmem-link]

You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line
clients like this:
This is a plugin for [eccenca](https://eccenca.com) [Corporate Memory](https://documentation.eccenca.com). You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line client like this:

```
cmemc admin workspace python install cmem-plugin-ulid
```
[![workflow](https://github.com/eccenca/cmem-plugin-ulid/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-ulid/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-ulid)](https://pypi.org/project/cmem-plugin-ulid) [![license](https://img.shields.io/pypi/l/cmem-plugin-ulid)](https://pypi.org/project/cmem-plugin-ulid)
[![poetry][poetry-shield]][poetry-link] [![ruff][ruff-shield]][ruff-link] [![mypy][mypy-shield]][mypy-link] [![copier][copier-shield]][copier]

[cmem-link]: https://documentation.eccenca.com
[cmem-shield]: https://img.shields.io/endpoint?url=https://dev.documentation.eccenca.com/badge.json
[poetry-link]: https://python-poetry.org/
[poetry-shield]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
[ruff-link]: https://docs.astral.sh/ruff/
[ruff-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&label=Code%20Style
[mypy-link]: https://mypy-lang.org/
[mypy-shield]: https://www.mypy-lang.org/static/mypy_badge.svg
[copier]: https://copier.readthedocs.io/
[copier-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# cmem-plugin-ulid

Create ULID's(Universally Unique Lexicographically Sortable Identifier) in transformations
Create Universally Unique Lexicographically Sortable Identifiers (ULID) in transformations.

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

## Development

- Run [task](https://taskfile.dev/) to see all major development tasks.
- Use [pre-commit](https://pre-commit.com/) to avoid errors before commit.
- This repository was created with [this copier template](https://github.com/eccenca/cmem-plugin-template).

[cmem-link]: https://documentation.eccenca.com
[cmem-shield]: https://img.shields.io/endpoint?url=https://dev.documentation.eccenca.com/badge.json
[poetry-link]: https://python-poetry.org/
[poetry-shield]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
[ruff-link]: https://docs.astral.sh/ruff/
[ruff-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&label=Code%20Style
[mypy-link]: https://mypy-lang.org/
[mypy-shield]: https://www.mypy-lang.org/static/mypy_badge.svg
[copier]: https://copier.readthedocs.io/
[copier-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
Loading