Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1d2a716
chore: added repository configuration files
shakefu Jun 8, 2025
5888c0d
refactor(humbledb): better support for Python 3.x
shakefu Jun 8, 2025
a6dea20
chore(pre-commit): add hook for managing the uv lockfile, uncomment a…
shakefu Jun 20, 2025
0f50da4
build(lock): update pyconfig
shakefu Jun 20, 2025
d4415ab
chore(gitignore): ignore VSCode settings, Cursor rules
shakefu Jun 20, 2025
86cc87e
refactor(humbledb): support for pymongo 4.x
shakefu Jun 21, 2025
272dfe3
ci(release): update release flows to use bot app
shakefu Jun 21, 2025
e66f2e1
ci(lint/test): update for better workflows
shakefu Jun 21, 2025
9ff72ac
test: wip
shakefu Jun 21, 2025
e5e0692
test(coverage): depend on pytest-cov
shakefu Jun 22, 2025
5e35ba8
test(coverage): omit tests from coverage, version helpers
shakefu Jun 22, 2025
c4ef3cc
test(humbledb): refactor remaining tests to use pytest fixture for mo…
shakefu Jun 22, 2025
ff0343a
build(script): added docs script for building documentation
shakefu Jun 22, 2025
84cff27
build(dev-deps): depend on coveralls
shakefu Jun 22, 2025
b9b7ec0
build(dev-deps): update docs dependencies so they function correctly
shakefu Jun 22, 2025
a5cc0f8
build(dev-deps): no longer depend on 'mock', use 'unittest.mock' instead
shakefu Jun 22, 2025
56495ab
docs(readme): update readme to use modern markdown, have more details
shakefu Jun 22, 2025
b0cf64b
feat(humbledb)!: migrate to Pymongo 4.x, Pytest, and other changes
shakefu Jun 22, 2025
40720b6
fix(humbledb): untangle imports to remove cycle
shakefu Jun 22, 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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @shakefu

# Ignore certain files so they can be auto-updated
.pre-commit-config.yaml
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: shakefu
2 changes: 2 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
self-hosted-runner:
labels: []
127 changes: 127 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
name: CI

on:
# Allow this config to be reused by other workflows in the repo
workflow_call:
pull_request:
branches: [main]

concurrency:
group: ci-${{ github.event.number || 'main' }}
cancel-in-progress: true

jobs:
preview:
name: Release preview
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Generate notes
id: notes
uses: open-turo/actions-release/semantic-release@4d8a6b6aa2d051e7dba0429d8d08beef827b5ccd # v4
with:
branches: ${{ github.head_ref }}
override-github-ref-name: ${{ github.head_ref }}
dry-run: true
ci: false
- name: Find Comment
uses: peter-evans/find-comment@a54c31d7fa095754bfef525c0c8e5e5674c4b4b1 # v2
id: find
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: release-notes-preview
- name: Comment preview
uses: peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d # v2
if: steps.notes.outputs.new-release-notes != ''
with:
comment-id: ${{ steps.find.outputs.comment-id }}
issue-number: ${{ github.event.number }}
edit-mode: replace
body: |
<!-- release-notes-preview -->

## Release notes preview

${{ steps.notes.outputs.new-release-notes }}

lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v5
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
with:
version: "0.7.12"
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Pytest
uv sync --locked --all-extras --dev
uv run pytest --cov
uv run coveralls

docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v5
with:
python-version-file: ".python-version"
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
with:
version: "0.7.12"
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Build docs
uv run script/docs

checks:
name: Checks
needs: [lint, test, docs]
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Renovate / Auto-approve
if: github.actor == 'renovatebot' || github.actor == 'renovate[bot]'
uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Renovate / Auto-merge
if: github.actor == 'renovatebot' || github.actor == 'renovate[bot]'
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 # v0.15.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: dependencies
MERGE_METHOD: rebase
84 changes: 84 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
name: Release

on:
push:
branches: [main]

concurrency:
group: release

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yaml

release:
name: Release
needs: ci
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.new-release-version }}
published: ${{ steps.version.outputs.new-release-published }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- id: version
uses: open-turo/actions-release/semantic-release@4d8a6b6aa2d051e7dba0429d8d08beef827b5ccd # v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dry-run: true
ci: false

publish:
name: Publish
needs: release
runs-on: ubuntu-latest
if: needs.release.outputs.published == 'true'
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- id: authenticate
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
with:
app-id: ${{ secrets.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ steps.authenticate.outputs.token }}
fetch-depth: 0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v5
with:
python-version-file: ".python-version"
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
with:
version: "0.7.12"
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- run: |
# Install dependencies
uv sync --locked --all-extras --dev
- id: version
uses: open-turo/actions-release/semantic-release@4d8a6b6aa2d051e7dba0429d8d08beef827b5ccd # v4
with:
github-token: ${{ steps.authenticate.outputs.token }}
dry-run: true
ci: false
- run: |
# Update version
uv version ${{ steps.version.outputs.new-release-version }}
- uses: actions-js/push@master
with:
message: "chore: ${{ steps.version.outputs.new-release-version }} [skip actions]"
github_token: ${{ steps.authenticate.outputs.token }}
- run: |
# Build package
uv build
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
- uses: open-turo/actions-release/semantic-release@4d8a6b6aa2d051e7dba0429d8d08beef827b5ccd # v4
with:
github-token: ${{ steps.authenticate.outputs.token }}
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ pip-log.txt

# Unit test / coverage reports
.coverage
.coverage.*
coverage.xml
htmlcov/
.tox
.nox
.cache
.pytest_cache/
.hypothesis/
*.cover
*.py,cover
.coverage_html/
.pytest_cache

# Translations
*.mo
Expand All @@ -31,6 +42,12 @@ pip-log.txt

# Sphinx
docs/_build
docs/_output

# Ipython Notebooks
*.ipynb
# Cursor
.cursorrules
.cursor
.cursor/rules

# VSCode
.vscode
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.22.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
stages: [pre-commit]
# - repo: https://github.com/rhysd/actionlint
# rev: v1.7.7
# hooks:
# - id: actionlint
# - repo: https://github.com/jumanjihouse/pre-commit-hooks
# rev: 3.0.0 # or specific git tag
# hooks:
# - id: shellcheck
# - id: shfmt
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
args: ["--fix", ".cursorrules"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.13
hooks:
# Run the Ruff linter.
- id: ruff
# Run the Ruff formatter.
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.7.13
hooks:
- id: uv-lock
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
36 changes: 36 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.12"
jobs:
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --all-extras

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optionally build your docs in additional formats
formats:
- pdf
- epub

# Python requirements required to build your documentation
python:
install:
- requirements: docs/requirements.txt
42 changes: 42 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"type": [
{ "type": "build", "section": "Build System", "hidden": false },
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
},
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{ "type": "style", "section": "Styles", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": false }
]
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
}
}
],
"@semantic-release/github"
]
}
Loading
Loading