Skip to content

Commit 3028a30

Browse files
committed
Generate configuration file through tox
1 parent bac22c0 commit 3028a30

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

deepaas/opts.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Copyright 2015 Spanish National Research Council (CSIC)
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License. You may obtain
7+
# a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
# License for the specific language governing permissions and limitations
15+
# under the License.
16+
17+
import deepaas.cmd.run
18+
19+
20+
def list_opts():
21+
return [
22+
('DEFAULT', deepaas.cmd.run.cli_opts),
23+
]

etc/deepaas-config-generator.conf

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[DEFAULT]
2+
output_file = etc/deepaas.conf.sample
3+
wrap_width = 79
4+
namespace = deepaas
5+
namespace = oslo.log

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ packages =
4545
[entry_points]
4646
console_scripts =
4747
deepaas-run = deepaas.cmd.run:main
48+
49+
oslo.config.opts =
50+
deepaas = deepaas.opts:list_opts

tox.ini

+3
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ commands = py.test --cov=deepaas --cov-report=xml --cov-report=term-missing deep
9090
commands =
9191
- mkdir /tmp/bandit
9292
- bandit -r deepaas -x tests -s B110,B410 -f html -o /tmp/bandit/index.html
93+
94+
[testenv:genconfig]
95+
commands = oslo-config-generator --config-file=etc/deepaas-config-generator.conf

0 commit comments

Comments
 (0)