Skip to content

Commit d1d4ff6

Browse files
authored
Release v1.17.0 (#227)
* Release 1.17.0 * Use pre-commit similar to what pytest does
1 parent 8c257f4 commit d1d4ff6

File tree

7 files changed

+86
-15
lines changed

7 files changed

+86
-15
lines changed

.pre-commit-config.yaml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
repos:
2-
- repo: https://github.com/ambv/black
2+
3+
- repo: https://github.com/psf/black
34
rev: stable
45
hooks:
5-
- id: black
6-
language_version: python3
6+
- id: black
7+
args: [--safe, --quiet]
8+
language_version: python3
9+
10+
- repo: https://gitlab.com/pycqa/flake8
11+
rev: 3.7.7
12+
hooks:
13+
- id: flake8
14+
exclude: docs
15+
language_version: python3

.travis.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
sudo: required
99
before_install: skip
1010
addons: skip
11-
env: TOXENV=flake8
11+
env: TOXENV=linting
12+
cache:
13+
directories:
14+
- $HOME/.cache/pre-commit
1215

1316
-
1417
name: Docs
@@ -37,10 +40,15 @@ jobs:
3740
env: TOXENV=py37
3841

3942
-
40-
name: pypy 5.6.0
41-
python: pypy-5.6.0
43+
name: pypy
44+
python: pypy
4245
env: TOXENV=pypy
4346

47+
-
48+
name: pypy3
49+
python: pypy3
50+
env: TOXENV=pypy3
51+
4452
- stage: deploy
4553
python: 3.7
4654
dist: xenial

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ black = "*"
1111
pre-commit = "*"
1212

1313
[packages]
14-
pytest-selenium = {editable = true,path = "."}
14+
pytest-selenium = {editable = true,extras = ["appium"],path = "."}

docs/development.rst

+47-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
Development
22
===========
33

4+
To contribute to `pytest-selenium` you can use `Pipenv`_ to manage
5+
a python virtual environment and `pre-commit <https://pre-commit.com/>`_ to help you with
6+
styling and formatting.
7+
8+
To setup the virtual environment and pre-commit, run:
9+
10+
.. code-block:: bash
11+
12+
$ pipenv install --dev
13+
$ pipenv run pre-commit install
14+
15+
If you're not using `Pipenv`_, to install `pre-commit`, run:
16+
17+
.. code-block:: bash
18+
19+
$ pip install pre-commit
20+
$ pre-commit install
21+
22+
423
Automated Testing
524
-----------------
625

@@ -14,11 +33,22 @@ not, you can find it on the
1433
The only way to trigger Travis CI to run again for a pull request, is to submit
1534
another change to the pull branch.
1635

36+
You can do this with `git commit --allow-empty`
37+
1738
Running Tests
1839
-------------
1940

2041
You will need `Tox <http://tox.testrun.org/>`_ installed to run the tests
21-
against the supported Python versions.
42+
against the supported Python versions. If you're using `Pipenv`_ it will be
43+
installed for you.
44+
45+
With `Pipenv`_, run:
46+
47+
.. code-block:: bash
48+
49+
$ pipenv run tox
50+
51+
Otherwise, to install and run, do:
2252

2353
.. code-block:: bash
2454
@@ -60,3 +90,19 @@ Instructions for `edgedriver <https://developer.microsoft.com/en-us/microsoft-ed
6090
IEDriver
6191
~~~~~~~~
6292
Instructions for `iedriver <https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver>`_.
93+
94+
Releasing a new version
95+
-----------------------
96+
97+
Follow these steps to release a new version of the project:
98+
99+
1. Update your local master with the upstream master (``git pull --rebase upstream master``)
100+
2. Create a new branch and update ``news.rst`` with the new version, today's date, and all changes/new features
101+
3. Commit and push the new branch and then create a new pull request
102+
4. Wait for tests and reviews and then merge the branch
103+
5. Once merged, update your local master again (``git pull --rebase upstream master``)
104+
6. Tag the release with the new release version (``git tag v<new tag>``)
105+
7. Push the tag (``git push upstream --tags``)
106+
8. Done. You can monitor the progress on `Travis <https://travis-ci.org/pytest-dev/pytest-selenium/>`_
107+
108+
.. _Pipenv: https://docs.pipenv.org/en/latest/

docs/news.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
Release Notes
22
=============
33

4+
1.17.0 (2019-07-13)
5+
-------------------
6+
7+
* Added support for `Appium <https://appium.io/>`_
8+
9+
* Deprecate support for `PhantomJS`
10+
411
1.16.0 (2019-02-12)
512
-------------------
613

714
* ``pytest-selenium`` now requires pytest 3.6 or later.
15+
816
* Fixed `issue <https://github.com/pytest-dev/pytest-selenium/issues/216>`_ with TestingBot local tunnel.
917

1018
1.15.1 (2019-01-07)

pytest_selenium/pytest_selenium.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
def _merge(a, b):
4848
""" merges b and a configurations.
4949
Based on http://bit.ly/2uFUHgb
50-
"""
50+
"""
5151
for key in b:
5252
if key in a:
5353
if isinstance(a[key], dict) and isinstance(b[key], dict):

tox.ini

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{27,36,37,py,py3}, docs, flake8
7+
envlist = py{27,36,37,py,py3}, docs, linting
88

99
[testenv]
1010
passenv = PYTEST_ADDOPTS
@@ -22,11 +22,11 @@ changedir = docs
2222
deps = sphinx
2323
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
2424

25-
[testenv:flake8]
26-
skip_install = true
27-
basepython = python
28-
deps = flake8
29-
commands = flake8 {posargs:.}
25+
[testenv:linting]
26+
skip_install = True
27+
basepython = python3
28+
deps = pre-commit
29+
commands = pre-commit run --all-files --show-diff-on-failure
3030

3131
[flake8]
3232
max-line-length = 88

0 commit comments

Comments
 (0)