Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e1dd8a9
Update pre-commit configuration to use latest hook versions
Adafede Jul 14, 2026
ed6bbc5
Fix string formatting in error messages and test match patterns
Adafede Jul 14, 2026
d8c8fcd
Bump version to 1.6.6 and update dependencies in pyproject.toml
Adafede Jul 14, 2026
00084be
Bump version to 1.6.6 and update dependencies in pyproject.toml
Adafede Jul 14, 2026
ab04566
Fix test formatting
Adafede Jul 14, 2026
70b526b
Enhance SMILES canonicalization and validation process with improved …
Adafede Jul 14, 2026
091e063
updated uv lockfile
mmzdouc Jul 15, 2026
9f28ac3
Added test to remove excess hydrogens from N-substiguted tryptophan
mmzdouc Jul 15, 2026
221f5c3
Improve SMILES parsing with enhanced error handling and Ketcher-style…
Adafede Jul 15, 2026
caad15f
removed accession id validation
mmzdouc Jul 15, 2026
c5d63d2
Improved error message formatting
mmzdouc Jul 15, 2026
2a4e77e
Update CI configuration to disable credential persistence during chec…
Adafede Jul 15, 2026
ab34ec5
Format documentation for better readability and consistency
Adafede Jul 15, 2026
d11bff5
Add trailing commas
Adafede Jul 15, 2026
43c8c5c
Fix formatting in pre-commit configuration file
Adafede Jul 15, 2026
d5254fa
Fix typos in docstrings for clarity and accuracy
Adafede Jul 15, 2026
645204a
Refactor import statements to use relative imports for better module …
Adafede Jul 15, 2026
583632b
Add typos exceptions for project-specific tokens and acronyms
Adafede Jul 15, 2026
1835449
Refactor pyproject.toml for improved formatting and organization
Adafede Jul 15, 2026
b6b8c95
Refactor pyproject.toml for improved formatting and organization
Adafede Jul 15, 2026
c2cb577
Update pyproject.toml to streamline Python requirements and remove un…
Adafede Jul 15, 2026
df18518
Add prek.toml configuration for git hook framework integration
Adafede Jul 15, 2026
73f773c
Remove unnecessary blank line in prek.toml
Adafede Jul 15, 2026
571ff89
Update pyproject.toml and uv.lock to remove unused dependencies and a…
Adafede Jul 15, 2026
ad4ab1f
Update pyproject.toml and uv.lock to include additional development d…
Adafede Jul 15, 2026
55e2d36
Add CLI script for validating MITE JSON entries and enhance validatio…
Adafede Jul 15, 2026
1115b90
Improve product canonicalization fallbacks to handle kekulize/parse f…
Adafede Jul 15, 2026
114df7b
Refactor product generation to eliminate duplicates using a mapping o…
Adafede Jul 15, 2026
af30cf2
Remove forced stereochemistry assignment in validation to preserve RD…
Adafede Jul 15, 2026
36d5cd4
Added test to show that removing the stereochemistry fixes the valida…
mmzdouc Jul 15, 2026
af50dcd
Refactor reaction validation logic to improve product normalization a…
Adafede Jul 15, 2026
d118e6a
Update json-repair package version to 0.61.5
Adafede Jul 15, 2026
0aece0c
Refactor product SMILES normalization to use caching and improve vari…
Adafede Jul 15, 2026
c736f50
Update uv-pre-commit repository version to 0.11.29
Adafede Jul 15, 2026
57b6faf
Remove invalid stereochemistry test case to improve reaction validation
Adafede Jul 15, 2026
f4d9795
Suppress RDKit error logs and increase cache size for SMILES normaliz…
Adafede Jul 15, 2026
c788ee1
Enhance error messages for invalid SMARTS and SMILES strings in valid…
Adafede Jul 15, 2026
6e3b871
Added test to prove rdkit 2026.3.3 failing on stereochemistry
mmzdouc Jul 16, 2026
bb57982
fixed backslash
mmzdouc Jul 16, 2026
0baa249
Update RDKit version and enhance stereochemistry validation in reacti…
Adafede Jul 16, 2026
43f4587
Added extra info to error/warning messages
mmzdouc Jul 17, 2026
6911d16
Unpinned python version
mmzdouc Jul 17, 2026
052dded
Updated .github workflow to use python version spec in pyproject.toml
mmzdouc Jul 17, 2026
adf3cab
updated CHANGELOG for newest version
mmzdouc Jul 17, 2026
060b70e
Update CHANGELOG.md
Adafede Jul 17, 2026
fc5412e
Replaced pre-commit with prek. Removed deptry due to hook installatio…
mmzdouc Jul 17, 2026
1a2ac6d
mite_schema update + checks
mmzdouc Jul 17, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -35,4 +37,4 @@ jobs:
pip install .[dev]

