Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Pipfile and remove extra requirements.txt files #47626

Merged
merged 6 commits into from
May 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ MANIFEST
*.wpr
*.wpu
*.DS_Store
.pytest_cache
Pipfile.lock

# virtualenv
# - ignores directories of a virtualenv when you create it right on
Expand Down
40 changes: 40 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
Jinja2 = "*"
msgpack-python = ">0.3,!=0.5.5"
PyYAML = "*"
MarkupSafe = "*"
requests = ">=1.0.0"
tornado = ">=4.2.1,<5.0"
pycrypto = ">=2.6.1"
pyzmq = ">=2.2.0"

[dev-packages]
mock = ">=2.0.0"
apache-libcloud = ">=0.14.0"
boto = ">=2.32.1"
boto3 = ">=1.2.1"
moto = ">=0.3.6"
SaltPyLint = ">=v2017.3.6"
pytest = ">=3.5.0"

[packages.futures]
# Required by Tornado to handle threads stuff.
version = ">=2.0"
markers = "python_version < '3.0'"

[dev-packages.pytest-salt]
git = "git://github.com/saltstack/pytest-salt.git"
ref = "master"

[dev-packages.httpretty]
# httpretty Needs to be here for now even though it's a dependency of boto.
# A pip install on a fresh system will decide to target httpretty 0.8.10 to
# satisfy other requirements, and httpretty 0.8.10 has bugs in setup.py that
# prevent it from being successfully installed (at least on Python 3.4).
version = "*"
markers = "python_version >= '3.4'"
4 changes: 0 additions & 4 deletions requirements/base-py2.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/base-py3.txt

This file was deleted.

2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ MarkupSafe
requests>=1.0.0
tornado>=4.2.1,<5.0
# Required by Tornado to handle threads stuff.
futures>=2.0
futures>=2.0; python_version < '3.0'
16 changes: 16 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-r base.txt

mock>=2.0.0
apache-libcloud>=0.14.0
boto>=2.32.1
boto3>=1.2.1
moto>=0.3.6
SaltPyLint>=v2017.3.6
pytest>=3.5.0
git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt

# httpretty Needs to be here for now even though it's a dependency of boto.
# A pip install on a fresh system will decide to target httpretty 0.8.10 to
# satisfy other requirements, and httpretty 0.8.10 has bugs in setup.py that
# prevent it from being successfully installed (at least on Python 3.4).
httpretty; python_version >= '3.4'
13 changes: 2 additions & 11 deletions requirements/dev_python27.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
-r base-py2.txt

mock>=2.0.0
apache-libcloud>=0.14.0
boto>=2.32.1
boto3>=1.2.1
moto>=0.3.6
SaltPyLint>=v2017.3.6
pytest>=3.5.0
git+https://github.com/eisensheng/pytest-catchlog.git@develop#egg=Pytest-catchlog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the pytest-catchlog in the new dev.txt file. I am not sure what that particular addition to the Py27 requirements file is for since there's no comment about it, but I wanted to double check that this was intentional to leave that out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest-catchlog has been merged into pytest upstream, so we no longer needed it specified.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt
# This is a legacy file, use dev.txt
-r dev.txt
17 changes: 2 additions & 15 deletions requirements/dev_python34.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
-r base-py3.txt

mock>=2.0.0
apache-libcloud>=0.14.0
boto>=2.32.1
boto3>=1.2.1
moto>=0.3.6
# httpretty Needs to be here for now even though it's a dependency of boto.
# A pip install on a fresh system will decide to target httpretty 0.8.10 to
# satisfy other requirements, and httpretty 0.8.10 has bugs in setup.py that
# prevent it from being successfully installed (at least on Python 3.4).
httpretty
SaltPyLint>=v2017.2.29
pytest>=3.5.0
git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt
# This is a legacy file, use dev.txt
-r dev.txt
11 changes: 10 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def pytest_addoption(parser):
'SSH server on your machine. In certain environments, this '
'may be insecure! Default: False'
)
test_selection_group.addoption(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional? This seems unrelated to the rest of the changes here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional, it fixes pytest for salt, so you can run integration tests.

I can move it to a new PR if you want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's good. Just making sure.

'--proxy',
'--proxy-tests',
dest='ssh',
action='store_true',
default=False,
help='Run proxy tests'
)
test_selection_group.addoption(
'--run-destructive',
action='store_true',
Expand Down Expand Up @@ -640,7 +648,8 @@ def test_daemon(request):
('sysinfo', request.config.getoption('--sysinfo')),
('no_colors', request.config.getoption('--no-colors')),
('output_columns', request.config.getoption('--output-columns')),
('ssh', request.config.getoption('--ssh')))
('ssh', request.config.getoption('--ssh')),
('proxy', request.config.getoption('--proxy')))
options = namedtuple('options', [n for n, v in values])(*[v for n, v in values])
fake_parser = namedtuple('parser', 'options')(options)

Expand Down