Skip to content

Commit

Permalink
Change .ini config to .yaml/.yml (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanayov authored Oct 12, 2023
1 parent 63f4377 commit 980495a
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ auto-click-auto = "*"
PyNaCl = "==1.5.0"
requests = "*"
tuf = "==3.0.0"
dynaconf = {extras = ["ini"], version = "*"}
dynaconf = {extras = ["yaml"], version = "*"}
isort = "*"
sqlalchemy = "*"
psycopg2 = "*"
Expand Down
69 changes: 51 additions & 18 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/source/devel/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ``repository-service-tuf``, in the container perspective, is a command line
interacts to the ``repository-service-tuf-api``.

``repository-service-tuf`` reads the settings configuration from config file
See: ``--config/-c``, default: ``$HOME/.rstuf.ini``.
See: ``--config/-c``, default: ``$HOME/.rstuf.yml``.

``repository-service-tuf`` writes the ``payload.json`` or the specified file
with option ``-f/--file`` with ``ceremony`` subcommand.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Using pip:
Repository Service for TUF Command Line Interface (CLI).
╭─ Options ────────────────────────────────────────────────────────────────────────────────╮
│ --config -c TEXT Repository Service for TUF config file. [default: $HOME/.rstuf.ini] │
│ --config -c TEXT Repository Service for TUF config file. [default: $HOME/.rstuf.yml] │
│ --version Show the version and exit. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Expand Down
2 changes: 1 addition & 1 deletion repository_service_tuf/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"-c",
"--config",
"config",
default=os.path.join(HOME, ".rstuf.ini"),
default=os.path.join(HOME, ".rstuf.yml"),
help="Repository Service for TUF config file.",
show_default=True,
required=False,
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ virtualenv==20.24.5; python_version >= '3.7'
zipp==3.17.0; python_version >= '3.8'
auto-click-auto==0.1.1; python_version >= '3.7' and python_version < '4.0'
cffi==1.16.0; python_version >= '3.8'
configobj==5.0.8
cryptography==41.0.4
dynaconf[ini]==3.2.3; python_version >= '3.8'
dynaconf[yaml]==3.2.3; python_version >= '3.8'
greenlet==3.0.0; platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))
psycopg2==2.9.9; python_version >= '3.7'
pycparser==2.21
pynacl==1.5.0; python_version >= '3.6'
rich-click==1.7.0; python_version >= '3.7'
ruamel.yaml==0.17.35
ruamel.yaml.clib==0.2.8; python_version < '3.13' and platform_python_implementation == 'CPython'
securesystemslib[crypto]==0.28.0; python_version ~= '3.7'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sqlalchemy==2.0.21; python_version >= '3.7'
tuf==3.0.0; python_version >= '3.7'
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ certifi==2023.7.22; python_version >= '3.6'
cffi==1.16.0; python_version >= '3.8'
charset-normalizer==3.3.0; python_full_version >= '3.7.0'
click==8.1.7; python_version >= '3.7'
configobj==5.0.8
cryptography==41.0.4
dynaconf[ini]==3.2.3; python_version >= '3.8'
dynaconf[yaml]==3.2.3; python_version >= '3.8'
greenlet==3.0.0; platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))
idna==3.4; python_version >= '3.5'
isort==5.12.0; python_full_version >= '3.8.0'
Expand All @@ -19,8 +18,9 @@ pynacl==1.5.0; python_version >= '3.6'
requests==2.31.0; python_version >= '3.7'
rich==13.6.0; python_full_version >= '3.7.0'
rich-click==1.7.0; python_version >= '3.7'
ruamel.yaml==0.17.35
ruamel.yaml.clib==0.2.8; python_version < '3.13' and platform_python_implementation == 'CPython'
securesystemslib[crypto]==0.28.0; python_version ~= '3.7'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sqlalchemy==2.0.21; python_version >= '3.7'
tuf==3.0.0; python_version >= '3.7'
typing-extensions==4.8.0; python_version >= '3.8'
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@pytest.fixture
def test_context() -> Dict[str, Any]:
setting_file = os.path.join(TemporaryDirectory().name, "test_settings.ini")
setting_file = os.path.join(TemporaryDirectory().name, "test_settings.yml")
test_settings = Dynaconf(settings_files=[setting_file])
return {"settings": test_settings, "config": setting_file}

Expand Down

0 comments on commit 980495a

Please sign in to comment.