Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-testing #889

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 62 additions & 0 deletions dev/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env bash
#
# 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.
#

# This cleans up the project by removing build artifacts and other generated files.

# Function to remove a directory and print the action
remove_dir() {
if [ -d "$1" ]; then
echo "Removing directory: $1"
rm -rf "$1"
fi
}

# Function to remove a file and print the action
remove_file() {
if [ -f "$1" ]; then
echo "Removing file: $1"
rm -f "$1"
fi
}

# Remove .pytest_cache directory
remove_dir .pytest_cache/

# Remove target directory
remove_dir target/

# Remove any __pycache__ directories
find python/ -type d -name "__pycache__" -print | while read -r dir; do
remove_dir "$dir"
done

# Remove pytest-coverage.lcov file
# remove_file .coverage
# remove_file pytest-coverage.lcov

# Remove rust-coverage.lcov file
# remove_file rust-coverage.lcov

# Remove pyo3 files
find python/ -type f -name '_internal.*.so' -print | while read -r file; do
remove_file "$file"
done

echo "Cleanup complete."
2 changes: 1 addition & 1 deletion dev/python_lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
23 changes: 21 additions & 2 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,29 @@ Send the email to start the vote.

## Verifying a Release

Install the release from testpypi:
Running the unit tests against a testpypi release candidate:

```bash
pip install --extra-index-url https://test.pypi.org/simple/ datafusion==0.7.0
# clone a fresh repo
git clone https://github.com/apache/datafusion-python.git
cd datafusion-python

# checkout the release commit
git fetch --tags
git checkout 40.0.0-rc1

# create the env
python3 -m venv venv
source venv/bin/activate

# install release candidate
pip install --extra-index-url https://test.pypi.org/simple/ datafusion==40.0.0

# only dep needed to run tests is pytest
pip install pytest

# run the tests
pytest --import-mode=importlib python/tests
```

Try running one of the examples from the top-level README, or write some custom Python code to query some available
Expand Down
2 changes: 1 addition & 1 deletion dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always seen the former approach of #!/bin/bash. For my own edification, why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mental model for env is basically "search $PATH for this executable and use it".

The pattern is more commonly used for things like python, i.e. #!/usr/bin/env python because then the script will automatically use whatever virtual environment you have activated.

It's less commonly used for bash, but I use a pretty niche operating system (NixOS) which doesn't use /bin/bash.

which bash
/nix/store/lmv9b9jbhv68kp5pg467rlgg71lf0zyl-bash-interactive-5.2p26/bin/bashls -l /usr/bin
total 4
lrwxrwxrwx 1 root root 65 Oct  3 06:58 env -> /nix/store/0kg70swgpg45ipcz3pr2siidq9fn6d77-coreutils-9.5/bin/envls -l /bin
total 4
lrwxrwxrwx 1 root root 74 Oct  3 06:58 sh -> /nix/store/qqz0gj9iaidabp7g34r2fb9mds6ahk8i-bash-interactive-5.2p32/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion dev/rust_lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion docs/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ max-doc-length = 88

# Disable docstring checking for these directories
[tool.ruff.lint.per-file-ignores]
"python/datafusion/tests/*" = ["D"]
"python/tests/*" = ["D"]
"examples/*" = ["D", "W505"]
"dev/*" = ["D"]
"benchmarks/*" = ["D", "F"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading