From 4ebab8889cc8546bf19bbd2981b2231547b45757 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Mon, 3 Jul 2017 15:04:46 -0400 Subject: Add screenshot to front page Also: - Updated pythong_scripting.py example to show how to colorize text - Updated contributing.md to show how to run code coverage in parallel using python-xdist and -nauto - Updated contributing.md to talk more about looking at unit test results within the PR --- CONTRIBUTING.md | 10 +++++++++- README.md | 2 ++ cmd2.png | Bin 0 -> 294386 bytes examples/python_scripting.py | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 cmd2.png diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ffac39bf..88898f8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -274,7 +274,7 @@ where `4` should be replaced by the number of parallel threads you wish to run f Code coverage can be measured as follows: ```shell -py.test --cov=cmd2 --cov-report term-missing --cov-report=html +py.test -nauto --cov=cmd2 --cov-report=term-missing --cov-report=html ``` Then use your web browser of choice to look at the results which are in `/htmlcov/index.html`. @@ -390,6 +390,14 @@ how to do it. 6. Indicate what local testing you have done (e.g. what OS and version(s) of Python did you run the unit test suite with) + +7. Creating the PR causes our continuous integration (CI) systems to automatically run all of the + unit tests on all supported OSes and all supported versions of Python. You should watch your PR + to make sure that all unit tests pass on Both TravisCI (Linux) and AppVeyor (Windows). + +8. If any unit tests fail, you should look at the details and fix the failures. You can then push + the fix to the same branch in your fork and the PR will automatically get updated and the CI system + will automatically run all of the unit tests again. ### How We Review and Merge Pull Requests diff --git a/README.md b/README.md index 805ce5d6..b499eb41 100755 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ applications. It provides a simple API which is an extension of Python's built- of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary when using cmd. +[![Screenshot](cmd2.png)](https://github.com/python-cmd2/cmd2/blob/master/cmd2.png) + Main Features ------------- diff --git a/cmd2.png b/cmd2.png new file mode 100644 index 00000000..810f7c9e Binary files /dev/null and b/cmd2.png differ diff --git a/examples/python_scripting.py b/examples/python_scripting.py index a0d36e36..ae04fda1 100755 --- a/examples/python_scripting.py +++ b/examples/python_scripting.py @@ -36,7 +36,7 @@ class CmdLineApp(Cmd): def _set_prompt(self): """Set prompt so it displays the current working directory.""" self.cwd = os.getcwd() - self.prompt = '{!r} $ '.format(self.cwd) + self.prompt = self.colorize('{!r} $ '.format(self.cwd), 'cyan') def postcmd(self, stop, line): """Hook method executed just after a command dispatch is finished. -- cgit v1.2.1