Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7723066
Add comprehensive tests, documentation, and error handling improvements
adamjohnwright Oct 30, 2025
830e05c
Improving db_id_to_name_mapping file. We are not changing functionality.
adamjohnwright Oct 30, 2025
fd78304
Improve database ID to name mapping script to production level
adamjohnwright Oct 30, 2025
a13b0ab
Fix ruff linting errors across codebase
adamjohnwright Oct 30, 2025
e0ee391
Fix CI test failures - skip tests requiring network file
adamjohnwright Oct 30, 2025
6ac642a
latest claude work
adamjohnwright Mar 27, 2026
b7c2093
Clean up stale analysis docs and scratch scripts
adamjohnwright Apr 27, 2026
6061487
Split tests into unit / integration / database tiers
adamjohnwright Apr 27, 2026
31543e6
Make integration/database tests handle R-HSA stable IDs
adamjohnwright Apr 27, 2026
39f62ee
Make and_or in logic_network.csv mean reaction-level requirement
adamjohnwright Apr 27, 2026
1fc7ef1
Track EntitySet membership for every decomposed leaf
adamjohnwright Apr 27, 2026
d669db9
Lock the decomposition contract: docs, docstring, tests
adamjohnwright Apr 27, 2026
66fe7ec
Add boundary decomposition: synthetic assembly/dissociation edges
adamjohnwright Apr 27, 2026
33909b5
Lock invariants for boundary edges
adamjohnwright Apr 27, 2026
c851623
Fix boundary-leaf disconnect: reuse existing UUIDs
adamjohnwright Apr 27, 2026
c22cd62
Tighten quirks and remove dead code in logic_network_generator
adamjohnwright Apr 27, 2026
1995145
Defer Neo4j connection to first use (and read env vars)
adamjohnwright Apr 27, 2026
e853a6a
Bulk-fetch catalysts and regulators in single Cypher queries
adamjohnwright Apr 27, 2026
57196b9
Thread reaction_id through best_matches to fix mislabeled VRs
adamjohnwright Apr 27, 2026
50564e7
Fix uri NameError in connection-failure messages and trim dead code
adamjohnwright Apr 27, 2026
f595846
Parameterize all Cypher queries in neo4j_connector
adamjohnwright Apr 27, 2026
3d9d25c
Test, optimize, and tidy best_reaction_match
adamjohnwright Apr 28, 2026
45c8e9d
Fix regulator-disconnect: share one UUID across emissions
adamjohnwright Apr 28, 2026
77200c3
Unify catalyst and regulator schema: reaction_id, entity_id
adamjohnwright Apr 28, 2026
cf522c1
Replace per-iteration pd.concat with list+index store (~10x speedup)
adamjohnwright Apr 28, 2026
8976937
Pair every input/output alternative instead of dropping surplus
adamjohnwright Apr 28, 2026
43527c4
Replace O(N) merge scan with union-find in entity UUID merging
adamjohnwright Apr 28, 2026
5507afe
Make validation script tolerant of curator-file schema drift
adamjohnwright Apr 29, 2026
e68bd5d
Validation suite + MP-BioPath benchmark results
adamjohnwright Apr 29, 2026
66861b2
Validation extensions: experimental ground truth + Neo4j path cross-c…
adamjohnwright Apr 29, 2026
cc399e2
Add network-correctness framing to validation README
adamjohnwright Apr 29, 2026
7da8833
Document the bug-candidate root cause: substrate-consumption gap
adamjohnwright Apr 29, 2026
7b4377d
Tidying pass: README rewrite, drop stale config, reorganize docs
adamjohnwright Apr 29, 2026
a59b68d
Fix all 19 mypy errors and re-enable type checking in CI
adamjohnwright Apr 29, 2026
5b43827
Security, coverage, and Reactome version-tracking
adamjohnwright Apr 29, 2026
12bf188
Test matrix, refresh CONTRIBUTING.md, fix pre-commit mypy hook
adamjohnwright Apr 29, 2026
40d1db5
Fix CI collection failure: guard output/ scan at module level
adamjohnwright Apr 29, 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
19 changes: 19 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Neo4j Database Connection
# Connection URL for the Reactome Neo4j database
NEO4J_URL=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password_here

# Pathway Processing
# Path to file containing list of pathway IDs to process
PATHWAY_LIST_FILE=pathways.tsv

# Output Configuration
# Directory where generated files will be saved
OUTPUT_DIR=output

# Logging Configuration
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# Log file path (optional, logs to console if not set)
# LOG_FILE=pathway_generation.log
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug Report
about: Report a bug to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

