Skip to content

Commit 8225fbb

Browse files
authored
Remove unused tools (#738)
Neither `yapf` or `autogen` is used any longer. Remove them, along with an unused file.
1 parent d68f6ec commit 8225fbb

File tree

4 files changed

+6
-31
lines changed

4 files changed

+6
-31
lines changed

kaggle/models/api_blob_type.py

-4
This file was deleted.

pyproject.toml

+2-6
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,10 @@ packages = ["src/kaggle", "src/kagglesdk"]
6161

6262
[tool.hatch.envs.default.scripts]
6363
install-unzip = """sudo apt-get install -y unzip || echo 'unzip could not be installed'"""
64-
install-autogen = """curl -fsSL --output /tmp/autogen.zip "https://github.com/mbrukman/autogen/archive/refs/heads/master.zip" &&
65-
rm -rf /tmp/autogen && mkdir -p /tmp/autogen && unzip -qo /tmp/autogen.zip -d /tmp/autogen &&
66-
mv /tmp/autogen/autogen-*/* /tmp/autogen && rm -rf /tmp/autogen/autogen-* &&
67-
sudo chmod a+rx /tmp/autogen/autogen.sh"""
6864
# TODO: install in Mac/Windows
69-
install-yapf = """pip3 install yapf==0.40.2 --break-system-packages || echo 'yapf could not be installed'"""
65+
install-black = """pip3 install black --break-system-packages || echo 'black could not be installed'"""
7066
install-toml = """sudo apt-get install -y python3-toml || echo 'toml could not be installed'"""
71-
install-deps = "hatch run install-unzip && hatch run install-autogen && hatch run install-yapf && hatch run install-toml"
67+
install-deps = "hatch run install-unzip && hatch run install-black && hatch run install-toml"
7268

7369
integration-test = "pytest {args:integration_tests}"
7470

tools/GeneratePythonLibrary.sh

+4-13
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,11 @@ function init {
8383
function reset {
8484
cd $SELF_DIR
8585

86-
echo "rm -rf kaggle/* kagglesdk/*"
87-
rm -rf kaggle/* kagglesdk/*
88-
89-
echo "yapf3 -ir src/"
90-
if [ -x "$(command -v yapf3)" ]; then
91-
# yapf3 -ir --style yapf src/
92-
echo skipped
86+
echo "run formatter"
87+
if [ -x "$(command -v black)" ]; then
88+
black .
9389
else
94-
echo "yapf3 is not installed on your system"
90+
echo "black is not installed on your system"
9591
fi
9692
}
9793

@@ -115,10 +111,6 @@ function copy-src {
115111
cp -r ./src/kagglesdk .
116112
}
117113

118-
function run-autogen {
119-
find kaggle/ -type f -name \*.py -exec /tmp/autogen/autogen.sh --no-code --no-top-level-comment --in-place --copyright "Kaggle Inc" --license apache {} \;
120-
}
121-
122114
function run-tests {
123115
if ! which kaggle > /dev/null 2> /dev/null; then
124116
echo "Warning: \"kaggle\" is not in PATH. Please add \"~/.local/bin\" to PATH in ~/.bashrc."
@@ -171,7 +163,6 @@ function run {
171163
reset
172164

173165
copy-src
174-
run-autogen
175166
install-package
176167
run-tests
177168

tools/releases/Dockerfile

-8
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ RUN apt-get update -y && \
88
default-jre \
99
python3-pip
1010

11-
# Install tools used to generate the Kaggle CLI.
12-
RUN apt-get install -y yapf3 python3-yapf && \
13-
curl -fsSL --output /tmp/autogen.zip "https://github.com/mbrukman/autogen/archive/refs/heads/master.zip" && \
14-
mkdir -p /usr/lib/autogen && unzip -qo /tmp/autogen.zip -d /usr/lib/autogen && \
15-
mv /usr/lib/autogen/autogen-*/* /usr/lib/autogen && rm -rf /usr/lib/autogen/autogen-* && \
16-
chmod a+rx /usr/lib/autogen/autogen.sh && \
17-
ln -s /usr/lib/autogen/autogen.sh /usr/bin/autogen
18-
1911
COPY requirements.txt requirements.txt
2012
RUN cat requirements.txt
2113
RUN pip install --require-hashes -r requirements.txt --break-system-packages

0 commit comments

Comments
 (0)