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

Commit b47c47d

Browse files
authored
Merge branch 'RunestoneInteractive:master' into master
2 parents d3c8160 + 5743152 commit b47c47d

File tree

24 files changed

+2110
-660
lines changed

24 files changed

+2110
-660
lines changed

.github/workflows/python-package.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,21 @@ jobs:
2727
channel: "#builds"
2828
if: always()
2929

30-
- name: Setup npm and build runestone.js
30+
- name: Install npm dependencies
3131
run: |
3232
npm install
3333
- name: Set up Python ${{ matrix.python-version }}
3434
uses: actions/setup-python@v2
3535
with:
3636
python-version: ${{ matrix.python-version }}
37-
- name: Install dependencies
37+
- name: Install Python dependencies
3838
run: |
39-
python -m pip install --upgrade pip
40-
python -m pip install flake8 pytest
41-
# Install as editable so that tests run in cwd, instead of in wherever Python puts system lib. This is important because tests are run on the local (not system lib) files. Therefore, the npm run build produces its files locally, not in system libs; if installed in system libs, then the components won't be able to find these files.
42-
pip install -e .
43-
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
39+
# Install Poetry per the `instructions <https://python-poetry.org/docs/master/#installing-with-the-official-installer>`.
40+
curl -sSL https://install.python-poetry.org | python3 -
41+
$HOME/.local/bin/poetry install
4442
- name: Tests
4543
run: |
46-
pytest
44+
$HOME/.local/bin/poetry run pytest
4745
4846
- uses: act10ns/slack@v1
4947
with:

MANIFEST.in

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

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)