diff --git a/reno/defaults.py b/reno/defaults.py new file mode 100644 index 0000000..b30a18d --- /dev/null +++ b/reno/defaults.py @@ -0,0 +1,14 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +RELEASE_NOTES_SUBDIR = 'releasenotes' +NOTES_SUBDIR = 'notes' diff --git a/reno/main.py b/reno/main.py index 1b84bf4..9611b8e 100644 --- a/reno/main.py +++ b/reno/main.py @@ -14,6 +14,7 @@ import argparse import sys from reno import create +from reno import defaults from reno import lister from reno import report @@ -23,7 +24,7 @@ def main(argv=sys.argv[1:]): parser.add_argument( '--rel-notes-dir', '-d', dest='relnotesdir', - default='releasenotes', + default=defaults.RELEASE_NOTES_SUBDIR, help='location of release notes YAML files', ) subparsers = parser.add_subparsers( diff --git a/reno/utils.py b/reno/utils.py index 267d6c9..fe1090e 100644 --- a/reno/utils.py +++ b/reno/utils.py @@ -16,10 +16,12 @@ import os.path import random import subprocess +from reno import defaults + def get_notes_dir(args): "Return the path to the release notes directory." - return os.path.join(args.relnotesdir, 'notes') + return os.path.join(args.relnotesdir, defaults.NOTES_SUBDIR) def get_random_string(nbytes=8):