Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit f1f316e

Browse files
committed
Some quick doc updates for using Poetry
1 parent 3fa302f commit f1f316e

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

README.rst

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,15 @@ Developing and Hacking
111111

112112
So, you would like to help out with developing the Runestone Components. Great We welcome all the help we can get. There is plenty to do no matter what your experience level. There are a couple of prerequisites.
113113

114-
1. You will need a version of Python, I currently develop on 3.8 or higher, but test on 3.7 and later.
114+
1. You will need a version of Python, I currently develop on 3.9 or higher, but test on 3.8 and later.
115+
115116
2. You will need nodejs and npm as well since there is a LOT of Javascript code in the components.
116117

117118
To get everything set up do the following
118119

119120
1. Make a Fork of this repository. and ``git clone`` the repository to your development machine.
120-
2. Set up your environment on your development machine
121121

122-
1. Make a virtual environment for testing and working (I recommend ``python -m venv`` as it is baked in). Activate the virtual environment. Then run ``pip install -r requirements-dev.txt`` to install the necessary python packages.
123-
2. To use Runestone Components, rather than following the instructions above for installing runestone simply run ``pip install -e .`` from the top level runestone directory. This will install all of the required prerequisites and setup the runestone install as a link to the development directory. Once you've done that, you can continue following the instructions in the Quick Start section from the line starting with ``mkdir myproject``.
122+
2. Install `Poetry <https://python-poetry.org/docs/>`_
124123

125124
3. From the top level RunestoneComponents folder run ``npm install`` this will install the packaging tools that are needed for Javascript development. ``npm run`` gives you a list of commands The key command is ``npm run build`` this will combine all of the Javascript and CSS files for all the components into a single runestone.js file. If you are doing some really deep development and want to avoid building a book, you can put your html in public/index.html and use the ``npm run start`` command. This will automatically rebuild runestone.js and refresh the webpage every time you save a change.
126125

@@ -154,15 +153,7 @@ Our goal is to have unit tests which rely on Selenium (a library that helps simu
154153

155154
* You'll also need to have done the above installation.
156155

157-
* You should be using virtual environment,
158-
you'll need a clone of the RunestoneComponents repository,
159-
and you'll need to have done ``pip install -e .`` from
160-
the top level of the RunestoneComponents directory.
161-
162-
* If you have installed RunestoneComponents in your virtualenv using ``pip install -e .``,
163-
then you should have all the python dependencies you need.
164-
165-
* You can do ``pip install -r requirements-dev.txt`` to be sure you have everything.
156+
* We have converted to using poetry for our dependency management. To run `runestone` while in development mode `poetry run runestone ...` OR you can run `poetry shell` to start up a shell with a virtual environment activated.
166157

167158

168159
**To run tests:**
@@ -175,10 +166,10 @@ Our goal is to have unit tests which rely on Selenium (a library that helps simu
175166

176167
* Finally, to run a test, ensuring that you have accessed a directive folder, type the following at the command prompt:
177168

178-
* ``pytest``
169+
* ``poetry run pytest``
179170

180171
Running pytest from the main directory will run all the tests. To run a single test you can navigate to the
181-
directory of the test, or you can run ``pytest -k XXX`` where XXX is a substring that matches some part of
172+
directory of the test, or you can run ``poetry run pytest -k XXX`` where XXX is a substring that matches some part of
182173
the test functions name.
183174

184175
.. note::

0 commit comments

Comments
 (0)