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
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry build
pip install uv
uv build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 3 additions & 5 deletions .github/workflows/test_run_multiparser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Poetry
run: python -m pip install poetry
- name: Install UV
run: python -m pip install uv
- name: Run Unit Tests
run: |
poetry install --all-extras
poetry run pytest
run: uv run --all-groups --all-extras -p ${{ matrix.python-version }} pytest --cov=multiparser
8 changes: 4 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Development

## Using Poetry
## Using UV

The _Multiparser_ repository makes use of the [Poetry](https://python-poetry.org/) which is a pip-installable dependency management and virtual environment tool for assisting development, and recommended when contributing to the project. The included `poetry.lock` file provides a shareable virtual environment definition. Poetry is able to resolve dependency versions to ensure cross-compatibility.
The _Multiparser_ repository makes use of the [UV](https://docs.astral.sh/uv/) which is a pip-installable dependency management and virtual environment tool for assisting development, and recommended when contributing to the project. The included `uv.lock` file provides a shareable virtual environment definition. UV is able to resolve dependency versions to ensure cross-compatibility.

## Pre-commit

Expand All @@ -22,8 +22,8 @@ pre-commit run --all

_Multiparser_ follows the Numpy docstring convention for outlining function and class parameters and return types.

Included within the git hooks is the docstring coverage check tool [_interrogate_](https://pypi.org/project/interrogate/) which checks whether all functions within the `multiparser` module have been documented. The tool can be run in isolation using Poetry:
Included within the git hooks is the docstring coverage check tool [_interrogate_](https://pypi.org/project/interrogate/) which checks whether all functions within the `multiparser` module have been documented. The tool can be run in isolation using UV:

```sh
poetry run interrogate
uv run interrogate
```
2 changes: 1 addition & 1 deletion multiparser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
pathlib.Path(os.path.dirname(__file__)).parents[1], "pyproject.toml"
)
if os.path.exists(_metadata):
__version__ = toml.load(_metadata)["tool"]["poetry"]["version"]
__version__ = toml.load(_metadata)["project"]["version"]
else:
__version__ = ""

Expand Down
2,664 changes: 0 additions & 2,664 deletions poetry.lock

This file was deleted.

95 changes: 46 additions & 49 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[project]
name = "multiparser"
version = "1.0.5"
version = "1.0.6"
description = "Multiple File Parser for monitoring and processing updates to a given set of output files."
readme = "README.md"
requires-python = ">=3.10,<4.0"
authors = [
{name = "Kristian Zarębski",email = "kristian.zarebski@ukaea.uk"}
]
Expand All @@ -25,60 +27,55 @@ keywords = [
"logging"
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.10,<4.0"
dependencies = [
"toml (>=0.10.2,<0.11.0)",
"pyyaml (>=6.0.2,<7.0.0)",
"flatdict (>=4.0.1,<5.0.0)",
"loguru (>=0.7.3,<0.8.0)"
"flatdict>=4.0.1",
"loguru>=0.7.3",
"pyyaml>=6.0.2",
"toml>=0.10.2",
]

[project.urls]
Documentation = "https://ukaea.github.io/Multiparser/"
Repository = "https://github.com/ukaea/Multiparser"
Issues = "https://github.com/ukaea/Multiparser/issues"
"Change Log" = "https://github.com/ukaea/Multiparser/blob/main/CHANGELOG.md"

[project.optional-dependencies]
arrow = ["pyarrow (>=19.0.0,<20.0.0)", "pandas (>=2.2.3,<3.0.0)"]
fortran = ["f90nml (>=1.4.4,<2.0.0)"]

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.group.testing.dependencies]
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
xeger = "^0.4.0"
pytest-mock = "^3.14.0"
pandas = "^2.2.3"


[tool.poetry.group.quality.dependencies]
bandit = "^1.8.2"


[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.1"
mkdocs-material = "^9.5.50"
pymdown-extensions = "^10.14.2"
mkdocs-mermaid2-plugin = "^1.2.1"
mkdocs-git-revision-date-localized-plugin = "^1.3.0"
mktestdocs = "^0.2.4"
mkdocstrings = "^0.27.0"
mike = "^2.1.3"
arrow = [
"pandas>=2.2.3",
"pyarrow>=20.0.0",
]
fortran = [
"f90nml>=1.4.5",
]

[dependency-groups]
dev = [
"ipykernel>=6.29.5",
"mypy>=1.15.0",
"pandas-stubs>=2.2.3.250308",
"ruff>=0.11.10",
"types-pyyaml>=6.0.12.20250516",
"types-toml>=0.10.8.20240310",
"bandit>=1.8.3",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
]
docs = [
"mike>=2.1.3",
"mkdocs>=1.6.1",
"mkdocs-git-revision-date-localized-plugin>=1.4.5",
"mkdocs-material>=9.6.14",
"mkdocs-mermaid2-plugin>=1.2.1",
"mkdocstrings>=0.29.1",
"mktestdocs>=0.2.4",
"pymdown-extensions>=10.15",
]
testing = [
"pandas>=2.2.3",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest-mock>=3.14.0",
"xeger>=0.4.0",
]

[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.5"
mypy = "^1.14.1"
pandas-stubs = "^2.2.3.241126"
types-toml = "^0.10.8.20240310"
types-pyyaml = "^6.0.12.20241230"
ruff = "^0.9.3"
interrogate = "^1.7.0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff]
lint.extend-select = ["C901"]
Expand Down
Loading