Skip to content

Commit

Permalink
Config: remove pipfile from schema
Browse files Browse the repository at this point in the history
We don't support Pipfile and we decided we won't implement it for now (see
#3181). I'm removing it
from the schema and also its tests.
  • Loading branch information
humitos committed Jan 26, 2022
1 parent f057cbc commit 4bc117c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 86 deletions.
18 changes: 1 addition & 17 deletions readthedocs/rtd_tests/fixtures/spec/v2/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ python:
system_packages: bool(required=False)

# Installation of packages and requiremens
install: list(any(include('python-install-requirements'), include('python-install'), include('python-install-pipfile')), required=False)
install: list(any(include('python-install-requirements'), include('python-install'), required=False)

python-install-requirements:
# The path to the requirements file from the root of the project
Expand All @@ -83,22 +83,6 @@ python-install:
# Default: []
extra_requirements: list(str(), required=False)

python-install-pipfile:
# The path to the directory that contains the Pipfile
pipfile: path()

# Add the --dev option to pipenv install
# Default: false
dev: bool(required=False)

# Add the --ignore-pipfile option to pipenv install
# Default: false
ignore_pipfile: bool(required=False)

# Add the --skip-lock option to pipenv install
# Default: true
skip_lock: bool(required=False)

sphinx:
# The builder type for the sphinx documentation
# Default: 'html'
Expand Down
69 changes: 0 additions & 69 deletions readthedocs/rtd_tests/tests/test_build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,75 +329,6 @@ def test_python_install_extra_requirements_empty(tmpdir, value):
assertValidConfig(tmpdir, content.format(value=value))


@pytest.mark.parametrize('pipfile', ['another_docs/', '.', 'project/'])
def test_python_install_pipfile(tmpdir, pipfile):
utils.apply_fs(
tmpdir, {
'another_docs': {
'Pipfile': '',
},
'project': {},
'Pipfile': '',
},
)
content = '''
version: "2"
python:
install:
- pipfile: {}
'''
assertValidConfig(tmpdir, content.format(pipfile))


@pytest.mark.parametrize('pipfile', ['docs/', '.', 'project/'])
def test_python_install_pipfile_invalid(tmpdir, pipfile):
utils.apply_fs(tmpdir, {})
content = '''
version: "2"
python:
install:
- pipfile: {}
'''
content.format(pipfile)
assertInvalidConfig(tmpdir, content, ['is not a path'])


@pytest.mark.parametrize('value', ['true', 'false'])
def test_python_install_pipfile_dev(tmpdir, value):
content = '''
version: "2"
python:
install:
- pipfile: .
dev: {value}
'''
assertValidConfig(tmpdir, content.format(value=value))


@pytest.mark.parametrize('value', ['true', 'false'])
def test_python_install_pipfile_skip_lock(tmpdir, value):
content = '''
version: "2"
python:
install:
- pipfile: .
skip_lock: {value}
'''
assertValidConfig(tmpdir, content.format(value=value))


@pytest.mark.parametrize('value', ['true', 'false'])
def test_python_install_pipfile_ignore_pipfile(tmpdir, value):
content = '''
version: "2"
python:
install:
- pipfile: .
ignore_pipfile: {value}
'''
assertValidConfig(tmpdir, content.format(value=value))


@pytest.mark.parametrize('value', ['true', 'false'])
def test_python_system_packages(tmpdir, value):
content = '''
Expand Down

0 comments on commit 4bc117c

Please sign in to comment.