Skip to content

Commit 4b46a6c

Browse files
committed
Enhance Python bindings with comprehensive improvements and CSV import enhancements
- Add comprehensive tests for ArcadeDB Python bindings - Enhance Python bindings documentation and tests with improved navigation - Add realistic CRUD operations benchmark and performance comparisons - Add GitHub Actions workflow to test Python examples - Increase timeout for Python examples to prevent hanging during execution - Increase JVM heap size for large CSV imports and enhance error messaging for memory issues - Refactor workflow triggers for Python bindings tests - Remove obsolete GitHub Actions workflows - Add sync-upstream script to manage upstream changes - Update documentation links to point to the new arcadedb-embedded-python site - Updated README.md for examples to include NULL handling and improved data type descriptions - Add download_sample_data.py to automate downloading and modifying the MovieLens dataset - Update pyproject.toml to change the Bug Tracker link to the new repository - Rename example script from 04_data_import.py to 04_csv_import_documents.py for clarity - Enhance Importer class to support importing CSV as documents, vertices, and edges with improved options - Remove JSONL import functionality from the Importer class and tests - Improve type inference and error handling in the results processing - Updated the CSV import example to reflect automatic type inference by Java, handling NULL values, and improved performance analysis with a larger MovieLens dataset (36M+ records) - Revised documentation in index.md to clarify the enhancements in CSV import functionality and performance metrics - Removed outdated search example in queries.md to streamline the guide - Improved the 04_csv_import_documents.py example with better handling of dataset selection, validation of results, and added full-text search demonstration - Updated download_sample_data.py to support downloading both large and small MovieLens datasets, with enhanced user guidance and progress reporting - Added detailed comments and structured output for dataset information and sizes - Fix prettier pre-commit hook to use types_or instead of types for proper markdown formatting
1 parent 011c1ea commit 4b46a6c

90 files changed

Lines changed: 29348 additions & 968 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
package/src/main/scripts/console.bat eol=crlf
22
package/src/main/scripts/server.bat eol=crlf
3+
4+
# Fork-specific paths - automatically prefer our version during upstream sync
5+
# See ./sync-upstream.sh for sync workflow
6+
/README.md merge=ours
7+
.github/workflows/** merge=ours
8+
bindings/python/** merge=ours
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
release:
5+
types: [published] # Trigger when GitHub Release is published
6+
# Release tag should contain 'python' (case-insensitive, e.g., v25.9.1-python, v1.0.0-Python)
7+
8+
# Allow manual trigger for testing
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version to deploy (e.g., 25.9.1 or dev)'
13+
required: true
14+
default: 'dev'
15+
set_latest:
16+
description: 'Set as latest version?'
17+
required: true
18+
type: boolean
19+
default: true
20+
21+
permissions:
22+
contents: write # Need write to push to gh-pages branch
23+
pages: write
24+
id-token: write
25+
26+
# Allow only one concurrent deployment
27+
concurrency:
28+
group: "pages"
29+
cancel-in-progress: false
30+
31+
jobs:
32+
deploy:
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: https://humemai.github.io/arcadedb-embedded-python/
37+
38+
steps:
39+
- name: Check if this is a Python release
40+
if: github.event_name == 'release'
41+
id: check-python-release
42+
run: |
43+
TAG_NAME="${{ github.event.release.tag_name }}"
44+
TAG_LOWER=$(echo "$TAG_NAME" | tr '[:upper:]' '[:lower:]')
45+
46+
if [[ "$TAG_LOWER" == *"python"* ]]; then
47+
echo "✅ This is a Python release: $TAG_NAME"
48+
echo "is-python-release=true" >> $GITHUB_OUTPUT
49+
else
50+
echo "⏭️ Not a Python release (tag: $TAG_NAME), skipping docs deployment"
51+
echo "is-python-release=false" >> $GITHUB_OUTPUT
52+
exit 0
53+
fi
54+
55+
- name: Skip workflow for non-Python releases
56+
if: github.event_name == 'release' && steps.check-python-release.outputs.is-python-release != 'true'
57+
run: |
58+
echo "This is not a Python release, exiting gracefully"
59+
exit 0
60+
61+
- name: Checkout repository
62+
if: github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true'
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+
with:
65+
fetch-depth: 0 # Full history for mike versioning
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Set up Python
69+
if: github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true'
70+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
71+
with:
72+
python-version: '3.11'
73+
cache: 'pip'
74+
75+
- name: Install dependencies
76+
if: github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true'
77+
working-directory: bindings/python
78+
run: |
79+
pip install --upgrade pip
80+
pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mike
81+
82+
- name: Configure Git
83+
if: github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true'
84+
run: |
85+
git config user.name "github-actions[bot]"
86+
git config user.email "github-actions[bot]@users.noreply.github.com"
87+
88+
- name: Extract version from release tag or input
89+
if: github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true'
90+
id: version
91+
run: |
92+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
93+
VERSION="${{ github.event.inputs.version }}"
94+
SET_LATEST="${{ github.event.inputs.set_latest }}"
95+
else
96+
# Extract version from release tag (v25.9.1-python -> 25.9.1 or v25.9.1.1-python -> 25.9.1.1)
97+
TAG_NAME="${{ github.event.release.tag_name }}"
98+
TAG_LOWER=$(echo "$TAG_NAME" | tr '[:upper:]' '[:lower:]')
99+
100+
# Verify tag contains 'python' (case-insensitive)
101+
if [[ ! "$TAG_LOWER" == *"python"* ]]; then
102+
echo "❌ Release tag should contain 'python' (case-insensitive), got: $TAG_NAME"
103+
exit 1
104+
fi
105+
106+
# Strip 'v' prefix and remove everything after and including '-python' or '-Python', etc.
107+
VERSION="${TAG_NAME#v}" # Remove 'v' prefix
108+
VERSION="${VERSION%%-[Pp][Yy][Tt][Hh][Oo][Nn]*}" # Remove '-python' suffix (case-insensitive)
109+
SET_LATEST="true"
110+
fi
111+
echo "version=$VERSION" >> $GITHUB_OUTPUT
112+
echo "set_latest=$SET_LATEST" >> $GITHUB_OUTPUT
113+
echo "📦 Deploying documentation version: $VERSION"
114+
115+
- name: Deploy with mike (set as latest)
116+
if: (github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true') && steps.version.outputs.set_latest == 'true'
117+
working-directory: bindings/python
118+
run: |
119+
mike deploy --push --update-aliases \
120+
${{ steps.version.outputs.version }} latest \
121+
--title "${{ steps.version.outputs.version }} (latest)"
122+
mike set-default --push latest
123+
124+
- name: Deploy with mike (not latest)
125+
if: (github.event_name != 'release' || steps.check-python-release.outputs.is-python-release == 'true') && steps.version.outputs.set_latest != 'true'
126+
working-directory: bindings/python
127+
run: |
128+
mike deploy --push \
129+
${{ steps.version.outputs.version }} \
130+
--title "${{ steps.version.outputs.version }}"

.github/workflows/meterian.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/mvn-deploy.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/mvn-release.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)