Skip to content

Commit

Permalink
More replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Nov 14, 2024
1 parent 12f787d commit b38aee6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
30 changes: 15 additions & 15 deletions dev/archery/archery/docker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _execute(self, *args, **kwargs):
def docker(ctx, src, dry_run, using_legacy_docker_compose, using_docker_cli,
using_docker_buildx):
"""
Interact with docker-compose based builds.
Interact with docker compose based builds.
"""
ctx.ensure_object(dict)

Expand All @@ -78,8 +78,8 @@ def docker(ctx, src, dry_run, using_legacy_docker_compose, using_docker_cli,
"try to pass the arrow source directory explicitly.".format(src)
)

# take the docker-compose parameters like PYTHON, PANDAS, UBUNTU from the
# environment variables to keep the usage similar to docker-compose
# take the docker compose parameters like PYTHON, PANDAS, UBUNTU from the
# environment variables to keep the usage similar to docker compose
using_docker_cli |= using_docker_buildx
compose_bin = ("docker-compose" if using_legacy_docker_compose
else "docker compose")
Expand All @@ -98,7 +98,7 @@ def docker(ctx, src, dry_run, using_legacy_docker_compose, using_docker_cli,
@click.pass_obj
def check_config(obj):
"""
Validate docker-compose configuration.
Validate docker compose configuration.
"""
# executes the body of the docker function above which does the validation
# during the configuration loading
Expand All @@ -113,7 +113,7 @@ def check_config(obj):
@click.pass_obj
def docker_pull(obj, image, *, pull_leaf, ignore_pull_failures):
"""
Execute docker-compose pull.
Execute docker compose pull.
"""
compose = obj['compose']

Expand Down Expand Up @@ -143,7 +143,7 @@ def docker_pull(obj, image, *, pull_leaf, ignore_pull_failures):
@click.pass_obj
def docker_build(obj, image, *, force_pull, use_cache, use_leaf_cache):
"""
Execute docker-compose builds.
Execute docker compose builds.
"""
compose = obj['compose']

Expand Down Expand Up @@ -195,7 +195,7 @@ def docker_run(obj, image, command, *, env, user, force_pull, force_build,
build_only, use_cache, use_leaf_cache, resource_limit,
volume):
"""
Execute docker-compose builds.
Execute docker compose builds.
To see the available builds run `archery docker images`.
Expand All @@ -207,7 +207,7 @@ def docker_run(obj, image, command, *, env, user, force_pull, force_build,
# execute the builds but disable the image pulling
archery docker run --no-cache conda-python
# pass a docker-compose parameter, like the python version
# pass a docker compose parameter, like the python version
PYTHON=3.12 archery docker run conda-python
# disable the cache only for the leaf image
Expand Down Expand Up @@ -265,15 +265,15 @@ def docker_run(obj, image, command, *, env, user, force_pull, force_build,
help='Docker repository password')
@click.pass_obj
def docker_compose_push(obj, image, user, password):
"""Push the generated docker-compose image."""
"""Push the generated docker compose image."""
compose = obj['compose']
compose.push(image, user=user, password=password)


@docker.command('images')
@click.pass_obj
def docker_compose_images(obj):
"""List the available docker-compose images."""
"""List the available docker compose images."""
compose = obj['compose']
click.echo('Available images:')
for image in compose.images():
Expand All @@ -283,14 +283,14 @@ def docker_compose_images(obj):
@docker.command('info')
@click.argument('service_name')
@click.option('--show', '-s', required=False,
help="Show only specific docker-compose key. Examples of keys:"
help="Show only specific docker compose key. Examples of keys:"
" command, environment, build, dockerfile")
@click.pass_obj
def docker_compose_info(obj, service_name, show):
"""Show docker-compose definition info for service_name.
"""Show docker compose definition info for service_name.
SERVICE_NAME is the name of the docker service defined on
the docker-compose. Look at `archery docker images` output for names.
SERVICE_NAME is the name of the docker service defined in
docker-compose.yml. Look at `archery docker images` output for names.
"""
compose = obj['compose']
try:
Expand All @@ -299,6 +299,6 @@ def docker_compose_info(obj, service_name, show):
click.echo(f'Service name {service_name} could not be found', err=True)
sys.exit(1)
else:
click.echo(f'Service {service_name} docker-compose config:')
click.echo(f'Service {service_name} docker compose config:')
output = "\n".join(compose.info(service, show))
click.echo(output)
8 changes: 4 additions & 4 deletions dev/archery/archery/docker/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _read_config(self, config_path, compose_bin):
stderr=subprocess.PIPE, stdout=subprocess.PIPE)

