code-battles-cli 1.1.0__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: code-battles-cli
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A CLI for competitors in any Code Battles event!
5
- License-File: LICENSE.md
6
5
  Requires-Python: >=3.8
7
6
  Requires-Dist: click>=8.1.7
8
7
  Requires-Dist: google-cloud-firestore>=2.19.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "code-battles-cli"
3
- version = "1.1.0"
3
+ version = "1.1.2"
4
4
  description = "A CLI for competitors in any Code Battles event!"
5
5
  dependencies = [
6
6
  "requests>=2.32.3",
@@ -15,7 +15,7 @@ requires-python = ">= 3.8"
15
15
  "code-battles" = "code_battles_cli:main"
16
16
 
17
17
  [build-system]
18
- requires = ["hatchling"]
18
+ requires = ["hatchling==1.26.3"]
19
19
  build-backend = "hatchling.build"
20
20
 
21
21
  [tool.rye]
@@ -197,9 +197,14 @@ class Client:
197
197
  self.document.set(bots, merge)
198
198
 
199
199
  def _possibly_download(self, force_download=False):
200
- code_directory = os.path.expanduser(
201
- f"~/.cache/code-battles/{''.join([c for c in self.url.removeprefix("https").removesuffix(".web.app") if c.isalnum()])}"
200
+ directory_name = "".join(
201
+ [
202
+ c
203
+ for c in self.url.removeprefix("https").removesuffix(".web.app")
204
+ if c.isalnum()
205
+ ]
202
206
  )
207
+ code_directory = os.path.expanduser(f"~/.cache/code-battles/{directory_name}")
203
208
 
204
209
  if force_download and os.path.exists(code_directory):
205
210
  shutil.rmtree(code_directory)
@@ -310,7 +315,6 @@ class Client:
310
315
  + [os.path.abspath(f) for f in bot_filenames],
311
316
  env={"PYTHONPATH": os.path.join(code_directory, "code_battles")},
312
317
  stdout=subprocess.PIPE,
313
- stderr=subprocess.PIPE,
314
318
  )
315
319
 
316
320
  return self._get_simulation_output(p, json_output, on_step)
@@ -9,7 +9,9 @@ from code_battles_cli.log import log
9
9
 
10
10
  @click.command()
11
11
  @click.option(
12
- "-U", "--url", help="The competitions URL, for example https://code-battles.web.app"
12
+ "-U",
13
+ "--url",
14
+ help="The competition's URL, for example https://code-battles.web.app",
13
15
  )
14
16
  @click.option("-u", "--username", help="Your team's username, for example mercedes")
15
17
  @click.option("-p", "--password", help="Your team's password")
@@ -13,7 +13,9 @@ from code_battles_cli.log import log, progress
13
13
  @click.argument("map", required=False)
14
14
  @click.argument("bots", nargs=-1)
15
15
  @click.option(
16
- "-U", "--url", help="The competitions URL, for example https://code-battles.web.app"
16
+ "-U",
17
+ "--url",
18
+ help="The competition's URL, for example https://code-battles.web.app",
17
19
  )
18
20
  @click.option("-u", "--username", help="Your team's username, for example mercedes")
19
21
  @click.option("-p", "--password", help="Your team's password")
@@ -9,7 +9,9 @@ from code_battles_cli.log import log
9
9
 
10
10
  @click.command()
11
11
  @click.option(
12
- "-U", "--url", help="The competitions URL, for example https://code-battles.web.app"
12
+ "-U",
13
+ "--url",
14
+ help="The competition's URL, for example https://code-battles.web.app",
13
15
  )
14
16
  @click.option("-u", "--username", help="Your team's username, for example mercedes")
15
17
  @click.option("-p", "--password", help="Your team's password")