Skip to content

Commit 75ec14d

Browse files
Merge pull request #201 Update README to reflect PyPI usage
2 parents ec20caf + 6d62e61 commit 75ec14d

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

README.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ containing a free-form question, two MCQs and one MRQ:
3737
Installation
3838
------------
3939

40-
Install the requirements into the Python virtual environment of your
41-
`edx-platform` installation by running the following command from the
42-
root folder:
40+
You can install Problem Builder from [PyPI](https://pypi.org/project/xblock-problem-builder/)
41+
using this command:
4342

44-
```bash
45-
$ pip install -r requirements.txt
4643
```
44+
pip install xblock-problem-builder
45+
```
46+
47+
For full details, see "Open edX Installation", below.
4748

4849
Usage
4950
-----
@@ -53,8 +54,9 @@ See [Usage Instructions](doc/Usage.md)
5354
Workbench installation and settings
5455
-----------------------------------
5556

56-
Install to the workbench's virtualenv by running the following command from the
57-
problem builder repo root:
57+
For developers, you can install this XBlock into the XBlock SDK workbench's
58+
virtualenv by running the following command from the problem builder repo
59+
root:
5860

5961
```bash
6062
pip install -r requirements.txt
@@ -161,24 +163,19 @@ version, with the exception of the following compatibility issues:
161163
* `edx-platform` version `open-release/eucalyptus.2` and earlier must use
162164
[v2.6.0](https://github.com/open-craft/problem-builder/tree/v2.6.0). See
163165
[PR 128](https://github.com/open-craft/problem-builder/pull/128) for details.
164-
* `edx-platform` version `named-release/dogwood.3` must use
166+
* `edx-platform` version `named-release/dogwood.3` and earlier must use
165167
[v2.0.0](https://github.com/open-craft/problem-builder/tree/v2.0.0).
166-
* Otherwise, consult the `edx-platform/requirements/edx/edx-private.txt` file to see which revision was
167-
used by [edx.org](https://edx.org) for your branch.
168168

169169
The `edx-platform` `master` branch will generally always be compatible with the most recent Problem Builder tag. See
170-
[edx-private.txt](https://github.com/edx/edx-platform/blob/master/requirements/edx/edx-private.txt) for the version
170+
[the EDXAPP_PRIVATE_REQUIREMENTS setting](https://github.com/edx/configuration/blob/master/playbooks/roles/edxapp/defaults/main.yml) for the version
171171
currently installed on [edx.org](https://edx.org).
172172

173-
To install Problem Builder on an Open edX installation, choose the tag you wish to install, and run:
173+
To install new versions of Problem Builder (v3.1.3+), use `pip install xblock-problem-builder` or specify a version using e.g. `pip install xblock-problem-builder==3.1.3`. To do this on Open edX could look like:
174174

175175
```bash
176-
$ sudo -u edxapp -Hs
177-
edxapp $ cd ~
178-
edxapp $ source edxapp_env
179-
edxapp $ TAG='v2.6.5' # example revision
180-
edxapp $ pip install "git+https://github.com/open-craft/problem-builder.git@$TAG#egg=xblock-problem-builder==$TAG"
181-
edxapp $ cd edx-platform
176+
$ sudo -Hu edxapp bash
177+
edxapp $ cd && . edxapp_env && . ./venvs/edxapp/bin/activate && cd edx-platform/
178+
edxapp $ pip install xblock-problem-builder
182179
edxapp $ ./manage.py lms migrate --settings=aws # or openstack, as appropriate
183180
```
184181

@@ -188,8 +185,27 @@ $ sudo /edx/bin/supervisorctl restart edxapp:
188185
$ sudo /edx/bin/supervisorctl restart edxapp_workers:
189186
```
190187

188+
To install old verions of Problem Builder (< v3.1.3) on an Open edX installation, choose the tag you wish to install, follow the above instructions but instead of the `pip install xblock-problem-builder` command, use:
189+
190+
```
191+
TAG='v2.6.5' pip install "git+https://github.com/open-craft/problem-builder.git@$TAG#egg=xblock-problem-builder==$TAG"
192+
```
193+
194+
Note that Problem Builder requires [xblock-utils](https://github.com/edx/xblock-utils).
195+
If you are installing it into a virtualenv used by edx-platform, xblock-utils should
196+
already be installed. But if you are installing it into another virtualenv, you may
197+
need to first install xblock-utils manually (recent versions of it are not available
198+
on PyPI so will not be automatically installed).
199+
191200
See [Usage Instructions](doc/Usage.md) for how to enable in Studio.
192201

202+
Publishing to PyPI
203+
------------------
204+
205+
Whenever we tag a new version, e.g. `v3.1.3` and push it to GitHub, CircleCI will
206+
build it and deploy it to PyPI automatically. For details on how this works, see
207+
[this pull request](https://github.com/open-craft/problem-builder/pull/199).
208+
193209
License
194210
-------
195211

0 commit comments

Comments
 (0)