- name: Run tests
run: pytest
run: pytest
4 changes: 3 additions & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -51,4 +53,4 @@ jobs:
name: python-package-distributions
path: dist/
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-yaml
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.5
rev: 0.11.28
hooks:
- id: uv-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.15.21
hooks:
- id: ruff
args: [ --fix ]
Expand All @@ -25,4 +25,4 @@ repos:
name: pytest
entry: uv run pytest
language: system
pass_filenames: false
pass_filenames: false
25 changes: 16 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
This project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.5] 25-10-2025

Expand All @@ -15,7 +16,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- Missing/wrong Wikidata QID does not raise error, only logs warning (matches genpept/uniprot behavior)
- Missing/wrong Wikidata QID does not raise error, only logs warning (matches
genpept/uniprot behavior)

## [1.6.3] 30-09-2025

Expand All @@ -29,20 +31,24 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- `to_json()` and `to_html()` return changelog even if it is an empty list (compatibility with mite_web data submission)
- `to_json()` and `to_html()` return changelog even if it is an empty list
(compatibility with mite_web data submission)

## [1.6.1] 29-08-2025

### Changed

- Unpinned version of dependency of `mite_schema` to facilitate maintenance (should always pull the newest release)
- Unpinned version of dependency of `mite_schema` to facilitate maintenance
(should always pull the newest release)

## [1.6.0] 28-08-2025

### Changed

- In html_json generation, changed substrate from tuple to list of tuples to visualize substrates separately
- Changed Wikidata QID checking from raise errror to log warning (frequent 403 errors)
- In html_json generation, changed substrate from tuple to list of tuples to
visualize substrates separately
- Changed Wikidata QID checking from raise error to log warning (frequent 403
errors)

## [1.5.1] 26-07-2025

Expand Down Expand Up @@ -74,8 +80,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Bumped `mite_schema` version to `1.7.0`
- Reworked `ValidationManager`
- Implemented option for intramolecular reactions (recognized from reaction SMARTS)
- Pinned RDkit version to `2024.3.6`
- Implemented option for intramolecular reactions (recognized from reaction
SMARTS)
- Pinned RDkit version to `2024.3.6`

## [1.3.1] 02-12-2024

Expand Down Expand Up @@ -142,4 +149,4 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Added

- Initial version of `mite_extras`
- Initial version of `mite_extras`
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# CODE OF CONDUCT

