Skip to content

Commit fc6b192

Browse files
Ryan P Kilbycarltongibson
authored andcommitted
Fix readme, add to CI (#5625)
* Add readme build to CI * Fix pandoc import in setup.py * Replace sponsor HTML with markdown This loses the image centering, but can be converted to RST. * Fix README RST conversion - Links do not render correctly inside italics - Add hr between image caption and section, fixes markup on older versions of pandoc.
1 parent abef84f commit fc6b192

File tree

5 files changed

+37
-13
lines changed

5 files changed

+37
-13
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ matrix:
2222
- { python: "3.6", env: DJANGO=2.0 }
2323
- { python: "2.7", env: TOXENV=lint }
2424
- { python: "2.7", env: TOXENV=docs }
25+
- python: "2.7"
26+
env: TOXENV=readme
27+
addons:
28+
apt_packages: pandoc
2529
exclude:
2630
- { python: "2.7", env: DJANGO=master }
2731
- { python: "2.7", env: DJANGO=2.0 }

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,18 @@ Full documentation for the project is available at [http://www.django-rest-frame
1515

1616
REST framework is a *collaboratively funded project*. If you use
1717
REST framework commercially we strongly encourage you to invest in its
18-
continued development by **[signing up for a paid plan][funding]**.
18+
continued development by [signing up for a paid plan][funding].
1919

2020
The initial aim is to provide a single full-time position on REST framework.
2121
*Every single sign-up makes a significant impact towards making that possible.*
2222

23-
<p align="center">
24-
<a href="http://jobs.rover.com/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png"/></a>
25-
<a href="https://getsentry.com/welcome/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png"/></a>
26-
<a href="https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png"/></a>
27-
<a href="https://hello.machinalis.co.uk/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/machinalis-readme.png"/></a>
28-
<a href="https://rollbar.com/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png"/></a>
29-
</p>
23+
[![][rover-img]][rover-url]
24+
[![][sentry-img]][sentry-url]
25+
[![][stream-img]][stream-url]
26+
[![][machinalis-img]][machinalis-url]
27+
[![][rollbar-img]][rollbar-url]
3028

31-
*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com/).*
29+
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover][rover-url], [Sentry][sentry-url], [Stream][stream-url], [Machinalis][machinalis-url], and [Rollbar][rollbar-url].
3230

3331
---
3432

@@ -50,6 +48,8 @@ There is a live example API for testing purposes, [available here][sandbox].
5048

5149
![Screenshot][image]
5250

51+
----
52+
5353
# Requirements
5454

5555
* Python (2.7, 3.4, 3.5, 3.6)
@@ -188,6 +188,18 @@ Send a description of the issue via email to [rest-framework-security@googlegrou
188188
[funding]: https://fund.django-rest-framework.org/topics/funding/
189189
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
190190

191+
[rover-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png
192+
[sentry-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png
193+
[stream-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png
194+
[machinalis-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/machinalis-readme.png
195+
[rollbar-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png
196+
197+
[rover-url]: http://jobs.rover.com/
198+
[sentry-url]: https://getsentry.com/welcome/
199+
[stream-url]: https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf
200+
[machinalis-url]: https://hello.machinalis.co.uk/
201+
[rollbar-url]: https://rollbar.com/
202+
191203
[oauth1-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth
192204
[oauth2-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit
193205
[serializer-section]: http://www.django-rest-framework.org/api-guide/serializers/#serializers

requirements/requirements-packaging.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ transifex-client==0.11
99

1010
# Pandoc to have a nice pypi page
1111
pypandoc
12+
13+
# readme_renderer to check readme syntax
14+
readme_renderer

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
from setuptools import setup, find_packages
1010

1111
try:
12-
from pypandoc import convert
12+
from pypandoc import convert_file
1313

1414
def read_md(f):
15-
return convert(f, 'rst')
15+
return convert_file(f, 'rst')
1616
except ImportError:
1717
print("warning: pypandoc module not found, could not convert Markdown to RST")
1818

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ envlist =
66
{py27,py34,py35}-django110,
77
{py27,py34,py35,py36}-django111,
88
{py34,py35,py36}-django20,
9-
{py35,py36}-djangomaster
10-
lint,docs
9+
{py35,py36}-djangomaster,
10+
lint,docs,readme,
1111

1212
[travis:env]
1313
DJANGO =
@@ -42,3 +42,8 @@ commands = mkdocs build
4242
deps =
4343
-rrequirements/requirements-testing.txt
4444
-rrequirements/requirements-documentation.txt
45+
46+
[testenv:readme]
47+
commands = ./setup.py check -rs
48+
deps =
49+
-rrequirements/requirements-packaging.txt

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy