You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "chitralverma (via GitHub)" <gi...@apache.org> on 2025/10/16 08:46:31 UTC

[PR] Py justfile fmt [opendal]

chitralverma opened a new pull request, #6677:
URL: https://github.com/apache/opendal/pull/6677

   # Which issue does this PR close?
   
   Parts from https://github.com/apache/opendal/pull/6622/
   
   # Rationale for this change
   
   Partially Closes https://github.com/apache/opendal/issues/6253
   
   # What changes are included in this PR?
   
   - Adds Justfile
   - Formats everything as per ruff rules (some rules are temporarily added and will be removed post stubs)
     - No functional change
   - Update Readme and Contributing guides as per the new Justfile
   
   # Are there any user-facing changes?
   
   No, just better dev experience and code formatting.
   No breaking changes are introduced.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436095355


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   fixed!



##########
bindings/python/dprint.json:
##########
@@ -0,0 +1,22 @@
+{
+  "includes": [
+    "**/*.{toml,json,md}"
+  ],
+  "markdown": {
+    "lineWidth": 88,
+    "textWrap": "always"
+  },
+  "excludes": [
+    "docs/**/*.md",
+    ".venv/",
+    "**/*-lock.json",
+    "**/target/",
+    ".pytest_cache/",
+    ".ruff_cache/"
+  ],
+  "plugins": [
+    "https://plugins.dprint.dev/toml-0.7.0.wasm",
+    "https://plugins.dprint.dev/ruff-0.4.8.wasm",
+    "https://plugins.dprint.dev/markdown-0.18.0.wasm"
+  ]

Review Comment:
   fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436591804


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --profile release --strip --release --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the release wheel in the current venv
+[group('release')]
+install-release *args: setup
+    @echo "{{ BOLD }}--- Installing release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml --profile release --strip --release {{ args }}
+
+# Build and install the release wheel in the current venv
+[group('release')]
+[working-directory('benchmark')]
+bench: install-release
+    @echo "{{ BOLD }}--- Bench release ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run async_opendal_benchmark.py
+    @uv run async_origin_s3_benchmark_with_gevent.py
+
+# Build only a source distribution (sdist) without compiling
+[group('release')]
+sdist *args: setup
+    @echo "{{ BOLD }}--- Building source distribution without compiling ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin sdist -m ./Cargo.toml --out dist {{ args }}
+
+# Compile and produce a development wheel
+[group('dev')]
+build-dev *args: setup
+    @echo "{{ BOLD }}--- Building development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the development wheel in the current venv
+[group('dev')]
+install-dev *args: setup
+    @echo "{{ BOLD }}--- Installing development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml {{ args }}
+
+# Run tests
+[group('dev')]
+test *args: install-dev
+    @echo "{{ BOLD }}--- Running tests ---{{ NORMAL }}"
+    @uv run pytest -v {{ args }}
+
+# Run python repl
+[group('dev')]
+repl: setup
+    @echo "{{ BOLD }}--- Running Python REPL ---{{ NORMAL }}"
+    @uv run python -i
+
+# Run python repl with asyncio
+[group('dev')]
+repl-asyncio: setup
+    @echo "{{ BOLD }}--- Running Python asyncio REPL ---{{ NORMAL }}"
+    @uv run python -m asyncio

Review Comment:
   Do we really need this?



##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade

Review Comment:
   What's `--managed-python` means? The same question applies to `--no-install-workspace`, `--compile-bytecode` and `--upgrade`?



##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX

Review Comment:
   Why we need to play with this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435605305


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   we can, but i wanted to remove the requirement to have uv installed first on the machine.
   This is [similar to how polars does it](https://github.com/pola-rs/polars/blob/main/Makefile#L77) today.
   
   we are still using uv everywhere. just that uv itself is installed via pip at the very beginning.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436289783


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Set up the dev environment and install all dependencies.
+[group('maintenance')]
+setup:
+    @if [ ! -d "{{ venv }}" ]; then \
+        echo "{{ BOLD }}--- Setting up Python virtual environment at '{{ venv }}' ---{{ NORMAL }}"; \
+        unset CONDA_PREFIX; \
+        python3 -m venv {{ venv }}; \
+        {{ python }} -m pip install --quiet --upgrade pip uv; \
+    fi
+
+    @{{ uv }} venv --allow-existing {{ venv }};
+    @just _requirements

Review Comment:
   fixed!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436647286


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX

Review Comment:
   now ive changed to direct usage of uv so i'll remove this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436644733


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade

Review Comment:
   `--upgrade` refreshes the `uv.lock` file for unpinned dependency versions
   
   `--managed-python` This allows for easy switching between versions and efficient project management without needing to manually install Python on system level. Also used because of [this](https://github.com/PyO3/maturin-import-hook/discussions/26)
   
   `--compile-bytecode` allows faster startups since `.py` files are precompiled into bytecode (`.pyc` in __pycache__) during installation, rather than waiting until the first time modules are imported.
   
   `--no-install-workspace` this was added to let maturin handle all the building and installation and not uv. now ive changed to direct usage of `uv` so i'll remove this. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #6677:
URL: https://github.com/apache/opendal/pull/6677


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435694576


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   I think it's fair to require users to install `uv` first to develop opendal. I don't think it's worth to maintain such thing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435172416


##########
bindings/python/dprint.json:
##########
@@ -0,0 +1,22 @@
+{
+  "includes": [
+    "**/*.{toml,json,md}"
+  ],
+  "markdown": {
+    "lineWidth": 88,
+    "textWrap": "always"
+  },
+  "excludes": [
+    "docs/**/*.md",
+    ".venv/",
+    "**/*-lock.json",
+    "**/target/",
+    ".pytest_cache/",
+    ".ruff_cache/"
+  ],
+  "plugins": [
+    "https://plugins.dprint.dev/toml-0.7.0.wasm",
+    "https://plugins.dprint.dev/ruff-0.4.8.wasm",
+    "https://plugins.dprint.dev/markdown-0.18.0.wasm"
+  ]

Review Comment:
   We already have `taplo` and `ruff`. And I don't think we need format markdown.



##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   Why we need this? can we juse use `uv run`?



##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Set up the dev environment and install all dependencies.
+[group('maintenance')]
+setup:
+    @if [ ! -d "{{ venv }}" ]; then \
+        echo "{{ BOLD }}--- Setting up Python virtual environment at '{{ venv }}' ---{{ NORMAL }}"; \
+        unset CONDA_PREFIX; \
+        python3 -m venv {{ venv }}; \
+        {{ python }} -m pip install --quiet --upgrade pip uv; \
+    fi
+
+    @{{ uv }} venv --allow-existing {{ venv }};
+    @just _requirements

Review Comment:
   We should just use `uv`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436677408


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --profile release --strip --release --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the release wheel in the current venv
+[group('release')]
+install-release *args: setup
+    @echo "{{ BOLD }}--- Installing release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml --profile release --strip --release {{ args }}
+
+# Build and install the release wheel in the current venv
+[group('release')]
+[working-directory('benchmark')]
+bench: install-release
+    @echo "{{ BOLD }}--- Bench release ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run async_opendal_benchmark.py
+    @uv run async_origin_s3_benchmark_with_gevent.py
+
+# Build only a source distribution (sdist) without compiling
+[group('release')]
+sdist *args: setup
+    @echo "{{ BOLD }}--- Building source distribution without compiling ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin sdist -m ./Cargo.toml --out dist {{ args }}
+
+# Compile and produce a development wheel
+[group('dev')]
+build-dev *args: setup
+    @echo "{{ BOLD }}--- Building development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the development wheel in the current venv
+[group('dev')]
+install-dev *args: setup
+    @echo "{{ BOLD }}--- Installing development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml {{ args }}
+
+# Run tests
+[group('dev')]
+test *args: install-dev
+    @echo "{{ BOLD }}--- Running tests ---{{ NORMAL }}"
+    @uv run pytest -v {{ args }}
+
+# Run python repl
+[group('dev')]
+repl: setup
+    @echo "{{ BOLD }}--- Running Python REPL ---{{ NORMAL }}"
+    @uv run python -i
+
+# Run python repl with asyncio
+[group('dev')]
+repl-asyncio: setup
+    @echo "{{ BOLD }}--- Running Python asyncio REPL ---{{ NORMAL }}"
+    @uv run python -m asyncio

Review Comment:
   Let's remove them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436649334


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --profile release --strip --release --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the release wheel in the current venv
+[group('release')]
+install-release *args: setup
+    @echo "{{ BOLD }}--- Installing release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml --profile release --strip --release {{ args }}
+
+# Build and install the release wheel in the current venv
+[group('release')]
+[working-directory('benchmark')]
+bench: install-release
+    @echo "{{ BOLD }}--- Bench release ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run async_opendal_benchmark.py
+    @uv run async_origin_s3_benchmark_with_gevent.py
+
+# Build only a source distribution (sdist) without compiling
+[group('release')]
+sdist *args: setup
+    @echo "{{ BOLD }}--- Building source distribution without compiling ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin sdist -m ./Cargo.toml --out dist {{ args }}
+
+# Compile and produce a development wheel
+[group('dev')]
+build-dev *args: setup
+    @echo "{{ BOLD }}--- Building development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the development wheel in the current venv
+[group('dev')]
+install-dev *args: setup
+    @echo "{{ BOLD }}--- Installing development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml {{ args }}
+
+# Run tests
+[group('dev')]
+test *args: install-dev
+    @echo "{{ BOLD }}--- Running tests ---{{ NORMAL }}"
+    @uv run pytest -v {{ args }}
+
+# Run python repl
+[group('dev')]
+repl: setup
+    @echo "{{ BOLD }}--- Running Python REPL ---{{ NORMAL }}"
+    @uv run python -i
+
+# Run python repl with asyncio
+[group('dev')]
+repl-asyncio: setup
+    @echo "{{ BOLD }}--- Running Python asyncio REPL ---{{ NORMAL }}"
+    @uv run python -m asyncio

Review Comment:
   added repl and repl-asyncio as extra utils for any devs. not needed though.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2436706234


##########
bindings/python/justfile:
##########
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# ==============================================================================
+# Setup & Maintenance
+# ==============================================================================
+
+# Install/refresh all Python dependencies using uv.
+[group('maintenance')]
+setup:
+    @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv sync --managed-python --all-groups --all-extras --no-install-workspace --compile-bytecode --upgrade
+
+# Clean up all caches, build artifacts, and the venv
+[group('maintenance')]
+clean:
+    @echo "{{ BOLD }}--- Cleaning Rust build artifacts (Cargo) ---{{ NORMAL }}"
+    @cargo clean
+    @echo "{{ BOLD }}--- Removing .venv/, build/, dist/ directories, and other caches ---{{ NORMAL }}"
+    @rm -rf .venv/ build/ dist/ .pytest_cache/ .mypy_cache/ .hypothesis/ .ruff_cache/
+    @echo "{{ BOLD }}--- Removing Python bytecode and compiled extensions ---{{ NORMAL }}"
+    @find . -type f -name '*.py[co]' -delete \
+        -o -type d -name __pycache__ -exec rm -rf {} + \
+        -o -type f -name '_opendal*.so' -delete
+
+# ==============================================================================
+# Dev & Build
+# ==============================================================================
+
+# Compile and produce a release wheel with optimizations
+[group('release')]
+build-release *args: setup
+    @echo "{{ BOLD }}--- Building release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --profile release --strip --release --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the release wheel in the current venv
+[group('release')]
+install-release *args: setup
+    @echo "{{ BOLD }}--- Installing release wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml --profile release --strip --release {{ args }}
+
+# Build and install the release wheel in the current venv
+[group('release')]
+[working-directory('benchmark')]
+bench: install-release
+    @echo "{{ BOLD }}--- Bench release ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run async_opendal_benchmark.py
+    @uv run async_origin_s3_benchmark_with_gevent.py
+
+# Build only a source distribution (sdist) without compiling
+[group('release')]
+sdist *args: setup
+    @echo "{{ BOLD }}--- Building source distribution without compiling ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin sdist -m ./Cargo.toml --out dist {{ args }}
+
+# Compile and produce a development wheel
+[group('dev')]
+build-dev *args: setup
+    @echo "{{ BOLD }}--- Building development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin build -m ./Cargo.toml --out dist {{ args }}
+    @uv run mkdocs build
+
+# Build and install the development wheel in the current venv
+[group('dev')]
+install-dev *args: setup
+    @echo "{{ BOLD }}--- Installing development wheel ---{{ NORMAL }}"
+    @unset CONDA_PREFIX
+    @uv run maturin develop -m ./Cargo.toml {{ args }}
+
+# Run tests
+[group('dev')]
+test *args: install-dev
+    @echo "{{ BOLD }}--- Running tests ---{{ NORMAL }}"
+    @uv run pytest -v {{ args }}
+
+# Run python repl
+[group('dev')]
+repl: setup
+    @echo "{{ BOLD }}--- Running Python REPL ---{{ NORMAL }}"
+    @uv run python -i
+
+# Run python repl with asyncio
+[group('dev')]
+repl-asyncio: setup
+    @echo "{{ BOLD }}--- Running Python asyncio REPL ---{{ NORMAL }}"
+    @uv run python -m asyncio

Review Comment:
   done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435694576


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   I think it's fair to require users to install `uv` first to develop opendal.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on PR #6677:
URL: https://github.com/apache/opendal/pull/6677#issuecomment-3411776159

   @Xuanwo i've dropped some unnecessary changes (removed "RUF", # ruff-specific rules) from this PR in addition to your comments.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435605305


##########
bindings/python/justfile:
##########
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Default recipe to 'help' to display this help screen
+default: help
+
+# ==============================================================================
+# Configuration & Variables
+# ==============================================================================
+
+set ignore-comments := true
+
+# Virtual environment.
+
+venv := '.venv'
+venv_bin := if os() == "windows" { venv + "/Scripts" } else { venv + "/bin" }
+
+# Tool executables, resolved within the venv.
+
+python := venv_bin + '/python'
+uv := venv_bin + '/uv'
+ruff := venv_bin + '/ruff'
+maturin := venv_bin + '/maturin'
+dprint := venv_bin + '/dprint'

Review Comment:
   we can, but i wanted to remove the requirement to have uv installed first on the machine.
   This is [similar to how polars does it](https://github.com/pola-rs/polars/blob/main/Makefile#L77) today.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6677:
URL: https://github.com/apache/opendal/pull/6677#discussion_r2435609389


##########
bindings/python/dprint.json:
##########
@@ -0,0 +1,22 @@
+{
+  "includes": [
+    "**/*.{toml,json,md}"
+  ],
+  "markdown": {
+    "lineWidth": 88,
+    "textWrap": "always"
+  },
+  "excludes": [
+    "docs/**/*.md",
+    ".venv/",
+    "**/*-lock.json",
+    "**/target/",
+    ".pytest_cache/",
+    ".ruff_cache/"
+  ],
+  "plugins": [
+    "https://plugins.dprint.dev/toml-0.7.0.wasm",
+    "https://plugins.dprint.dev/ruff-0.4.8.wasm",
+    "https://plugins.dprint.dev/markdown-0.18.0.wasm"
+  ]

Review Comment:
   cool, didn't see taplo. will remove dprint
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): Add Justfile and format codebase [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on PR #6677:
URL: https://github.com/apache/opendal/pull/6677#issuecomment-3410474737

   > Thank you for working on this, but the change set is too complex to me.
   
   most of the changes are a result of linting and formatting my uv. the tests and the benchmarks pass as usual.
   No functional change is introduced.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org