See our organization-level [Code of Conduct](https://github.com/mite-standard/.github/blob/main/CODE_OF_CONDUCT.md).
See our organization-level [Code of
Conduct](https://github.com/mite-standard/.github/blob/main/CODE_OF_CONDUCT.md).
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# CONTRIBUTING

See our organization-level document on [Contributing](https://github.com/mite-standard/.github/blob/main/CONTRIBUTING.md).
See our organization-level document on
[Contributing](https://github.com/mite-standard/.github/blob/main/CONTRIBUTING.md).
73 changes: 47 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
mite_extras
==========
# mite_extras

[![DOI](https://zenodo.org/badge/804997522.svg)](https://doi.org/10.5281/zenodo.13941745)
[![PyPI version](https://badge.fury.io/py/mite-extras.svg)](https://badge.fury.io/py/mite-extras)
[![DOI](https://zenodo.org/badge/804997522.svg)](https://doi.org/10.5281/zenodo.13941745)
[![PyPI
version](https://badge.fury.io/py/mite-extras.svg)](https://badge.fury.io/py/mite-extras)

## Contents

Contents
-----------------
- [Overview](#overview)
- [Documentation](#documentation)
- [System Requirements](#system-requirements)
Expand All @@ -17,27 +16,38 @@ Contents

## Overview

**MITE** (Minimum Information about a Tailoring Enzyme) is a community-driven database for the characterization of tailoring enzymes.
These enzymes play crucial roles in the biosynthesis of secondary or specialized metabolites, naturally occurring molecules with strong biological activities, such as antibiotic properties.
**MITE** (Minimum Information about a Tailoring Enzyme) is a community-driven
database for the characterization of tailoring enzymes. These enzymes play
crucial roles in the biosynthesis of secondary or specialized metabolites,
naturally occurring molecules with strong biological activities, such as
antibiotic properties.

This repository contains functionality to validate MITE entries in JSON format.

For more information, visit the [MITE Data Standard Organization page](https://github.com/mite-standard) or read our [publication]( https://doi.org/10.1093/nar/gkaf969).
For more information, visit the [MITE Data Standard Organization
page](https://github.com/mite-standard) or read our
[publication](https://doi.org/10.1093/nar/gkaf969).

## Documentation

This repository provides validation functionality for verifying files following the MITE `JSON Schema` format, such as the files in the **MITE** data repository [mite_data](https://github.com/mite-standard/mite_data).
This repository provides validation functionality for verifying files following
the MITE `JSON Schema` format, such as the files in the **MITE** data repository
[mite_data](https://github.com/mite-standard/mite_data).

The validation functionality includes:
- Calling the `mite_schema` functionality
- Validation of reaction SMARTS (does the reaction SMARTS lead to the expected product when applied to a specified substrate)
- Sanitation of SMILES and reaction SMARTS
- Fetching of NCBI GenPept/UniProtKB IDs
The validation functionality includes: - Calling the `mite_schema` functionality
- Validation of reaction SMARTS (does the reaction SMARTS lead to the expected
product when applied to a specified substrate) - Sanitation of SMILES and
reaction SMARTS - Fetching of NCBI GenPept/UniProtKB IDs

`mite_extras` can be used as a CLI to automatically update MITE entries.
Furthermore, this repository can also be used as a library. For examples, see [mite_data](https://github.com/mite-standard/mite_data) or [mite_web](https://github.com/mite-standard/mite_web).
Furthermore, this repository can also be used as a library. For examples, see
[mite_data](https://github.com/mite-standard/mite_data) or
[mite_web](https://github.com/mite-standard/mite_web).

For errors, feature requests, and suggestions, please open an [Issue](https://github.com/mite-standard/mite_extras/issues) or start a discussion in the [MITE Discussion Forum](https://github.com/orgs/mite-standard/discussions/).
For errors, feature requests, and suggestions, please open an
[Issue](https://github.com/mite-standard/mite_extras/issues) or start a
discussion in the [MITE Discussion
Forum](https://github.com/orgs/mite-standard/discussions/).

## System Requirements

Expand All @@ -49,7 +59,8 @@ Local installation was tested on:

#### Python dependencies

Dependencies including exact versions are specified in the [pyproject.toml](./pyproject.toml) file.
Dependencies including exact versions are specified in the
[pyproject.toml](./pyproject.toml) file.

## Installation Guide

Expand All @@ -59,35 +70,41 @@ Dependencies including exact versions are specified in the [pyproject.toml](./py

## Quick Start

To validate MITE entries or update them to a new schema versiom, run:
To validate MITE entries or update them to a new schema version, run:

- `mite_extras -i <input/> -o <output/>`

## Attribution

### License

`mite_extras` is an open source tool licensed under the MIT license (see [LICENSE](LICENSE)).
`mite_extras` is an open source tool licensed under the MIT license (see
[LICENSE](LICENSE)).

### Publications

See [CITATION.cff](CITATION.cff) or [MITE online](https://mite.bioinformatics.nl/) for information on citing MITE.
See [CITATION.cff](CITATION.cff) or [MITE
online](https://mite.bioinformatics.nl/) for information on citing MITE.

### Acknowledgements

This work was supported by the Netherlands Organization for Scientific Research (NWO) KIC grant KICH1.LWV04.21.013.
This work was supported by the Netherlands Organization for Scientific Research
(NWO) KIC grant KICH1.LWV04.21.013.

## For Developers

*Nota bene: for details on how to contribute to the MITE project, please refer to [CONTRIBUTING](CONTRIBUTING.md).*
*Nota bene: for details on how to contribute to the MITE project, please refer
to [CONTRIBUTING](CONTRIBUTING.md).*

### Package Installation

*Please note that the development installation is only tested and supported on (Ubuntu) Linux.*
*Please note that the development installation is only tested and supported on
(Ubuntu) Linux.*

### With `uv` from GitHub

*Note: assumes that `uv` is installed locally - see the methods described [here](https://docs.astral.sh/uv/getting-started/installation/).*
*Note: assumes that `uv` is installed locally - see the methods described
[here](https://docs.astral.sh/uv/getting-started/installation/).*

```commandline
git clone https://github.com/mite-standard/mite_extras
Expand All @@ -96,6 +113,7 @@ uv run pre-commit install
```

All tests should be passing

```commandline
uv run pytest
```
Expand All @@ -104,4 +122,7 @@ uv run pytest

CI/CD via GitHub Actions runs on every PR and push to the `main` branch.

A new release created on the [mite_extras](https://github.com/mite-standard/mite_extras) GitHub page will automatically relay changes to [PyPI](https://pypi.org/project/mite-extras/) and [Zenodo](https://doi.org/10.5281/zenodo.13941744).
A new release created on the
[mite_extras](https://github.com/mite-standard/mite_extras) GitHub page will
automatically relay changes to [PyPI](https://pypi.org/project/mite-extras/) and
[Zenodo](https://doi.org/10.5281/zenodo.13941744).
5 changes: 5 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# typos exceptions for this repository
# Prevent typos from flagging project-specific tokens and acronyms
[default.extend-words]
sur = "sur"
NWO = "NWO"
91 changes: 91 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Configuration file for `prek`, a git hook framework written in Rust.
# See https://prek.j178.dev for more information.
#:schema https://www.schemastore.org/prek.json

[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
hooks = [
{ id = "check-added-large-files" },
{ id = "check-ast" },
{ id = "check-builtin-literals" },
{ id = "check-case-conflict" },
{ id = "check-docstring-first" },
{ id = "check-executables-have-shebangs" },
{ id = "check-illegal-windows-names" },
{ id = "check-merge-conflict" },
{ id = "check-symlinks" },
{ id = "check-shebang-scripts-are-executable" },
{ id = "check-symlinks" },
{ id = "check-toml" },
{ id = "check-xml" },
{ id = "check-yaml" },
{ id = "check-json", exclude = "^.devcontainer/devcontainer.json" },
{
id = "pretty-format-json",
exclude = "^.devcontainer/devcontainer.json",
args = ["--autofix"]
},
{ id = "debug-statements" },
{ id = "end-of-file-fixer" },
{ id = "mixed-line-ending" },
{ id = "pretty-format-json" },
{ id = "trailing-whitespace" }
]

[[repos]]
repo = "https://github.com/fpgmaas/deptry"
rev = "0.25.1"
hooks = [
{
id = "deptry",
language = "python",
additional_dependencies = ["deptry"],
exclude = '^(?!.*\.py$).*$'
}
]

[[repos]]
repo = "https://github.com/python-jsonschema/check-jsonschema"
rev = "0.37.4"
hooks = [{ id = "check-github-workflows" }, { id = "check-taskfile" }]

[[repos]]
repo = "https://github.com/asottile/pyupgrade"
rev = "v3.21.2"
hooks = [{ id = "pyupgrade" }]

[[repos]]
repo = "https://github.com/asottile/add-trailing-comma"
rev = "v4.0.0"
hooks = [{ id = "add-trailing-comma" }]

[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.21"
hooks = [{ id = "ruff-check", args = ["--fix"] }, { id = "ruff-format" }]

[[repos]]
repo = "https://github.com/tombi-toml/tombi-pre-commit"
rev = "v1.2.0"
hooks = [{ id = "tombi-format", exclude = '^uv\.lock$' }, { id = "tombi-lint" }]

[[repos]]
repo = "https://github.com/crate-ci/typos"
rev = "v1.48.0"
hooks = [{ id = "typos" }]

[[repos]]
repo = "https://github.com/astral-sh/uv-pre-commit"
rev = "0.11.29"
hooks = [{ id = "uv-lock" }]

[[repos]]
repo = "https://github.com/zizmorcore/zizmor-pre-commit"
rev = "v1.27.0"
hooks = [{ id = "zizmor", entry = "zizmor --fix=all ." }]

[[repos]]
repo = "https://github.com/jolars/panache-pre-commit"
rev = "v2.61.0"
hooks = [{ id = "panache-format" }, { id = "panache-lint" }]
Loading
Loading