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.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v6.4.0-21-g01b4330
_commit: v7.3.0-22-g87d8a9b
_src_path: gh:eccenca/cmem-plugin-template
author_mail: cmempy-developer@eccenca.com
author_name: eccenca GmbH
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

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

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

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

- name: Install and configure poetry
uses: snok/install-poetry@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:

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

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

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

- name: Install and configure poetry
uses: snok/install-poetry@v1
Expand Down
8 changes: 3 additions & 5 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.13.8
# all jobs can be interrupted in case a new commit is pushed
interruptible: true
before_script:
Expand Down Expand Up @@ -53,10 +53,7 @@ pytest:
junit:
- dist/junit-pytest.xml
paths:
- dist/badge-coverage.svg
- dist/badge-tests.svg
- dist/coverage
- dist/coverage.xml
- dist/*

safety:
stage: test
Expand All @@ -69,6 +66,7 @@ build:
- mypy
- pytest
- safety
- deptry
script:
- task build
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion .idea/cmem-plugin-yaml.iml

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

2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.13
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<!-- markdownlint-disable MD012 MD013 MD024 MD033 -->
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/)

## [1.0.0] 2024-10-15

### Changed

- Update of dependencies and template
- validation of python 3.13 compatibility


## [0.8.0] 2024-07-17

### Changed
Expand Down
2 changes: 2 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ includes:
custom:
taskfile: ./TaskfileCustom.yaml
optional: true
flatten: true
plugin:
taskfile: .tasks-plugin.yml
optional: true
flatten: true

tasks:

Expand Down
10 changes: 4 additions & 6 deletions cmem_plugin_yaml/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{
SOURCE.entities: f"{SOURCE.entities}: "
"Content is parsed from of the input port in a workflow.",
SOURCE.code: f"{SOURCE.code}: " "Content is parsed from the YAML code field below.",
SOURCE.code: f"{SOURCE.code}: Content is parsed from the YAML code field below.",
SOURCE.file: f"{SOURCE.file}: "
"Content is parsed from an uploaded project file resource (see advanced options).",
}
Expand Down Expand Up @@ -78,7 +78,7 @@

**Input Sources:**
- **entities**: Parse YAML from input port entities in a workflow
- **code**: Parse YAML from directly entered source code
- **code**: Parse YAML from directly entered source code
- **file**: Parse YAML from uploaded project file resources

**Output Formats:**
Expand Down Expand Up @@ -240,8 +240,7 @@ def _validate_config(self) -> None:
if self.source_mode == SOURCE.file:
if self.source_file == "":
self._raise_error(
f"When using the source mode '{SOURCE.file}', "
"you need to select a YAML file."
f"When using the source mode '{SOURCE.file}', you need to select a YAML file."
)
if hasattr(self, "execution_context") and not resource_exist(
self.project, self.source_file
Expand All @@ -256,8 +255,7 @@ def _validate_config(self) -> None:
def _get_input_file(self, writer: BinaryIO) -> None:
"""Get input YAML file from project file."""
with get_resource_response(self.project, self.source_file) as response:
for chunk in response.iter_content(chunk_size=8192):
writer.write(chunk)
writer.writelines(response.iter_content(chunk_size=8192))

def _get_input_code(self, writer: BinaryIO) -> None:
"""Get input YAML file from direct YAML code"""
Expand Down
Loading