Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
8fa8b9a
fix: refactored the namer
r-fedorov May 10, 2026
99eb4f4
fix:namimg_rules
r-fedorov May 10, 2026
3297eb9
Feat: added atom and bonds index metadata to the Assembly Class
r-fedorov May 11, 2026
da7aa05
feat: traces
r-fedorov May 12, 2026
aac5944
feat: data registry
r-fedorov May 12, 2026
4c31c9c
naming rules
r-fedorov May 12, 2026
6b78c5f
feat: text registry
r-fedorov May 12, 2026
6fab2c1
feat: basic charge support
r-fedorov May 16, 2026
7fa947d
feat: very basic sprio-compounds support
r-fedorov May 18, 2026
a90a9d3
feat:dispiro support
r-fedorov May 18, 2026
a875940
fix: missing changes
r-fedorov May 18, 2026
f9f53d3
additional charge support
r-fedorov May 18, 2026
20c414b
feat: atom mapping
r-fedorov May 20, 2026
5329969
fix: HW naming rule
r-fedorov May 23, 2026
5310700
fix: mssing files
r-fedorov May 26, 2026
97bd865
chore: repository hygiene scaffold
kjappelbaum May 26, 2026
526cb4c
style: apply ruff format and import-sort sweep across package
kjappelbaum May 26, 2026
6680f29
refactor: rename package to bluenamer, adopt src/ layout, fix CI
kjappelbaum May 26, 2026
877cd71
test: xfail rdkit-version-sensitive ammonio name assertion
kjappelbaum May 26, 2026
5144829
ci: run on pull_request to any base, not just main/refactor_namer
kjappelbaum May 26, 2026
2b26c73
feat: typed Result, OPSIN roundtrip flag, batch API, CLI
kjappelbaum May 26, 2026
66f234b
test: hypothesis fuzz suite + diverse corpus + opt-in PubChem/QM9 tests
kjappelbaum May 26, 2026
729fa97
feat: describe() + super-easy output types
kjappelbaum May 26, 2026
a7206a9
feat: FastAPI service + Dockerfile + compose + CI image smoke
kjappelbaum May 26, 2026
5e0d974
fix(docker): use default-jre-headless
kjappelbaum May 26, 2026
3dfa144
test: fuzz the OPSIN roundtrip + simplify dataset tests
kjappelbaum May 26, 2026
82c7bc3
test(pubchem): floor naming rate at 90%
kjappelbaum May 26, 2026
fc7ada9
refactor(describer): structure-driven prose (port from earlier branch)
kjappelbaum May 26, 2026
bec3b82
test: rdkit-version compat suite (golden corpus + matrix CI)
kjappelbaum May 27, 2026
201df31
Merge pull request #1 from lamalab-org:chore/pr1-hygiene
r-fedorov May 28, 2026
d77517b
Merge pull request #2 from lamalab-org:feat/pr2-public-api
r-fedorov May 28, 2026
1da01c5
Merge remote-tracking branch 'origin/chore/pr1-hygiene' into refactor…
r-fedorov May 28, 2026
31658ea
feat: qm and zinc tests
r-fedorov May 28, 2026
5da8d38
fix: qm9 testing in batch, import correction in zinc
r-fedorov May 28, 2026
dda1fcc
feat: Added nitrogen_roles.py with NitrogenChainRole and graph classi…
r-fedorov May 28, 2026
b8204c5
bond-order aware phosphorus rendering, graph-derived simple azine tem…
r-fedorov May 28, 2026
a708eeb
opsin-derived logic
r-fedorov Jun 1, 2026
d550e71
feat: opsin grammmar import
r-fedorov Jun 1, 2026
b60f7e0
atom mapping metadata
r-fedorov Jun 1, 2026
41bf51e
fix: atomic audit
r-fedorov Jun 2, 2026
ed58b0f
fix: better atom to token mapping
r-fedorov Jun 2, 2026
bd217b5
fix: emited "" replaced
r-fedorov Jun 2, 2026
dc2ee3a
fix: binding tokens to atoms from the trace before fallback
r-fedorov Jun 3, 2026
5d208c4
token assigment test on qm9
r-fedorov Jun 3, 2026
c22f8fe
fix: Python 3.10 reaches end-of-life on October 31, 2026
r-fedorov Jun 3, 2026
f4fe2e5
fix: ruff fix
r-fedorov Jun 3, 2026
482dc11
feat: updated ruff version
r-fedorov Jun 3, 2026
244bace
typo
r-fedorov Jun 3, 2026
210604d
fix: processes="auto" defaults to None, which uses all available cpus
r-fedorov Jun 3, 2026
b69da2d
fix: dataset dependesies for new tests
r-fedorov Jun 3, 2026
e49dedd
fix: descripton
r-fedorov Jun 3, 2026
3dc21f1
debbuing info
r-fedorov Jun 4, 2026
ddbeaa9
eval for OPSIN and ZINC
r-fedorov Jun 4, 2026
e99547f
fix: ZINC 22 eval per parquette
r-fedorov Jun 4, 2026
40ec885
Merge remote-tracking branch 'remotes/origin/feat/pr3-tests-fuzz-data…
r-fedorov Jun 4, 2026
6774f18
fix: all mols are compared to the standertized smile as deafult
r-fedorov Jun 4, 2026
5bc0d20
opsin verifier uses standartiszied molecules now
r-fedorov Jun 4, 2026
1ae470e
remove utils
r-fedorov Jun 4, 2026
645833e
ruff check
r-fedorov Jun 4, 2026
ade0380
fix: standatrize import mol import
r-fedorov Jun 4, 2026
aeee131
doc: how to run tests
r-fedorov Jun 8, 2026
ac5cc11
Merge remote-tracking branch 'remotes/origin/feat/pr4-describe' into …
r-fedorov Jun 8, 2026
701928a
Merge remote-tracking branch 'remotes/origin/feat/pr5-docker-web' int…
r-fedorov Jun 8, 2026
4b4ca89
fix: data is already inside the package and src is already handeled
r-fedorov Jun 8, 2026
8cd16ed
Merge remote-tracking branch 'remotes/origin/fix/fuzz-roundtrip' into…
r-fedorov Jun 9, 2026
b5ec7cd
Merge remote-tracking branch 'remotes/origin/feat/pr8-rdkit-compat' i…
r-fedorov Jun 9, 2026
63cb53d
fix:new retained names for biphenyl-compunds (not an rdkit issue)
r-fedorov Jun 9, 2026
c55de15
Merge pull request #11 from lamalab-org/merge_try
r-fedorov Jun 9, 2026
df01573
Revert "refactor(describer): structure-driven prose (port from earlie…
r-fedorov Jun 9, 2026
228d494
fix:ruff
r-fedorov Jun 9, 2026
60dd7d4
fix: ruff check
r-fedorov Jun 9, 2026
db15af9
Merge pull request #12 from lamalab-org/merge_try
r-fedorov Jun 9, 2026
b0a8f7c
Merge pull request #10 from lamalab-org/dev
r-fedorov Jun 9, 2026
ab66060
fix: dedicated fodlers for evals
r-fedorov Jun 9, 2026
8b468f9
metadata for chains
r-fedorov Jun 15, 2026
0dccbcb
fix: order selection of parents
r-fedorov Jun 17, 2026
4aa9452
faet: BranchNamer richer class, SubgraphNamer richer class
r-fedorov Jun 17, 2026
6d2a256
fix: assembly_substituent_tree() now accepts precomputed trace_segmen…
r-fedorov Jun 17, 2026
61f9bf3
Merge pull request #13 from lamalab-org/dev
r-fedorov Jun 17, 2026
94c4cb8
Merge remote-tracking branch 'remotes/origin/dev_priorty_reorder' int…
r-fedorov Jun 17, 2026
d74d999
fix:ruff
r-fedorov Jun 17, 2026
d8ff897
fix: _prefer_spiro_backbone_components() now maps shared counts for e…
r-fedorov Jun 17, 2026
00258ed
Merge pull request #15 from lamalab-org/dev
r-fedorov Jun 17, 2026
effc569
fix: stereo descriptor atom binding
r-fedorov Jun 17, 2026
366ef18
fix: Precomputed carbon substituent bond/charge scopes in _carbon_sub…
r-fedorov Jun 17, 2026
cfdded4
_should_prioritize_renderer_stereo() now checks token_binding.text in…
r-fedorov Jun 17, 2026
b9961ca
Merge pull request #16 from lamalab-org/dev
r-fedorov Jun 17, 2026
93f1e79
feat: better describer and human describer
r-fedorov Jun 17, 2026
69d991d
basic human text
r-fedorov Jun 18, 2026
d53d7cc
human description
r-fedorov Jun 18, 2026
3fe03ca
fix: failing test
r-fedorov Jun 18, 2026
189fda1
fix: component_namer
r-fedorov Jun 18, 2026
86009b7
fix: better human descriptor
r-fedorov Jun 18, 2026
079411f
feat: human describer description
r-fedorov Jun 18, 2026
c88f51e
Update README.md
r-fedorov Jun 18, 2026
159e209
Merge pull request #17 from lamalab-org/dev
r-fedorov Jun 18, 2026
71c0f82
feat: atom-id for debuggin purpouses
r-fedorov Jun 19, 2026
bf933f0
Merge pull request #18 from lamalab-org/dev
r-fedorov Jun 19, 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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.git
.github
.venv
venv
__pycache__
*.pyc
*.pyo
.pytest_cache
.ruff_cache
.mypy_cache
.coverage
htmlcov
.hypothesis
build
dist
*.egg-info
examples
tests
docs
*.md
!README.md
123 changes: 123 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: CI

