You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: .github/workflows/python-package.yml
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -27,23 +27,21 @@ jobs:
27
27
channel: "#builds"
28
28
if: always()
29
29
30
-
- name: Setup npm and build runestone.js
30
+
- name: Install npm dependencies
31
31
run: |
32
32
npm install
33
33
- name: Set up Python ${{ matrix.python-version }}
34
34
uses: actions/setup-python@v2
35
35
with:
36
36
python-version: ${{ matrix.python-version }}
37
-
- name: Install dependencies
37
+
- name: Install Python dependencies
38
38
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>`.
Copy file name to clipboardExpand all lines: README.rst
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,16 +111,15 @@ Developing and Hacking
111
111
112
112
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.
113
113
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
+
115
116
2. You will need nodejs and npm as well since there is a LOT of Javascript code in the components.
116
117
117
118
To get everything set up do the following
118
119
119
120
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
121
121
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``.
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.
126
125
@@ -154,15 +153,7 @@ Our goal is to have unit tests which rely on Selenium (a library that helps simu
154
153
155
154
* You'll also need to have done the above installation.
156
155
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.
166
157
167
158
168
159
**To run tests:**
@@ -175,10 +166,10 @@ Our goal is to have unit tests which rely on Selenium (a library that helps simu
175
166
176
167
* Finally, to run a test, ensuring that you have accessed a directive folder, type the following at the command prompt:
177
168
178
-
* ``pytest``
169
+
* ``poetry run pytest``
179
170
180
171
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
0 commit comments