Skip to content

Commit

Permalink
Merge pull request #4 from eccenca/feature/templateUpdates
Browse files Browse the repository at this point in the history
update template to feature/generalization
  • Loading branch information
seebi authored Oct 1, 2024
2 parents 86845bc + 9fc0a64 commit 0c1ffcf
Show file tree
Hide file tree
Showing 13 changed files with 355 additions and 275 deletions.
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=yaml
package_dir=cmem_plugin_yaml

3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changes here will be overwritten by Copier
_commit: v6.3.1
_commit: v6.4.0-21-g01b4330
_src_path: gh:eccenca/cmem-plugin-template
author_mail: [email protected]
author_name: eccenca GmbH
github_page: https://github.com/eccenca/cmem-plugin-yaml
project_description: Load and parse YAML documents.
project_slug: yaml
project_type: plugin
pypi: true

4 changes: 2 additions & 2 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 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
14 changes: 14 additions & 0 deletions .tasks-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# https://taskfile.dev
---
version: '3'

tasks:

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

19 changes: 16 additions & 3 deletions README-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@

Load and parse YAML documents.

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 clients like this:

```
cmemc admin workspace python install cmem-plugin-yaml
```

[![workflow](https://github.com/eccenca/cmem-plugin-yaml/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-yaml/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml) [![license](https://img.shields.io/pypi/l/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml)
[![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

13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@

Load and parse YAML documents.

[![eccenca Corporate Memory](https://img.shields.io/badge/eccenca-Corporate%20Memory-orange)](https://documentation.eccenca.com) [![workflow](https://github.com/eccenca/cmem-plugin-yaml/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-yaml/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml) [![license](https://img.shields.io/pypi/l/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml)
[![eccenca Corporate Memory][cmem-shield]][cmem-link] [![workflow](https://github.com/eccenca/cmem-plugin-yaml/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-yaml/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml) [![license](https://img.shields.io/pypi/l/cmem-plugin-yaml)](https://pypi.org/project/cmem-plugin-yaml)
[![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
21 changes: 8 additions & 13 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# https://taskfile.dev
#
# This is a generated file. We dot not suggest to edit it.
# Instead, create a file `TaskfileCustom.yml` and add your additions there.
---
version: '3'

Expand All @@ -10,13 +13,16 @@ dotenv: ['.copier-answers.env', '.env']
- check:prepare

vars:
PACKAGE: cmem_plugin_$project_slug
PACKAGE: $package_dir
DIST_DIR: dist

includes:
custom:
taskfile: ./TaskfileCustom.yaml
optional: true
plugin:
taskfile: .tasks-plugin.yml
optional: true

tasks:

Expand Down Expand Up @@ -156,22 +162,13 @@ tasks:
<<: *preparation
cmds:
- poetry run ruff check --exit-zero tests {{.PACKAGE}} {{.XML_PARAMS}}
- poetry run ruff check --show-source tests {{.PACKAGE}}
- poetry run ruff check --output-format=concise tests {{.PACKAGE}}
- poetry run ruff format --check tests {{.PACKAGE}}
vars:
JUNIT_FILE: ./{{.DIST_DIR}}/junit-ruff.xml
XML_PARAMS: --output-format junit --output-file {{.JUNIT_FILE}}

# }}}
# {{{ build and deploy tasks

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

build:
desc: Build a tarball and a wheel package
Expand All @@ -182,5 +179,3 @@ tasks:
cmds:
- poetry build

# }}}

2 changes: 1 addition & 1 deletion cmem_plugin_yaml/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""yaml2json - main package"""
"""cmem-plugin-yaml"""
Loading

0 comments on commit 0c1ffcf

Please sign in to comment.