From 800ea0aa056efab44ad4ef1c7bfb6973d06b4ffc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 14 Sep 2019 16:55:43 +0200 Subject: [PATCH] Switch project-config to promote jobs [3]: Update building For using opendev-tox-docs, jobs need to publish to a "html" subdirectory, update the docs-site and specs jobs. Update .gitignore for this. Update python files to use yaml.safe_load to avoid a warning. Remove unused docs environment from tox.ini. Depends-On: https://review.opendev.org/682213 Change-Id: I8d7032a6e836ec26f347d16abd600514089a677b --- .gitignore | 3 ++- docs-site/generate_infra_index.py | 4 ++-- specs/generate_specs_site.py | 4 ++-- tox.ini | 3 --- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 9a45e5ae61..62edf4ed81 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ /.project /.pydevproject *.egg -specs/output +specs/html +docs-site/html diff --git a/docs-site/generate_infra_index.py b/docs-site/generate_infra_index.py index 07e1b51003..7bf27a56e6 100755 --- a/docs-site/generate_infra_index.py +++ b/docs-site/generate_infra_index.py @@ -44,7 +44,7 @@ parser.add_argument( args = parser.parse_args() print('Reading documents data from %r' % args.infile) -infile = yaml.load(open(args.infile, 'r')) +infile = yaml.safe_load(open(args.infile, 'r')) template_path = os.path.dirname(args.infile) template_context = { @@ -52,7 +52,7 @@ template_context = { 'all': infile['documents'] } -outdir = os.path.join(template_path, 'output') +outdir = os.path.join(template_path, 'html') if not os.path.exists(outdir): os.makedirs(outdir) diff --git a/specs/generate_specs_site.py b/specs/generate_specs_site.py index 77780faf43..0dfe75a7ee 100755 --- a/specs/generate_specs_site.py +++ b/specs/generate_specs_site.py @@ -44,7 +44,7 @@ parser.add_argument( args = parser.parse_args() print('Reading project data from %r' % args.infile) -infile = yaml.load(open(args.infile, 'r')) +infile = yaml.safe_load(open(args.infile, 'r')) template_path = os.path.dirname(args.infile) template_context = { @@ -53,7 +53,7 @@ template_context = { 'all': infile['projects'] + infile['programs'], } -outdir = os.path.join(template_path, 'output') +outdir = os.path.join(template_path, 'html') if not os.path.exists(outdir): os.makedirs(outdir) diff --git a/tox.ini b/tox.ini index ffecf1190a..3c6b136d16 100644 --- a/tox.ini +++ b/tox.ini @@ -68,9 +68,6 @@ commands = [testenv:venv] commands = {posargs} -[testenv:docs] -commands = python setup.py build_sphinx - [testenv:irc] deps = PyYAML