Skip to content

Commit 23d965a

Browse files
committed
Add some beta-specific stuff to the home page.
1 parent c005acc commit 23d965a

File tree

4 files changed

+48
-14
lines changed

4 files changed

+48
-14
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,5 @@ publish: px
8989
publishbeta: px
9090
rm -f $(WEBHOME)/beta/*.px
9191
cp doc/_build/px/*.px $(WEBHOME)/beta
92+
rm -f $(WEBHOME)/sample_html_beta/*.*
93+
cp doc/sample_html_beta/*.* $(WEBHOME)/sample_html_beta

doc/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Add any Sphinx extension module names here, as strings. They can be extensions
2626
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
27-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'px_xlator']
27+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', 'px_xlator']
2828

2929
# Add any paths that contain templates here, relative to this directory.
3030
templates_path = ['_templates']
@@ -204,3 +204,13 @@
204204
# When auto-doc'ing a class, write the class' docstring and the __init__ docstring
205205
# into the class docs.
206206
autoclass_content = "both"
207+
208+
209+
210+
211+
212+
prerelease = bool(max(release).isalpha())
213+
214+
def setup(app):
215+
app.add_config_value('prerelease', False, 'env')
216+
print "** Prerelease = %r" % prerelease

doc/index.rst

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,19 @@ Coverage measurement is typically used to gauge the effectiveness of tests. It
2727
can show which parts of your code are being exercised by tests, and which are
2828
not.
2929

30-
The latest version is 3.5b1, released 5 June 2011.
31-
It is supported on Python versions 2.3 through 3.2.
30+
.. ifconfig:: not prerelease
31+
32+
The latest version is coverage.py 3.4, released 10 September 2010.
33+
It is supported on Python versions 2.3 through 3.2.
34+
35+
.. ifconfig:: prerelease
36+
37+
The latest version is coverage.py 3.5b1, released 5 June 2011.
38+
This is a pre-release build. The usual warnings about possible bugs apply.
39+
It is supported on Python versions 2.3 through 3.2.
40+
The latest stable version is coverage.py 3.4, `described here`_.
41+
42+
.. _described here: http://nedbatchelder.com/code.coverage
3243

3344

3445
Quick start
@@ -66,11 +77,19 @@ Getting started is easy:
6677
6778
$ coverage html
6879
69-
Then visit htmlcov/index.html in your browser, to see a
70-
`report like this`_.
80+
.. ifconfig:: not prerelease
81+
82+
Then visit htmlcov/index.html in your browser, to see a
83+
`report like this`_.
84+
85+
.. ifconfig:: prerelease
86+
87+
Then visit htmlcov/index.html in your browser, to see a
88+
`report like this one`_.
7189

7290
.. _coverage page on the Python Package Index: http://pypi.python.org/pypi/coverage
7391
.. _report like this: /code/coverage/sample_html/index.html
92+
.. _report like this one: /code/coverage/sample_html_beta/index.html
7493

7594

7695
Using coverage.py
@@ -106,11 +125,11 @@ Bitbucket also hosts the `code repository`_.
106125
.. _Bitbucket issue tracker: http://bitbucket.org/ned/coveragepy/issues
107126
.. _code repository: http://bitbucket.org/ned/coveragepy
108127

109-
`I can be reached`__ in a number of ways, I'm happy to answer questions about
128+
`I can be reached`_ in a number of ways. I'm happy to answer questions about
110129
using coverage.py. I'm also available hourly for consultation or custom
111130
development.
112131

113-
__ http://nedbatchelder.com/site/aboutned.html
132+
.. _I can be reached: http://nedbatchelder.com/site/aboutned.html
114133

115134

116135

@@ -123,11 +142,11 @@ More information
123142
install
124143
cmd
125144
config
126-
api
127145
source
128146
excluding
129147
branch
130148
subprocess
149+
api
131150
faq
132151
changes
133152

howto.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@
1414
- Version and date in doc/index.rst
1515
- Version and copyright date in doc/conf.py
1616
- Version --version output in doc/install.rst
17+
- Generate new sample_html to get the latest, incl footer version number:
18+
cd C:\ned\cog\trunk
19+
rmdir/s/q htmlcov
20+
coverage run --branch --source=cogapp cogapp\test_cogapp.py CogTestsInMemory
21+
coverage html
22+
- IF BETA:
23+
copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html_beta
24+
- ELSE:
25+
copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html
1726
- IF BETA:
1827
- Build and publish docs:
1928
$ make publishbeta
2029
- ELSE:
21-
- Generate new sample_html to get the latest, incl footer version number:
22-
cd C:\ned\cog\trunk
23-
rmdir/s/q htmlcov
24-
coverage run --branch --source=cogapp cogapp\test_cogapp.py CogTestsInMemory
25-
coverage html
26-
copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html
2730
- Build and publish docs:
2831
$ make px publish
2932
- Kits:

0 commit comments

Comments
 (0)