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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.7
rev: v0.15.9
hooks:
- id: ruff-format
- id: ruff-check
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e

### Changed
* Python modules: Changed `__ALL__` to `__all__` (lowercase, PEP8 and PEP257 compliant).
* Updated code base with latest changes in python_project_template v0.2.10

### Dependencies
* .pre-commit-config.yaml: Updated rev of ruff-pre-commit to v0.15.9
* Updated to ruff>=0.15.9


## [0.4.4] - 2026-03-26
Expand Down
52 changes: 26 additions & 26 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
title: dictIO
version: 0.4.4
abstract: >-
Python package to read, write and manipulate dictionary text files.
Supports dictIOs native file format, as well as JSON, XML and OpenFOAM.
Python package to read, write and manipulate dictionary text files.
Supports dictIOs native file format, as well as JSON, XML and OpenFOAM.
type: software
authors:
- name: DNV SE
address: 'Brooktorkai 18'
post-code: '20457'
city: Hamburg
country: DE
website: 'https://www.dnv.com/'
- given-names: Frank
family-names: Lumpitzsch
affiliation: DNV
email: frank.lumpitzsch@dnv.com
website: 'https://www.linkedin.com/in/frank-lumpitzsch-23013196/'
- given-names: Claas
family-names: Rostock
affiliation: DNV
email: claas.rostock@dnv.com
website: 'https://www.linkedin.com/in/claasrostock/?locale=en_US'
- given-names: Seunghyeon
family-names: Yoo
affiliation: DNV
email: seunghyeon.yoo@dnv.com
website: 'https://www.linkedin.com/in/seunghyeon-yoo-3625173b/'
- name: DNV SE
address: 'Brooktorkai 18'
post-code: '20457'
city: Hamburg
country: DE
website: 'https://www.dnv.com/'
- given-names: Frank
family-names: Lumpitzsch
affiliation: DNV
email: frank.lumpitzsch@dnv.com
website: 'https://www.linkedin.com/in/frank-lumpitzsch-23013196/'
- given-names: Claas
family-names: Rostock
affiliation: DNV
email: claas.rostock@dnv.com
website: 'https://www.linkedin.com/in/claasrostock/?locale=en_US'
- given-names: Seunghyeon
family-names: Yoo
affiliation: DNV
email: seunghyeon.yoo@dnv.com
website: 'https://www.linkedin.com/in/seunghyeon-yoo-3625173b/'
keywords:
- dictIO
- dictParser
- dict
- dictIO
- dictParser
- dict
license: MIT
license-url: 'https://dnv-opensource.github.io/dictIO/LICENSE.html'
url: 'https://dnv-opensource.github.io/dictIO/README.html'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Changelog = "https://github.com/dnv-opensource/dictIO/blob/main/CHANGELOG.md"
dev = [
"pytest>=9.0",
"pytest-cov>=7.1",
"ruff>=0.15.7",
"ruff>=0.15.9",
"pyright>=1.1.408",
"mypy>=1.19.1",
"sourcery>=1.43.0",
Expand Down
71 changes: 41 additions & 30 deletions src/dictIO/__init__.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
"""dictIO package provides classes for reading, writing, and parsing dictionaries."""

from dictIO.dict import (
SDict as SDict,
)
from dictIO.dict import SDict

from dictIO.utils.dict import (
order_keys as order_keys,
find_global_key as find_global_key,
set_global_key as set_global_key,
)
from dictIO.cpp_dict import CppDict # for backward compatibility

from dictIO.cpp_dict import (
CppDict as CppDict,
from dictIO.utils.dict import (
order_keys,
find_global_key,
set_global_key,
)

from dictIO.formatter import (
Formatter as Formatter,
NativeFormatter as NativeFormatter,
FoamFormatter as FoamFormatter,
JsonFormatter as JsonFormatter,
XmlFormatter as XmlFormatter,
Formatter,
NativeFormatter,
FoamFormatter,
JsonFormatter,
XmlFormatter,
)
from dictIO.parser import (
Parser as Parser,
NativeParser as NativeParser,
FoamParser as FoamParser,
JsonParser as JsonParser,
XmlParser as XmlParser,
Parser,
NativeParser,
FoamParser,
JsonParser,
XmlParser,
)

from dictIO.dict_reader import (
DictReader as DictReader,
)
from dictIO.dict_writer import (
DictWriter as DictWriter,
create_target_file_name as create_target_file_name,
)
from dictIO.dict_parser import (
DictParser as DictParser,
)
from dictIO.dict_reader import DictReader
from dictIO.dict_writer import DictWriter, create_target_file_name
from dictIO.dict_parser import DictParser

__all__ = [
"CppDict",
"DictParser",
"DictReader",
"DictWriter",
"FoamFormatter",
"FoamParser",
"Formatter",
"JsonFormatter",
"JsonParser",
"NativeFormatter",
"NativeParser",
"Parser",
"SDict",
"XmlFormatter",
"XmlParser",
"create_target_file_name",
"find_global_key",
"order_keys",
"set_global_key",
]
6 changes: 3 additions & 3 deletions src/dictIO/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def _argparser() -> argparse.ArgumentParser:
)

_ = parser.add_argument(
"dict",
metavar="dict",
"dict_file",
metavar="dict_file",
type=str,
help="name of dict file to be parsed.",
)
Expand Down Expand Up @@ -176,7 +176,7 @@ def main() -> None:
log_level_file: str = args.log_level
configure_logging(log_level_console, log_file, log_level_file)

dict_file = Path(args.dict)
dict_file = Path(args.dict_file)
includes: bool = not args.ignore_includes
mode: str = args.mode
order: bool = args.order
Expand Down
2 changes: 1 addition & 1 deletion tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
temp_*
~$temp*
~$temp*
2 changes: 1 addition & 1 deletion tests/cli/test_dictParser_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CliArgs:
verbose: bool = False
log: str | None = None
log_level: str = field(default_factory=lambda: "WARNING")
dict: str | None = field(default_factory=lambda: "test_dictParser_dict")
dict_file: str | None = field(default_factory=lambda: "test_dictParser_dict")
ignore_includes: bool = False
mode: str = "w"
order: bool = False
Expand Down
Loading
Loading