File tree 4 files changed +6
-31
lines changed
4 files changed +6
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -61,14 +61,10 @@ packages = ["src/kaggle", "src/kagglesdk"]
61
61
62
62
[tool .hatch .envs .default .scripts ]
63
63
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"""
68
64
# 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'"""
70
66
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"
72
68
73
69
integration-test = " pytest {args:integration_tests}"
74
70
Original file line number Diff line number Diff line change @@ -83,15 +83,11 @@ function init {
83
83
function reset {
84
84
cd $SELF_DIR
85
85
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 .
93
89
else
94
- echo " yapf3 is not installed on your system"
90
+ echo " black is not installed on your system"
95
91
fi
96
92
}
97
93
@@ -115,10 +111,6 @@ function copy-src {
115
111
cp -r ./src/kagglesdk .
116
112
}
117
113
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
-
122
114
function run-tests {
123
115
if ! which kaggle > /dev/null 2> /dev/null; then
124
116
echo " Warning: \" kaggle\" is not in PATH. Please add \" ~/.local/bin\" to PATH in ~/.bashrc."
@@ -171,7 +163,6 @@ function run {
171
163
reset
172
164
173
165
copy-src
174
- run-autogen
175
166
install-package
176
167
run-tests
177
168
Original file line number Diff line number Diff line change @@ -8,14 +8,6 @@ RUN apt-get update -y && \
8
8
default-jre \
9
9
python3-pip
10
10
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
-
19
11
COPY requirements.txt requirements.txt
20
12
RUN cat requirements.txt
21
13
RUN pip install --require-hashes -r requirements.txt --break-system-packages
You can’t perform that action at this time.
0 commit comments