Skip to content

Commit ddd1921

Browse files
committed
Cleanup and docs
1 parent bec0847 commit ddd1921

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
before_install: skip
1010
addons: skip
1111
env: TOXENV=linting
12+
cache:
13+
directories:
14+
- $HOME/.cache/pre-commit
1215

1316
-
1417
name: Docs

docs/development.rst

+33-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 virutal 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
@@ -74,3 +104,5 @@ Follow these steps to release a new version of the project:
74104
6. Tag the release with the new release version (``git tag v<new tag>``)
75105
7. Push the tag (``git push upstream --tags``)
76106
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/

tox.ini

-12
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ basepython = python3
2828
deps = pre-commit
2929
commands = pre-commit run --all-files --show-diff-on-failure
3030

31-
[testenv:flake8]
32-
skip_install = true
33-
basepython = python
34-
deps = flake8
35-
commands = flake8 {posargs:.}
36-
37-
[testenv:black]
38-
skip_install = true
39-
basepython = python
40-
deps = black
41-
commands = black --check {posargs:.}
42-
4331
[flake8]
4432
max-line-length = 88
4533
exclude = .eggs,.tox,docs

0 commit comments

Comments
 (0)