Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e4b2921
Add sklearn-compatible LaplacianNB implementation with comprehensive …
bbaranow Aug 17, 2025
afb7cca
v0.7.0: Add legacy input detection and dynamic versioning
bbaranow Aug 18, 2025
8012195
improved readme, actions and precommit
bbaranow Aug 18, 2025
1637241
fix: update all workflows to use Python 3.10+ for compatibility
bbaranow Aug 18, 2025
4eb89c0
feat: migrate GitHub Actions workflows to use uv instead of conda/pip
bbaranow Aug 18, 2025
3f21760
style: fix ruff formatting in fingerprint_utils.py
bbaranow Aug 18, 2025
6918aa5
fix: resolve coverage measurement issues in CI workflows
bbaranow Aug 18, 2025
268cc83
fix: add relative_files = true to coverage config for py-cov-action c…
bbaranow Aug 18, 2025
de4b8dd
refactor: clean up test imports and improve RDKit handling
bbaranow Aug 18, 2025
9d90fc9
Merge pull request #79 from rdkit/refactor_package_for_sklearn_api
bbaranow Aug 18, 2025
935d218
fix: switch from trusted publishing to PyPI API tokens
bbaranow Aug 18, 2025
117ea4c
WIP:
bbaranow Aug 20, 2025
2671259
sync the file naming with sklearn
bbaranow Aug 20, 2025
56b5e95
cleaner version, sklearn working, CSR only
bbaranow Aug 20, 2025
8768210
add the benchmark and fix molecule creation
bbaranow Aug 20, 2025
c1bdbf8
0.7.1 version
bbaranow Aug 21, 2025
676ea6b
pre-commit rerun
bbaranow Aug 21, 2025
04b28fe
run ruff
bbaranow Aug 21, 2025
9d053fc
ruff check
bbaranow Aug 21, 2025
3060898
Merge pull request #80 from rdkit/fix_memory_issue
bbaranow Aug 21, 2025
b00cfd6
update README
bbaranow Aug 28, 2025
b7786e1
update README
bbaranow Aug 28, 2025
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
97 changes: 97 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
version: 2
updates:
# Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 8
commit-message:
prefix: "deps"
prefix-development: "deps-dev"
include: "scope"
labels:
- "dependencies"
- "python"
# Group updates to reduce PR noise
groups:
# Group all patch and minor updates
non-breaking:
patterns:
- "*"
update-types:
- "minor"
- "patch"
# Group testing and dev tools
dev-tools:
patterns:
- "pytest*"
- "coverage*"
- "ruff*"
- "pre-commit*"
- "bandit*"
update-types:
- "minor"
- "patch"
- "major"
# Be conservative with major updates for core dependencies
ignore:
- dependency-name: "scikit-learn"
update-types: ["version-update:semver-major"]
- dependency-name: "rdkit"
update-types: ["version-update:semver-major"]

# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 3
commit-message:
prefix: "ci"
include: "scope"
labels:
- "dependencies"
- "github-actions"
groups:
actions:
patterns:
- "*"
update-types:
- "minor"
- "patch"

# Pre-commit hooks (NEW!)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:15"
open-pull-requests-limit: 3
commit-message:
prefix: "pre-commit"
include: "scope"
labels:
- "dependencies"
- "pre-commit"
- "code-quality"
# Only update pre-commit related dependencies
allow:
- dependency-name: "pre-commit"
- dependency-name: "ruff*"
- dependency-name: "bandit*"
- dependency-name: "prettier*"
groups:
pre-commit-hooks:
patterns:
- "pre-commit*"
- "ruff*"
- "bandit*"
update-types:
- "minor"
- "patch"
142 changes: 142 additions & 0 deletions .github/workflows/auto-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Auto-publish Development Versions

# Trigger on pushes to develop or when PR is merged to develop
on:
push:
branches:
- develop
- "feature/**"
pull_request:
types: [closed]
branches:
- develop

jobs:
check-changes:
name: Check if code changed
runs-on: ubuntu-latest
outputs:
code-changed: ${{ steps.changes.outputs.code }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
code:
- 'src/**'
- 'pyproject.toml'
- 'tests/**'

publish-dev:
name: Publish development version
runs-on: ubuntu-latest
needs: check-changes
# Only run if code changed and on correct triggers
if: |
needs.check-changes.outputs.code-changed == 'true' && (
(github.event_name == 'push' && github.ref == 'refs/heads/develop') ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop')
)
defaults:
run:
shell: bash
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Setup build environment
run: |
uv sync --group test --no-dev
uv add --dev build twine

- name: Run tests before publishing
run: |
uv run coverage run -m pytest tests/ -x --tb=short

- name: Generate development version
id: version
run: |
# Get base version
BASE_VERSION=$(uv run python -c "import sys; sys.path.insert(0, 'src'); from laplaciannb import __version__; print(__version__)")
echo "Base version: $BASE_VERSION"

# Generate dev version with short commit hash and timestamp
SHORT_SHA=$(git rev-parse --short HEAD)
TIMESTAMP=$(date +%Y%m%d%H%M)
DEV_VERSION="${BASE_VERSION}.dev${TIMESTAMP}"

echo "Development version: $DEV_VERSION"
echo "dev_version=$DEV_VERSION" >> $GITHUB_OUTPUT

# Update version in __init__.py
sed -i "s/__version__ = \"$BASE_VERSION\"/__version__ = \"$DEV_VERSION\"/" src/laplaciannb/__init__.py

# Verify version was updated
UPDATED_VERSION=$(uv run python -c "import sys; sys.path.insert(0, 'src'); from laplaciannb import __version__; print(__version__)")
echo "Updated version: $UPDATED_VERSION"

- name: Build distribution
run: |
uv run python -m build

- name: Validate distribution
run: |
uv run twine check dist/*

# Test installation with uv
uv run pip install dist/*.whl
uv run python -c "import laplaciannb; print(f'Installed version: {laplaciannb.__version__}')"

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
print-hash: true

- name: Create GitHub summary
run: |
echo "## 🚀 Development Version Published" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** \`${{ steps.version.outputs.dev_version }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Branch:** \`${{ github.ref_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Installation" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "pip install laplaciannb==${{ steps.version.outputs.dev_version }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Or install latest development version:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "pip install --pre laplaciannb" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

- name: Comment on PR (if applicable)
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `🚀 **Development version published!**\n\n**Version:** \`${{ steps.version.outputs.dev_version }}\`\n\nInstall with:\n\`\`\`bash\npip install laplaciannb==${{ steps.version.outputs.dev_version }}\n\`\`\``
})
Loading
Loading