## Bug Description

A clear and concise description of what the bug is.

## Steps to Reproduce

1. Run command '...'
2. With pathway ID '...'
3. See error

## Expected Behavior

A clear description of what you expected to happen.

## Actual Behavior

What actually happened instead.

## Error Message

```
Paste error message here if applicable
```

## Environment

- OS: [e.g., Ubuntu 22.04, macOS 14]
- Python Version: [e.g., 3.10.5]
- Poetry Version: [e.g., 1.7.1]
- Neo4j Version: [e.g., Release94]

## Pathway Information

- Pathway ID: [e.g., 69620]
- Pathway Name: [if known]

## Additional Context

Add any other context about the problem here, such as:
- Does it happen with all pathways or just specific ones?
- Is this a regression (did it work before)?
- Any relevant log files or output
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Reactome Community
url: https://reactome.org/community
about: Ask questions and discuss with the Reactome community
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description

A clear and concise description of the feature you'd like to see.

## Problem Statement

What problem does this feature solve? Is your feature request related to a problem?
Example: "I'm always frustrated when..."

## Proposed Solution

Describe the solution you'd like to see implemented.

## Alternatives Considered

Describe any alternative solutions or features you've considered.

## Use Case

How would you use this feature? Provide specific examples if possible.

## Additional Context

Add any other context, screenshots, or examples about the feature request here.

## Would you like to implement this?

- [ ] Yes, I'd like to work on this
- [ ] No, just suggesting
- [ ] Need guidance on how to implement
65 changes: 65 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Description

Brief description of what this PR does.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code quality improvement (refactoring, performance, etc.)

## Related Issue

Fixes #(issue number)

## Changes Made

- Change 1
- Change 2
- Change 3

## Testing

### Unit Tests
- [ ] All existing unit tests pass locally (`poetry run pytest tests/ -v -m "not database"`)
- [ ] Added new unit tests for changes (if applicable)

### Integration Tests (Optional - requires Neo4j)
- [ ] All integration tests pass locally (`poetry run pytest tests/ -v`)

### Manual Testing
Describe any manual testing performed:
- Tested with pathway ID(s):
- Verified output files:

## Code Quality

- [ ] Code follows project style guidelines (ruff)
- [ ] Ran `poetry run ruff check src/` with no errors
- [ ] Ran `poetry run ruff format src/`
- [ ] Type hints added/updated where applicable
- [ ] Ran `poetry run mypy --ignore-missing-imports src/` (optional)

## Documentation

- [ ] Updated README.md (if needed)
- [ ] Added/updated docstrings
- [ ] Updated relevant documentation in `docs/`

## Checklist

- [ ] Self-review completed
- [ ] Code is well-commented, particularly in complex areas
- [ ] No debugging code left in (print statements, breakpoints, etc.)
- [ ] No credentials or sensitive information in code
- [ ] Git commit messages are clear and descriptive

## Screenshots (if applicable)

Add screenshots or terminal output if it helps explain the changes.

## Additional Notes

Any additional information that reviewers should know.
6 changes: 3 additions & 3 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install

- name: Type check (mypy on src/)
run: poetry run mypy src/

- name: Run unit tests with coverage (no Neo4j, no generated artifacts)
# 40% floor reflects unit-tier scope only: pathway_generator and
# neo4j_connector are exercised in the integration/database tiers and
# naturally lower the unit number. Raise the floor as those tiers
# become CI-runnable.
run: poetry run pytest tests/ -v -m "not database and not integration" --cov=src --cov-report=term --cov-fail-under=40
43 changes: 39 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
# Log files
*.log
debug_log.txt
debug_run.log
pathway_generation.log
test_generation.log

# Ignore Python bytecode files
# Python bytecode files
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.egg-info/

# Test artifacts
.pytest_cache/
.coverage
htmlcov/
*.coverage

#output folder of results
# IDE
.vscode/
.idea/
*.swp

# OS
.DS_Store
Thumbs.db

# Temporary files
*.tmp
*.bak

# Environment variables
.env
.env.*
!.env.example

# Output folder of results
output

#vim files
*.swp
# Generated data files
db_id_to_name_mapping.tsv
pathway_logic_network_*.csv
uuid_mapping_*.csv
reaction_connections_*.csv
decomposed_uid_mapping_*.csv
best_matches_*.csv
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
files: ^src/
# Match CI: no --ignore-missing-imports, real stubs for our deps.
# types-all was archived; replaced with the specific stubs we need.
additional_dependencies:
- pandas-stubs
Loading
Loading