Skip to content

Commit f0723a7

Browse files
committed
Move documentation from GH Pages to Read the Docs
1 parent cd4abaf commit f0723a7

File tree

8 files changed

+14
-106
lines changed

8 files changed

+14
-106
lines changed

.github/PULL_REQUEST_TEMPLATE/code_pr.md renamed to .github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
name: Bug fix or feature implementation
3-
about: Create a pull request for changed code
4-
---
5-
61
<!--
72
Please prefix your PR title with [WIP] for PRs that are still in progress.
83
-->
@@ -16,3 +11,5 @@ The related issue or a description of the bug or feature that this PR addresses.
1611
- [ ] Entry to release notes added
1712
- [ ] Linter and mypy show no errors
1813
- [ ] Unit tests passing
14+
- [ ] For documentation changes: The Read the Docs preview builds and looks
15+
as expected

.github/PULL_REQUEST_TEMPLATE/documentation_pr.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/builddocs.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/release-deploy.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,10 @@ jobs:
2828
python -m pip install --upgrade pip
2929
python -m pip install build
3030
cd main
31-
echo "RELEASE_VERSION=$(cat pyfakefs/_version.py | cut -d "'" -f 2)" >> $GITHUB_ENV
3231
python -m build
3332
3433
- name: Publish package to PyPI
3534
uses: pypa/gh-action-pypi-publish@master
3635
with:
3736
user: __token__
3837
password: ${{ secrets.PYPI_TOKEN }}
39-
40-
- name: Create release docs
41-
run: |
42-
python -m pip install wheel
43-
python -m pip install pytest
44-
python -m pip install sphinx
45-
cd main/docs
46-
make html
47-
48-
- name: Checkout gh-pages
49-
uses: actions/checkout@v2
50-
with:
51-
ref: gh-pages
52-
path: doc
53-
54-
- name: Copy and commit release documentation
55-
run: |
56-
cp -r main/gh-pages/* doc/release
57-
cd doc
58-
sed "s/href=\"release\/index.html\">Pyfakefs .*/href=\"release\/index.html\">Pyfakefs $RELEASE_VERSION/" index.html > index1.html
59-
rm index.html
60-
mv index1.html index.html
61-
git config user.name "CI Build"
62-
git config user.email "[email protected]"
63-
git add release/*
64-
git commit -a -m "Release $RELEASE_VERSION documentation"
65-
git push

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ New version after the transfer to `pytest-dev`.
1212
### Infrastructure
1313
* transferred the repository to the `pytest-dev` organization
1414
* renamed the `master` branch to `main`
15-
* added automatic PyPI release workflow
15+
* added automatic PyPI release workflow
16+
* move documentation from GitHub Pages to Read the Docs
1617

1718
### New Features
1819
* added some support for `st_blocks` in stat result

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ If you want to improve the existing documentation, you can do this also using a
4646
You can contribute to:
4747
* the source code documentation using [Google documentation style](https://google.github.io/styleguide/pyguide.html)
4848
* the [README](https://github.com/pytest-dev/pyfakefs/blob/main/README.md) using [markdown syntax](https://help.github.com/articles/basic-writing-and-formatting-syntax/)
49-
* the documentation published on [GitHub Pages](http://pytest-dev.github.io/pyfakefs/),
50-
located in the `docs` directory (call `make html` from that directory).
51-
For building the documentation, you will need [sphinx](http://sphinx.pocoo.org/).
49+
* the documentation published on [Read the Docs](https://pytest-pyfakefs.readthedocs.io/en/latest/),
50+
located in the `docs` directory (call `make html` from that directory).
51+
For building the documentation, you will need [sphinx](http://sphinx.pocoo.org/).
5252
* [this file](https://github.com/pytest-dev/pyfakefs/blob/main/CONTRIBUTING.md)
5353
if you want to enhance the contributing guide itself
5454

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# pyfakefs [![PyPI version](https://badge.fury.io/py/pyfakefs.svg)](https://badge.fury.io/py/pyfakefs) [![Python version](https://img.shields.io/pypi/pyversions/pyfakefs.svg)](https://img.shields.io/pypi/pyversions/pyfakefs.svg) ![Testsuite](https://github.com/pytest-dev/pyfakefs/workflows/Testsuite/badge.svg)
1+
# pyfakefs [![PyPI version](https://badge.fury.io/py/pyfakefs.svg)](https://badge.fury.io/py/pyfakefs) [![Python version](https://img.shields.io/pypi/pyversions/pyfakefs.svg)](https://img.shields.io/pypi/pyversions/pyfakefs.svg) ![Testsuite](https://github.com/pytest-dev/pyfakefs/workflows/Testsuite/badge.svg) [![Documentation Status](https://readthedocs.org/projects/pytest-pyfakefs/badge/?version=latest)](https://pytest-pyfakefs.readthedocs.io/en/latest/?badge=latest)
2+
23

34
pyfakefs implements a fake file system that mocks the Python file system modules.
45
Using pyfakefs, your tests operate on a fake file system in memory without
@@ -16,14 +17,14 @@ pyfakefs works with current versions of Linux, Windows and macOS.
1617

1718
This document provides a general overview for pyfakefs. There is more:
1819

19-
* The documentation at [GitHub Pages:](http://pytest-dev.github.io/pyfakefs)
20-
* The [Release documentation](http://pytest-dev.github.io/pyfakefs/release)
20+
* The documentation at **Read the Docs**:
21+
* The [Release documentation](https://pytest-pyfakefs.readthedocs.io/en/stable)
2122
contains usage documentation for pyfakefs and a description of the
2223
most relevant classes, methods and functions for the last version
2324
released on PyPI
24-
* The [Development documentation](http://pytest-dev.github.io/pyfakefs/main)
25+
* The [Development documentation](https://pytest-pyfakefs.readthedocs.io/en/latest)
2526
contains the same documentation for the current main branch
26-
* The [Release 3.7 documentation](http://pytest-dev.github.io/pyfakefs/release37)
27+
* The [Release 3.7 documentation](https://pytest-pyfakefs.readthedocs.io/en/v3.7.2/)
2728
contains usage documentation for the last version of pyfakefs
2829
supporting Python 2.7
2930
* The [Release Notes](https://github.com/pytest-dev/pyfakefs/blob/main/CHANGES.md)

pyfakefs/tests/patched_packages_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
openpyxl = None
3737

3838

39+
@unittest.skipIf(IS_PYPY, "Has a problem with current PyPy")
3940
class TestPatchedPackages(fake_filesystem_unittest.TestCase):
4041
def setUp(self):
4142
self.setUpPyfakefs()
@@ -47,15 +48,13 @@ def test_read_csv(self):
4748
df = pd.read_csv(path)
4849
assert (df.columns == ['1', '2', '3', '4']).all()
4950

50-
@unittest.skipIf(IS_PYPY, "Has a problem with current PyPy")
5151
def test_read_table(self):
5252
path = '/foo/bar.csv'
5353
self.fs.create_file(path, contents='1|2|3|4')
5454
df = pd.read_table(path, delimiter='|')
5555
assert (df.columns == ['1', '2', '3', '4']).all()
5656

5757
if pd is not None and xlrd is not None:
58-
@unittest.skipIf(IS_PYPY, "Has a problem with current PyPy")
5958
def test_read_excel(self):
6059
path = '/foo/bar.xlsx'
6160
src_path = os.path.dirname(os.path.abspath(__file__))
@@ -67,7 +66,6 @@ def test_read_excel(self):
6766
assert (df.columns == [1, 2, 3, 4]).all()
6867

6968
if pd is not None and openpyxl is not None:
70-
@unittest.skipIf(IS_PYPY, "Has a problem with current PyPy")
7169
def test_write_excel(self):
7270
self.fs.create_dir('/foo')
7371
path = '/foo/bar.xlsx'

0 commit comments

Comments
 (0)