Skip to content

Commit

Permalink
Merge pull request #83 from adfinis/jlf/chore-rename-yml-to-toml
Browse files Browse the repository at this point in the history
chore: rename yml to toml
  • Loading branch information
Jean-Louis Fuchs authored Mar 5, 2024
2 parents c0e7f42 + 9be29ec commit f2952b3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pyaptly
=======

Automates the creation and managment of aptly mirrors and snapshots based on yml
Automates the creation and managment of aptly mirrors and snapshots based on toml
input files.

|pypi| |travis| |coverage| [1]_
Expand Down
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ The reason for this is to ensure the continuity of the git history.

- This is string is wrong in several places:

Automates the creation and managment of aptly mirrors and snapshots based on yml input files
Automates the creation and managment of aptly mirrors and snapshots based on toml input files
10 changes: 5 additions & 5 deletions pyaptly/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def add_gpg_keys(mirror_config):
"""Use the gpg to download and add gpg keys needed to create mirrors.
:param mirror_config: The configuration yml as dict
:param mirror_config: The configuration toml as dict
:type mirror_config: dict
"""
keyserver = mirror_config.get("keyserver")
Expand Down Expand Up @@ -64,7 +64,7 @@ def add_gpg_keys(mirror_config):
def mirror(cfg, args):
"""Create mirror commands, orders and executes them.
:param cfg: The configuration yml as dict
:param cfg: The configuration toml as dict
:type cfg: dict
:param args: The command-line arguments read with :py:mod:`argparse`
:type args: namespace
Expand Down Expand Up @@ -94,11 +94,11 @@ def mirror(cfg, args):
def cmd_mirror_create(cfg, mirror_name, mirror_config):
"""Create a mirror create command to be ordered and executed later.
:param cfg: The configuration yml as dict
:param cfg: The configuration toml as dict
:type cfg: dict
:param mirror_name: Name of the mirror to create
:type mirror_name: str
:param mirror_config: Configuration of the snapshot from the yml file.
:param mirror_config: Configuration of the snapshot from the toml file.
:type mirror_config: dict
"""
if mirror_name in state_reader.state.mirrors: # pragma: no cover
Expand Down Expand Up @@ -138,7 +138,7 @@ def cmd_mirror_update(cfg, mirror_name, mirror_config):
:type cfg: dict
:param mirror_name: Name of the mirror to create
:type mirror_name: str
:param mirror_config: Configuration of the snapshot from the yml file.
:param mirror_config: Configuration of the snapshot from the toml file.
:type mirror_config: dict
"""
if mirror_name not in state_reader.state.mirrors: # pragma: no cover
Expand Down
6 changes: 3 additions & 3 deletions pyaptly/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def publish(cfg, args):
"""Create publish commands, orders and executes them.
:param cfg: The configuration yml as dict
:param cfg: The configuration toml as dict
:type cfg: dict
:param args: The command-line arguments read with :py:mod:`argparse`
:type args: namespace
Expand Down Expand Up @@ -67,7 +67,7 @@ def publish_cmd_update(cfg, publish_name, publish_config, ignore_existing=False)
:type cfg: dict
:param publish_name: Name of the publish to update
:type publish_name: str
:param publish_config: Configuration of the publish from the yml file.
:param publish_config: Configuration of the publish from the toml file.
:type publish_config: dict
"""
publish_cmd = ["aptly", "publish"]
Expand Down Expand Up @@ -150,7 +150,7 @@ def publish_cmd_create(cfg, publish_name, publish_config, ignore_existing=False)
:type cfg: dict
:param publish_name: Name of the publish to create
:type publish_name: str
:param publish_config: Configuration of the publish from the yml file.
:param publish_config: Configuration of the publish from the toml file.
:type publish_config: dict
"""
publish_fullname = "%s %s" % (publish_name, publish_config["distribution"])
Expand Down
4 changes: 2 additions & 2 deletions pyaptly/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def repo(cfg, args):
"""Create repository commands, orders and executes them.
:param cfg: The configuration yml as dict
:param cfg: The configuration toml as dict
:type cfg: dict
:param args: The command-line arguments read with :py:mod:`argparse`
:type args: namespace
Expand Down Expand Up @@ -53,7 +53,7 @@ def repo_cmd_create(cfg, repo_name, repo_config):
:type cfg: dict
:param repo_name: Name of the repo to create
:type repo_name: str
:param repo_config: Configuration of the repo from the yml file.
:param repo_config: Configuration of the repo from the toml file.
:type repo_config: dict
"""
if repo_name in state_reader.state.repos: # pragma: no cover
Expand Down
6 changes: 3 additions & 3 deletions pyaptly/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def snapshot(cfg, args):
"""Create snapshot commands, orders and executes them.
:param cfg: The configuration yml as dict
:param cfg: The configuration toml as dict
:type cfg: dict
:param args: The command-line arguments read with :py:mod:`argparse`
:type args: namespace
Expand Down Expand Up @@ -160,7 +160,7 @@ def cmd_snapshot_update(
:type cfg: dict
:param snapshot_name: Name of the snapshot to update/rotate
:type snapshot_name: str
:param snapshot_config: Configuration of the snapshot from the yml file.
:param snapshot_config: Configuration of the snapshot from the toml file.
:type snapshot_config: dict
"""
# To update a snapshot, we need to do roughly the following steps:
Expand Down Expand Up @@ -301,7 +301,7 @@ def cmd_snapshot_create(
:type cfg: dict
:param snapshot_name: Name of the snapshot to create
:type snapshot_name: str
:param snapshot_config: Configuration of the snapshot from the yml file.
:param snapshot_config: Configuration of the snapshot from the toml file.
:type snapshot_config: dict
:param ignore_existing: Optional, defaults to False. If set to True, still
return a command object even if the requested
Expand Down
2 changes: 1 addition & 1 deletion pyaptly/state_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SystemStateReader(object):
"""Reads the state from aptly and gpg.
To find out what operations have to be performed to reach the state defined
in the yml config-file.
in the toml config-file.
"""

known_dependency_types = ("repo", "snapshot", "mirror", "gpg_key")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "pyaptly"
version = "2.0.0"
description = "Automates the creation and managment of aptly mirrors and snapshots based on yml input files."
description = "Automates the creation and managment of aptly mirrors and snapshots based on toml input files."
authors = ["Jean-Louis Fuchs <[email protected]>"]
license = "AGPL-3.0-or-later"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions tools/venv-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ SPEC = """
Name: python3-pyaptly
Version: 2.0.0^{revision}
Release: 1%{{?dist}}
Summary: Automates the creation and managment of aptly mirrors and snapshots based on yml input files
Summary: Automates the creation and managment of aptly mirrors and snapshots based on toml input files
License: AGPL-3.0-or-later
BuildArch: noarch
Requires: python3.11
%description
Automates the creation and managment of aptly mirrors and snapshots based on yml input files
Automates the creation and managment of aptly mirrors and snapshots based on toml input files
%install
Expand Down

0 comments on commit f2952b3

Please sign in to comment.