Skip to content

Commit

Permalink
use markdown for readme, so steadymark can test itself :)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Mar 9, 2020
1 parent 13b9502 commit 9014705
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 133 deletions.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -16,7 +16,7 @@ $(VENV): # creates $(VENV) folder if does not exist
python3 -mvenv $(VENV)
$(VENV)/bin/pip install -U pip setuptools

$(VENV)/bin/sphinx-build $(VENV)/bin/twine $(VENV)/bin/nosetests $(VENV)/bin/python $(VENV)/bin/pip: # installs latest pip
$(VENV)/bin/steadymark $(VENV)/bin/sphinx-build $(VENV)/bin/twine $(VENV)/bin/nosetests $(VENV)/bin/python $(VENV)/bin/pip: # installs latest pip
test -e $(VENV)/bin/pip || make $(VENV)
$(VENV)/bin/pip install -r development.txt
$(VENV)/bin/pip install -e .
Expand All @@ -35,6 +35,9 @@ dependencies: | $(VENV)/bin/nosetests
unit: $(VENV)/bin/nosetests # runs only unit tests
$(VENV)/bin/nosetests --cover-erase tests/unit

docs:
$(VENV)/bin/steadymark README.md

# runs integration tests
integration: $(VENV)/bin/nosetests # runs integration tests
$(VENV)/bin/nosetests tests/integration
Expand Down
115 changes: 115 additions & 0 deletions README.md
@@ -0,0 +1,115 @@
Steady Mark
===========

[![image](https://img.shields.io/pypi/dm/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/codecov/c/github/gabrielfalcao/steadymark)](https://codecov.io/gh/gabrielfalcao/steadymark)

[![image](https://img.shields.io/github/workflow/status/gabrielfalcao/steadymark/python-3.6?label=python%203.6)](https://github.com/gabrielfalcao/steadymark/actions)

[![image](https://img.shields.io/github/workflow/status/gabrielfalcao/steadymark/python-3.7?label=python%203.7)](https://github.com/gabrielfalcao/steadymark/actions)

[![image](https://img.shields.io/github/license/gabrielfalcao/steadymark?label=Github%20License)](https://github.com/gabrielfalcao/steadymark/blob/master/LICENSE)

[![image](https://img.shields.io/pypi/v/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/pypi/l/steadymark?label=PyPi%20License)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/pypi/format/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/pypi/status/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/pypi/pyversions/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/pypi/implementation/steadymark)](https://pypi.org/project/steadymark)

[![image](https://img.shields.io/snyk/vulnerabilities/github/gabrielfalcao/steadymark)](https://github.com/gabrielfalcao/steadymark/network/alerts)

[![image](https://img.shields.io/github/v/tag/gabrielfalcao/steadymark)](https://github.com/gabrielfalcao/steadymark/releases)

Turning your github readme files into python test suites since 2012
===================================================================

Steady Mark was created for python developers that love Github and
markdown.

How it works:
-------------

Write your documentation using [github-flavored
markdown](http://github.github.com/github-flavored-markdown/), surround
your snippets with python code blocks and steadymark will automatically
find and run them, if there is a header preceeding your python snippet
it will be used as title for your test.

Advantages:
===========

- Add test coverage to your app/library while documenting it
- Never have old malfunctional examples on your project's main page in
github
- It uses [misaka](http://misaka.61924.nl/) which is a python-binding
of [sundown](https://github.com/tanoku/sundown), the markdown engine
that github uses in itself

Example
=======

unicode.lower transforms string into lowercase
----------------------------------------------

```python
from sure import expect
assert expect(u"Gabriel Falcao".lower()).equals(u"gabriel falcao")
```

python can add numbers
----------------------

```python
assert (2 + 2) == 4, 'oops baby'
```

Start using steady mark now!
============================

This is the code for the example above, copy and paste in you python
project right now and start keeping your documentation up-to-date with
the code.

# My project name
`version 0.1`

## unicode.lower transforms string into lowercase

```python
assert "LOWERCaSe".lower() == "lowercase"
```

## python can add numbers

```python
assert (2 + 2) == 5, 'oops baby'
```

Just run with:

``` {.sourceCode .bash}
$ steadymark README.md
```

loading a python file before running tests
------------------------------------------

you can tell steadymark to load a "boot" file before running the tests,
it's very useful for hooking up [sure](http://falcao.it/sure) or
[HTTPretty](http://falcao.it/HTTPretty)

Steadymark is on version 0.8.0
==============================

```python
>>> from sure import expect
>>> from steadymark import version
>>> assert expect(version).should.equal("0.8.0")
```
131 changes: 0 additions & 131 deletions README.rst

This file was deleted.

3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -61,7 +61,8 @@ def read_version():
name="steadymark",
version=read_version(),
description=("Markdown-based test runner for python. " "Good for github projects"),
long_description=local_file("README.rst"),
long_description=local_file("README.md"),
long_description_content_type='text/markdown'
author="Gabriel Falcao",
author_email="gabriel@nacaolivre.org",
url="http://github.com/gabrielfalcao/steadymark",
Expand Down

0 comments on commit 9014705

Please sign in to comment.