on:
push:
branches: [main, refactor_namer]
pull_request:
branches: ["**"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install "ruff==0.15.15"
- name: Ruff check
run: ruff check src/bluenamer
- name: Ruff format check
run: ruff format --check src/bluenamer

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Set up JDK (for OPSIN)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run fast tests
run: |
pytest -m "not slow and not dataset and not golden" \
--maxfail=20 \
--durations=20

rdkit-compat:
# Strict golden-output regression across RDKit versions. Detects
# naming output that drifts with the RDKit upgrade cycle (aromaticity,
# kekulisation, H-count perception). Each matrix row pins a specific
# rdkit and runs only the `golden` test.
runs-on: ubuntu-latest
needs: [lint]
strategy:
fail-fast: false
matrix:
rdkit-version:
- "2024.03.6"
- "2024.09.6"
- "2025.03.6"
- "2025.09.5"
- "2026.3.2"
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install package + pinned rdkit
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install --force-reinstall --no-deps "rdkit==${{ matrix.rdkit-version }}"

- name: Show installed versions
run: |
python -c "import rdkit, sys; print('python', sys.version); print('rdkit', rdkit.__version__)"

- name: Run golden corpus test
run: pytest -m golden -v --no-header -rA

docker:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
load: true
tags: bluenamer:ci

- name: Smoke-test the image
run: |
docker run -d --name bluenamer-ci -p 8000:8000 bluenamer:ci
for i in $(seq 1 30); do
if curl -fsS http://127.0.0.1:8000/healthz > /tmp/health.json; then
cat /tmp/health.json
exit 0
fi
sleep 2
done
docker logs bluenamer-ci
exit 1
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Hatch
.hatch/

# Unit test / coverage / type checkers
.tox/
.nox/
.coverage
.coverage.*
.cache
.pytest_cache/
.mypy_cache/
.ruff_cache/
htmlcov/
coverage.xml
*.cover
.hypothesis/

# Environments
.env
.venv
env/
venv/
ENV/
.python-version

# IDEs
.vscode/
.idea/
*.swp
*.swo
.DS_Store

# Notebooks
.ipynb_checkpoints/

# Project-specific
*.log
*.jar
opsin*.jar
data/cache/
.cache/

# Docker
.docker/
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=1024"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# syntax=docker/dockerfile:1.7

# ----- builder stage -----------------------------------------------------
FROM python:3.12-slim AS builder

ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1

WORKDIR /build

# Build deps for rdkit wheels: typically just runtime; the manylinux wheels
# carry their own libs. Keep this stage thin.
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*

COPY pyproject.toml README.md ./
COPY src ./src

# Install into a clean prefix so we can copy a slim layer into the runtime.
RUN python -m pip install --upgrade pip \
&& python -m pip install --prefix=/install ".[web,opsin]"


# ----- runtime stage -----------------------------------------------------
FROM python:3.12-slim AS runtime

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/usr/local/bin:${PATH}"

# Java runtime for OPSIN round-trip verification (py2opsin shells out to java;
# OPSIN itself requires Java >=8 so the newer JRE is fine).
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
default-jre-headless \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Bring in the installed package + deps from the builder stage.
COPY --from=builder /install /usr/local

# Non-root user.
RUN useradd --create-home --shell /bin/bash bluenamer
USER bluenamer
WORKDIR /home/bluenamer

EXPOSE 8000

HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -fsS http://127.0.0.1:8000/healthz || exit 1

CMD ["python", "-m", "bluenamer.web", "--host", "0.0.0.0", "--port", "8000"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 lamalab-org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading