Skip to content

Commit 5891db3

Browse files
authored
Merge branch 'master' into using-defaults
2 parents 555f0fb + 28845c7 commit 5891db3

File tree

10 files changed

+120
-304
lines changed

10 files changed

+120
-304
lines changed

.github/mergeable.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ProBot Mergeable Bot
2+
# https://github.com/jusx/mergeable
3+
4+
mergeable:
5+
pull_requests:
6+
approvals:
7+
# Minimum of approvals needed.
8+
min: 1
9+
message: 'The PR must have a minimum of 1 approvals.'
10+
11+
description:
12+
no_empty:
13+
# Do not allow empty descriptions on PR.
14+
enabled: false
15+
message: 'Description can not be empty.'
16+
17+
must_exclude:
18+
# Do not allow 'DO NOT MERGE' phrase on PR's description.
19+
regex: 'DO NOT MERGE'
20+
message: 'Description says that the PR should not be merged yet.'
21+
22+
# Do not allow 'WIP' on PR's title.
23+
title: 'WIP'
24+
25+
label:
26+
# Do not allow PR with label 'PR: work in progress'
27+
must_exclude: 'PR: work in progress'
28+
message: 'This PR is work in progress.'

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2017 Read the Docs, Inc & contributors
1+
Copyright (c) 2010-2019 Read the Docs, Inc & contributors
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

docs/webhooks.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ that your VCS provider is not configured correctly. If there is payload
161161
information on your Read the Docs project, you might need to verify that your
162162
versions are configured to build correctly.
163163

164-
Either way, it may help to either resync your webhook intergration (see
164+
Either way, it may help to either resync your webhook integration (see
165165
`Resyncing webhooks`_ for information on this process), or set up an entirely
166-
new webhook intergration.
166+
new webhook integration.
167167

168168
.. _webhook-github-services:
169169

@@ -180,7 +180,7 @@ In order for your project to continue automatically building, you will need to
180180
configure your GitHub repository with a new webhook. You can use either a
181181
connected GitHub account and a :ref:`GitHub webhook integration <webhook-integration-github>`
182182
on your Read the Docs project, or you can use a
183-
:ref:`generic webhook integraiton <webhook-integration-generic>` without a connected
183+
:ref:`generic webhook integration <webhook-integration-generic>` without a connected
184184
account.
185185

186186
.. [1] https://developer.github.com/changes/2018-04-25-github-services-deprecation/

readthedocs/config/config.py

-73
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from __future__ import division, print_function, unicode_literals
77

88
import os
9-
import re
109
from contextlib import contextmanager
1110

1211
import six
@@ -23,7 +22,6 @@
2322
validate_bool,
2423
validate_choice,
2524
validate_dict,
26-
validate_directory,
2725
validate_file,
2826
validate_list,
2927
validate_string,
@@ -44,12 +42,8 @@
4442

4543
CONFIG_NOT_SUPPORTED = 'config-not-supported'
4644
VERSION_INVALID = 'version-invalid'
47-
BASE_INVALID = 'base-invalid'
48-
BASE_NOT_A_DIR = 'base-not-a-directory'
4945
CONFIG_SYNTAX_INVALID = 'config-syntax-invalid'
5046
CONFIG_REQUIRED = 'config-required'
51-
NAME_REQUIRED = 'name-required'
52-
NAME_INVALID = 'name-invalid'
5347
CONF_FILE_REQUIRED = 'conf-file-required'
5448
PYTHON_INVALID = 'python-invalid'
5549
SUBMODULES_INVALID = 'submodules-invalid'
@@ -252,12 +246,6 @@ class BuildConfigV1(BuildConfigBase):
252246

253247
"""Version 1 of the configuration file."""
254248

255-
BASE_INVALID_MESSAGE = 'Invalid value for base: {base}'
256-
BASE_NOT_A_DIR_MESSAGE = '"base" is not a directory: {base}'
257-
NAME_REQUIRED_MESSAGE = 'Missing key "name"'
258-
NAME_INVALID_MESSAGE = (
259-
'Invalid name "{name}". Valid values must match {name_re}'
260-
)
261249
CONF_FILE_REQUIRED_MESSAGE = 'Missing key "conf_file"'
262250
PYTHON_INVALID_MESSAGE = '"python" section must be a mapping.'
263251
PYTHON_EXTRA_REQUIREMENTS_INVALID_MESSAGE = (
@@ -295,63 +283,17 @@ def validate(self):
295283
``readthedocs.yml`` config file if not set
296284
"""
297285
# Validate env_config.
298-
# TODO: this isn't used
299-
self._config['output_base'] = self.validate_output_base()
300-
301286
# Validate the build environment first
302287
# Must happen before `validate_python`!
303288
self._config['build'] = self.validate_build()
304289

305290
# Validate raw_config. Order matters.
306-
# TODO: this isn't used
307-
self._config['name'] = self.validate_name()
308-
# TODO: this isn't used
309-
self._config['base'] = self.validate_base()
310291
self._config['python'] = self.validate_python()
311292
self._config['formats'] = self.validate_formats()
312293

313294
self._config['conda'] = self.validate_conda()
314295
self._config['requirements_file'] = self.validate_requirements_file()
315296

316-
def validate_output_base(self):
317-
"""Validates that ``output_base`` exists and set its absolute path."""
318-
assert 'output_base' in self.env_config, (
319-
'"output_base" required in "env_config"')
320-
output_base = os.path.abspath(
321-
os.path.join(
322-
self.env_config.get('output_base', self.base_path),
323-
)
324-
)
325-
return output_base
326-
327-
def validate_name(self):
328-
"""Validates that name exists."""
329-
name = self.raw_config.get('name', None)
330-
if not name:
331-
name = self.env_config.get('name', None)
332-
if not name:
333-
self.error('name', self.NAME_REQUIRED_MESSAGE, code=NAME_REQUIRED)
334-
name_re = r'^[-_.0-9a-zA-Z]+$'
335-
if not re.match(name_re, name):
336-
self.error(
337-
'name',
338-
self.NAME_INVALID_MESSAGE.format(
339-
name=name,
340-
name_re=name_re),
341-
code=NAME_INVALID)
342-
343-
return name
344-
345-
def validate_base(self):
346-
"""Validates that path is a valid directory."""
347-
if 'base' in self.raw_config:
348-
base = self.raw_config['base']
349-
else:
350-
base = self.base_path
351-
with self.catch_validation_error('base'):
352-
base = validate_directory(base, self.base_path)
353-
return base
354-
355297
def validate_build(self):
356298
"""
357299
Validate the build config settings.
@@ -525,21 +467,6 @@ def validate_formats(self):
525467

526468
return formats
527469

528-
@property
529-
def name(self):
530-
"""The project name."""
531-
return self._config['name']
532-
533-
@property
534-
def base(self):
535-
"""The base directory."""
536-
return self._config['base']
537-
538-
@property
539-
def output_base(self):
540-
"""The output base."""
541-
return self._config['output_base']
542-
543470
@property
544471
def formats(self):
545472
"""The documentation formats to be built."""

0 commit comments

Comments
 (0)