Skip to content

Commit

Permalink
simplify and better documentation of binder
Browse files Browse the repository at this point in the history
  • Loading branch information
gotcha committed Apr 6, 2020
1 parent 26e86ef commit 3e2895d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
16 changes: 7 additions & 9 deletions README.rst
Expand Up @@ -22,23 +22,21 @@ Features include:
- disable the fast search to be able to search and replace raw html tags, for example replace ``<strong>text</strong>`` by ``<em>text</em>``


Demo on mybinder.org.
Development
-----------

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/collective/collective.searchandreplace/repo2docker?urlpath=zope/Plone
.. image:: https://coveralls.io/repos/github/collective/collective.searchandreplace/badge.svg?branch=master
:target: https://coveralls.io/github/collective/collective.searchandreplace?branch=master


Development
-----------
Binder
------

Running tests on mybinder.org.
Running tests and demo Plone site on mybinder.org.

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/collective/collective.searchandreplace/repo2docker?filepath=binder%2Fpytest.ipynb

.. image:: https://coveralls.io/repos/github/collective/collective.searchandreplace/badge.svg?branch=master
:target: https://coveralls.io/github/collective/collective.searchandreplace?branch=master


Compatibility
-------------
Expand Down
6 changes: 5 additions & 1 deletion binder/postBuild
@@ -1,6 +1,10 @@
set -ex

PLONE_VERSION=5.2 buildout -Nvv buildout:eggs-directory=eggs install instance plonesite
rm -rf bin/

buildout bootstrap

PLONE_VERSION=5.2 bin/buildout -Nvv buildout:eggs-directory=eggs install instance plonesite pytest

# install the zope proxy extension
mv binder/jupyter_zope_proxy.py ${NB_PYTHON_PREFIX}/lib/python*/site-packages/
Expand Down
26 changes: 19 additions & 7 deletions binder/pytest.ipynb
@@ -1,5 +1,14 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# `collective.searchandreplace`\n",
"<a href=\"../../zope/Plone/\" target=\"_blank\">Live demo</a>\n",
"## Run all tests"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -8,25 +17,28 @@
},
"outputs": [],
"source": [
"! cd .. && rm -rf bin && buildout bootstrap"
"! cd ..\n",
"! PLONE_VERSION=5.2 bin/pytest"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"! cd .. && PLONE_VERSION=5.2 bin/buildout -Nv install pytest"
"## Search and replace form\n",
"This is a live demo site where you can try the search and replace feature"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"! cd .. && PLONE_VERSION=5.2 bin/pytest -k where"
"%%html\n",
"<iframe src=\"../../zope/Plone/front-page/@@searchreplaceform\" width=\"1200\" height=\"1000\"></iframe>"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -4,4 +4,4 @@ ignore =
.travis.yml

[tool:pytest]
addopts = --disable-warnings --pyargs collective.searchandreplace
addopts = --disable-warnings --pyargs collective.searchandreplace -m "not upgrade"

0 comments on commit 3e2895d

Please sign in to comment.