Skip to content

Commit 11431cd

Browse files
authored
Update badges to reflect GitHub Actions as CI (#35)
1 parent 51d0277 commit 11431cd

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22

33
# `codetiming` - A flexible, customizable timer for your Python code
44

5-
[![Latest version](https://img.shields.io/pypi/v/codetiming.svg)](https://pypi.org/project/codetiming/)
6-
[![Python versions](https://img.shields.io/pypi/pyversions/codetiming.svg)](https://pypi.org/project/codetiming/)
7-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5+
[![Latest version](https://img.shields.io/pypi/v/codetiming)](https://pypi.org/project/codetiming/)
6+
[![Python versions](https://img.shields.io/pypi/pyversions/codetiming)](https://pypi.org/project/codetiming/)
7+
[![Downloads](https://img.shields.io/pypi/dd/codetiming)](https://pypi.org/project/codetiming/)
8+
[![Tests](https://img.shields.io/github/workflow/status/realpython/codetiming/unit_tests?label=tests)](https://github.com/realpython/codetiming/actions)
89
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
910
[![Interrogate DocStrings](https://github.com/realpython/codetiming/blob/master/interrogate_badge.svg)](https://interrogate.readthedocs.io/)
10-
[![CircleCI](https://circleci.com/gh/realpython/codetiming.svg?style=shield)](https://circleci.com/gh/realpython/codetiming)
11+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
12+
[![MIT license](https://img.shields.io/pypi/l/codetiming)](https://mit-license.org/)
1113

1214
Install `codetiming` from PyPI:
1315

1416
```
1517
$ python -m pip install codetiming
1618
```
1719

18-
The source code is [available at GitHub](https://github.com/realpython/codetiming).
20+
The source code is [available on GitHub](https://github.com/realpython/codetiming).
1921

20-
For a complete tutorial on how `codetiming` works, see [Python Timer Functions: Three Ways to Monitor Your Code](https://realpython.com/python-timer) on [Real Python](https://realpython.com/).
22+
For a complete tutorial on `codetiming`, see [Python Timer Functions: Three Ways to Monitor Your Code](https://realpython.com/python-timer) on [Real Python](https://realpython.com/).
2123

2224
## Basic Usage
2325

@@ -50,22 +52,22 @@ You can use `codetiming.Timer` in several different ways:
5052

5153
## Arguments
5254

53-
`Timer` accepts the following arguments when it's created, all are optional:
55+
`Timer` accepts the following arguments when it's created. All arguments are optional:
5456

5557
- **`name`:** An optional name for your timer
5658
- **`text`:** The text shown when your timer ends. It should contain a `{}` placeholder that will be filled by the elapsed time in seconds (default: `"Elapsed time: {:.4f} seconds"`)
57-
- **`logger`:** A function/callable that takes a string argument, and will report the elapsed time when the logger is stopped (default: `print()`)
59+
- **`logger`:** A function/callable that takes a string argument and will report the elapsed time when the logger is stopped (default: `print()`)
5860

5961
You can turn off explicit reporting of the elapsed time by setting `logger=None`.
6062

61-
In the template text, you can also use explicit attributes to refer to the `name` of the timer, or log the elapsed time in `milliseconds`, `seconds` (the default), or `minutes`. For example:
63+
In the template text, you can also use explicit attributes to refer to the `name` of the timer or log the elapsed time in `milliseconds`, `seconds` (the default), or `minutes`. For example:
6264

6365
```python
6466
t1 = Timer(name="NamedTimer", text="{name}: {minutes:.1f} minutes")
6567
t2 = Timer(text="Elapsed time: {milliseconds:.0f} ms")
6668
```
6769

68-
Note that the strings used by `text` are **not** f-strings. Instead they are used as templates that will be populated using `.format()` behind the scenes. If you want to combine the `text` template with an f-string, you need to use double braces for the template values:
70+
Note that the strings used by `text` are **not** f-strings. Instead, they are used as templates that will be populated using `.format()` behind the scenes. If you want to combine the `text` template with an f-string, you need to use double braces for the template values:
6971

7072
```python
7173
t = Timer(text=f"{__file__}: {{:.4f}}")
@@ -146,6 +148,6 @@ You can also get simple statistics about your named timers. Continuing from the
146148
`timers` support `.count()`, `.total()`, `.min()`, `.max()`, `.mean()`, `.median()`, and `.stdev()`.
147149

148150

149-
## Acknowledgements
151+
## Acknowledgments
150152

151-
`codetiming` is based on a similar module originally developed for the [Midgard Geodesy library](https://kartverket.github.io/midgard/) at the [Norwegian Mapping Authority](https://www.kartverket.no/en/).
153+
`codetiming` is based on a similar module initially developed for the [Midgard Geodesy library](https://kartverket.github.io/midgard/) at the [Norwegian Mapping Authority](https://www.kartverket.no/en/).

0 commit comments

Comments
 (0)