if result.returncode != 0:
# strip the intro line of docker-compose errors
# strip the intro line of docker compose errors
errors += result.stderr.decode().splitlines()

if errors:
Expand Down Expand Up @@ -203,7 +203,7 @@ def formatdict(d, template):
)
msg = (
"`{cmd}` exited with a non-zero exit code {code}, see the "
"process log above.\n\nThe docker-compose command was "
"process log above.\n\nThe {compose_bin} command was "
"invoked with the following parameters:\n\nDefaults defined "
"in .env:\n{dotenv}\n\nArchery was called with:\n{params}"
)
Expand Down Expand Up @@ -406,7 +406,7 @@ def run(self, service_name, command=None, *, env=None, volumes=None,
cmd = service.get('command', '')
if cmd:
# service command might be already defined as a list
# on the docker-compose yaml file.
# in docker-compose.yml.
if isinstance(cmd, list):
cmd = shlex.join(cmd)
# Match behaviour from docker compose
Expand All @@ -418,7 +418,7 @@ def run(self, service_name, command=None, *, env=None, volumes=None,
# execute as a plain docker cli command
self._execute_docker('run', '--rm', *args)
else:
# execute as a docker-compose command
# execute as a docker compose command
args.append(service_name)
if command is not None:
args.append(command)
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/python-wheels/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
archery docker run python-wheel-manylinux-test-imports
archery docker run python-wheel-manylinux-test-unittests
# Free-threaded wheels need to be tested using a different docker-compose service
# Free-threaded wheels need to be tested using a different docker compose service
- name: Test free-threaded wheel
if: |
'{{ python_abi_tag }}' == 'cp313t'
Expand Down
26 changes: 13 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1090,9 +1090,9 @@ services:

ubuntu-python-313-freethreading:
# Usage:
# docker-compose build ubuntu-cpp
# docker-compose build ubuntu-python-313-freethreading
# docker-compose run --rm ubuntu-python-313-freethreading
# docker compose build ubuntu-cpp
# docker compose build ubuntu-python-313-freethreading
# docker compose run --rm ubuntu-python-313-freethreading
# Parameters:
# ARCH: amd64, arm64v8, ...
# UBUNTU: 20.04, 22.04, 24.04
Expand Down Expand Up @@ -1328,11 +1328,11 @@ services:

conda-python-no-numpy:
# Usage:
# docker-compose build conda
# docker-compose build conda-cpp
# docker-compose build conda-python
# docker-compose build conda-python-no-numpy
# docker-compose run --rm conda-python-no-numpy
# docker compose build conda
# docker compose build conda-cpp
# docker compose build conda-python
# docker compose build conda-python-no-numpy
# docker compose run --rm conda-python-no-numpy
image: ${REPO}:${ARCH}-conda-python-${PYTHON}-no-numpy
build:
context: .
Expand Down Expand Up @@ -1545,11 +1545,11 @@ services:

conda-python-cpython-debug:
# Usage:
# docker-compose build conda
# docker-compose build conda-cpp
# docker-compose build conda-python
# docker-compose build conda-python-cpython-debug
# docker-compose run --rm conda-python-cpython-debug
# docker compose build conda
# docker compose build conda-cpp
# docker compose build conda-python
# docker compose build conda-python-cpython-debug
# docker compose run --rm conda-python-cpython-debug
image: ${REPO}:${ARCH}-conda-python-${PYTHON}-cpython-debug
build:
context: .
Expand Down
4 changes: 2 additions & 2 deletions docs/source/format/Integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ To run all tests, including Flight and C Data Interface integration tests, do:
archery integration --with-all --run-flight --run-ipc --run-c-data
Note that we run these tests in continuous integration, and the CI job uses
docker-compose. You may also run the docker-compose job locally, or at least
docker compose. You may also run the docker compose job locally, or at least
refer to it if you have questions about how to build other languages or enable
certain tests.

See :ref:`docker-builds` for more information about the project's
``docker-compose`` configuration.
``docker compose`` configuration.

.. _format_json_integration:

Expand Down

0 comments on commit b38aee6

Please sign in to comment.