Skip to content

Commit 30805ea

Browse files
authored
Merge pull request #118 from LibreTexts/master
v0.5.1 release
2 parents 8776ca7 + 242e729 commit 30805ea

26 files changed

+123
-57
lines changed

.travis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ before_install:
2121
install:
2222
- python3 -m pip install .
2323
before_script:
24-
- python3 -m pip install pytest pytest-cov pytest-tornado black
24+
- python3 -m pip install -r testing_reqs.txt
2525
script:
2626
- python3 -m pytest ./ngshare/ --cov=./ngshare/
2727
- python3 -m black -S -l 80 --check .
2828
- helm2 lint --strict helmchart/ngshare
2929
- helm lint --strict helmchart/ngshare
3030
after_success:
31-
- python3 -m pip install "codecov>=2.1.0"
3231
- codecov
3332
- |-
3433
test ${TRAVIS_PYTHON_VERSION} = 3.8 &&
@@ -39,17 +38,17 @@ after_success:
3938
chmod 400 /tmp/ssh_key &&
4039
python3 -m pip install chartpress &&
4140
GIT_SSH_COMMAND="ssh -i /tmp/ssh_key" chartpress --push --publish-chart --long &&
42-
test "${TRAVIS_BRANCH}" = stable &&
43-
GIT_SSH_COMMAND="ssh -i /tmp/ssh_key" chartpress --push --publish-chart --tag `python -c 'from ngshare import __version__; print(__version__)'`
41+
test -n "${TRAVIS_TAG}" &&
42+
GIT_SSH_COMMAND="ssh -i /tmp/ssh_key" chartpress --push --publish-chart --tag "${TRAVIS_TAG}"
4443
deploy:
4544
provider: pypi
46-
user: "__token__"
45+
user: __token__
4746
password:
48-
secure: "CnzfP5f78cuucJXf9Abgu2c9CC88/e/bo/b4lFGlcqZrjay5w0xG0arhGdIDWb8LtxmaX74l5Pm+QZi63uP+h5qUJiBh6pux1uhoyvtg3FMlpbHedqpPHYOYgqATeJ/UXeCTwFU37XZJQEJYB1YriwATYgdhpb0qbe105dVsBzhVuz+JNqyLXXPdaBXYlRYzr+77yHonh2Rq1tkzhGS3WrKByQT6y+PD+Eff0ADg390myXI9gpj1EMfc/gtfKjFWQFzY1E3stmt927BbMU/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W4OoXwq83TRsGycSRQnwDyPNEOA=

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<img src="ngshare/favicon.png" width="64px" />
55

66
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
7-
[![Build Status](https://travis-ci.org/lxylxy123456/ngshare.svg?branch=master)](https://travis-ci.org/lxylxy123456/ngshare)
8-
[![codecov](https://codecov.io/gh/lxylxy123456/ngshare/branch/master/graph/badge.svg)](https://codecov.io/gh/lxylxy123456/ngshare)
7+
[![Build Status](https://travis-ci.org/LibreTexts/ngshare.svg?branch=master)](https://travis-ci.org/LibreTexts/ngshare)
8+
[![codecov](https://codecov.io/gh/LibreTexts/ngshare/branch/master/graph/badge.svg)](https://codecov.io/gh/LibreTexts/ngshare)
99
[![Documentation Status](https://readthedocs.org/projects/ngshare/badge/?version=latest)](https://ngshare.readthedocs.io/en/latest/?badge=latest)
1010

1111
## What can I use it for?

chartpress.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
charts:
22
- name: helmchart/ngshare
3-
imagePrefix: rkevin/
3+
imagePrefix: libretexts/
44
repo:
5-
git: rkevin-arch/ngshare-helm-repo
6-
published: https://rkevin-arch.github.io/ngshare-helm-repo
5+
git: libretexts/ngshare-helm-repo
6+
published: https://libretexts.github.io/ngshare-helm-repo
77
images:
88
ngshare:
99
dockerfilePath: Dockerfile

docs/contributer_guide/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ We use `black <https://github.com/psf/black>`_ to format our code.
4040
Contributing
4141
------------
4242

43-
If you want to contribute to ``ngshare``, submit a pull request to `https://github.com/lxylxy123456/ngshare/pulls <https://github.com/lxylxy123456/ngshare/pulls>`_.
43+
If you want to contribute to ``ngshare``, submit a pull request to `https://github.com/LibreTexts/ngshare/pulls <https://github.com/LibreTexts/ngshare/pulls>`_.

docs/contributer_guide/install.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Install from GitHub
77
-------------------
88
.. code:: bash
99
10-
git clone https://github.com/lxylxy123456/ngshare.git
10+
git clone https://github.com/LibreTexts/ngshare.git
1111
cd ngshare/
1212
pip3 install .
1313
@@ -24,7 +24,7 @@ The first line installs pip dependencies.
2424
.. code:: bash
2525
2626
pip3 install tornado jupyterhub sqlalchemy
27-
git clone https://github.com/lxylxy123456/ngshare.git
27+
git clone https://github.com/LibreTexts/ngshare.git
2828
cd ngshare/ngshare/
2929
python3 ngshare.py [arguments]
3030
@@ -48,7 +48,7 @@ Run vngshare without Installation
4848
.. code:: bash
4949
5050
pip3 install pytest pytest-cov pytest-tornado
51-
git clone https://github.com/lxylxy123456/ngshare.git
51+
git clone https://github.com/LibreTexts/ngshare.git
5252
cd ngshare/ngshare/
5353
python3 vngshare.py [arguments]
5454
# OR

docs/contributer_guide/project_structure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Testing
6565

6666
ngshare_exchange
6767
----------------
68-
The client side of ngshare is packaged into a `separate repo <https://github.com/lxylxy123456/ngshare_exchange>`_.
68+
The client side of ngshare is packaged into a `separate repo <https://github.com/LibreTexts/ngshare_exchange>`_.
6969

7070
``ngshare_exchange/*.py`` implement a nbgrader pluggable exchange that uses ngshare to release, fetch, and submit assignments.
7171

docs/index.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ngshare
99
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
1010
:target: https://github.com/psf/black
1111

12-
.. image:: https://travis-ci.org/lxylxy123456/ngshare.svg?branch=master
13-
:target: https://travis-ci.org/lxylxy123456/ngshare
12+
.. image:: https://travis-ci.org/LibreTexts/ngshare.svg?branch=master
13+
:target: https://travis-ci.org/LibreTexts/ngshare
1414

15-
.. image:: https://codecov.io/gh/lxylxy123456/ngshare/branch/master/graph/badge.svg
16-
:target: https://codecov.io/gh/lxylxy123456/ngshare
15+
.. image:: https://codecov.io/gh/LibreTexts/ngshare/branch/master/graph/badge.svg
16+
:target: https://codecov.io/gh/LibreTexts/ngshare
1717

1818
.. image:: https://readthedocs.org/projects/ngshare/badge/?version=latest
1919
:target: https://ngshare.readthedocs.io/en/latest/?badge=latest
@@ -23,6 +23,13 @@ ngshare
2323

2424
To solve this problem, we are letting exchange to gather all information it needs from a set of REST APIs, which is implemented by ``ngshare``.
2525

26+
Project Introduction Video
27+
--------------------------
28+
29+
.. raw:: html
30+
31+
<p><iframe width="640" height="360" src="https://www.youtube.com/embed/FdK0AGwxkSw" frameborder="0" allowfullscreen></iframe></p>
32+
2633
Youtube Video Demo
2734
------------------
2835

@@ -46,6 +53,7 @@ Table of Contents
4653
user_guide/notes_instructor.rst
4754
user_guide/course_management.rst
4855
user_guide/bugs.rst
56+
user_guide/change_log.rst
4957

5058
.. toctree::
5159
:maxdepth: 2

docs/user_guide/bugs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Reporting Bugs
22
--------------
33

4-
If you find a bug in ``ngshare``, submit an issue to `https://github.com/lxylxy123456/ngshare/issues <https://github.com/lxylxy123456/ngshare/issues>`_.
4+
If you find a bug in ``ngshare``, submit an issue to `https://github.com/LibreTexts/ngshare/issues <https://github.com/LibreTexts/ngshare/issues>`_.

docs/user_guide/change_log.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Change Log
2+
==========
3+
4+
0.5.1
5+
-----
6+
7+
ngshare:
8+
9+
- Update helm chart with clearer installation instructions
10+
- Misc. documentation updates to help with installation
11+
- Transfer repository ownership to LibreTexts, change all GitHub links and tokens related to Travis, PyPI, etc
12+
- Test Travis autopublishing a stable release
13+
14+
ngshare_exchange:
15+
16+
- Drastically increase test coverage
17+
- Removed some dead code
18+
- Several important bugfixes and typo fixes in the exchange classes and course management tool
19+
- Transfer repository ownership to LibreTexts, change all GitHub links and tokens related to Travis, PyPI, etc
20+
- Test Travis autopublishing a stable release
21+
22+
0.5.0
23+
-----
24+
Initial release intended for the public.
25+

docs/user_guide/install_jupyterhub.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Intalling in a Regular JupyterHub Environment as a Managed Service
33

44
This guide assumes you already know how to set up a JupyterHub environment. You should also be familiar with `adding JupyterHub-managed services <https://jupyterhub.readthedocs.io/en/stable/reference/services.html#hub-managed-services>`_ into ``jupyterhub_config.py``.
55

6-
If you prefer looking at examples instead, `here's <https://github.com/lxylxy123456/ngshare/tree/master/testing/install_jhmanaged>`_ a sample installation setup. It doesn't demonstrate all the configurable options, though.
6+
If you prefer looking at examples instead, `here's <https://github.com/LibreTexts/ngshare/tree/master/testing/install_jhmanaged>`_ a sample installation setup. It doesn't demonstrate all the configurable options, though.
77

88
Installing ngshare
99
------------------

docs/user_guide/install_z2jh.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installing on a Z2JH Cluster
33

44
This guide assumes you already have a Kubernetes cluster with a persistent volume provisioner (which should be the case if you run Z2JH). You should also be familiar with installing Z2JH and using Helm.
55

6-
If you prefer looking at examples instead, `here's <https://github.com/lxylxy123456/ngshare/tree/master/testing/install_z2jh>`_ a sample installation setup. It doesn't demonstrate all the configurable options, though.
6+
If you prefer looking at examples instead, `here's <https://github.com/LibreTexts/ngshare/tree/master/testing/install_z2jh>`_ a sample installation setup. It doesn't demonstrate all the configurable options, though.
77

88
Installing ngshare
99
------------------
@@ -15,10 +15,10 @@ Installing the Helm Chart
1515

1616
.. code:: bash
1717
18-
helm repo add ngshare https://rkevin-arch.github.io/ngshare-helm-repo/
18+
helm repo add ngshare https://libretexts.github.io/ngshare-helm-repo/
1919
helm repo update
2020
21-
Afterwards, create a ``config.yaml`` file to customize your helm chart. Here's a bare minimum ``config.yaml`` file:
21+
Afterwards, create a ``config.yaml`` file to customize your helm chart. Here's a bare minimum ``config.yaml`` file that assumes you're installing ``ngshare`` into the same namespace as Z2JH, and that you only need 1GB of storage in total:
2222

2323
.. code:: yaml
2424
@@ -45,6 +45,9 @@ Here's a sample ``config.yaml`` file that contains the most commonly used option
4545
4646
ngshare:
4747
hub_api_token: demo_token_9wRp0h4BLzAnC88jjBfpH0fa4QV9tZNI
48+
# Please change the line below with the namespace your Z2JH helm chart is installed under
49+
# You can omit this value if you're installing ngshare in the same namespace
50+
hub_api_url: http://hub.your-z2jh-namespace.svc.cluster.local:8081/hub/api
4851
admins:
4952
- admin1
5053
- admin2
@@ -53,7 +56,7 @@ Here's a sample ``config.yaml`` file that contains the most commonly used option
5356
# Amount of storage to allocate
5457
storage: 1Gi
5558
56-
For a full list of configurable values, check `here <https://github.com/lxylxy123456/ngshare/blob/master/helmchart/ngshare/values.yaml>`_.
59+
For a full list of configurable values, check `here <https://github.com/LibreTexts/ngshare/blob/master/helmchart/ngshare/values.yaml>`_.
5760

5861
You can now install ``ngshare`` using Helm:
5962

@@ -64,6 +67,8 @@ You can now install ``ngshare`` using Helm:
6467
# For helm2
6568
helm install ngshare/ngshare -n ngshare -f config.yaml
6669
70+
If you didn't install Z2JH in the default namespace, it is recommended to install ``ngshare`` in the same namespace as Z2JH by specifying ``--namespace your_namespace_name`` in ``helm install``. Note that if you don't put ``ngshare`` and Z2JH in the same namespace, you will have to modify the ``ngshare.hub_api_url`` value in your config to point to ``http://hub.your-z2jh-namespace.svc.cluster.local:8081/hub/api`` instead (replace ``your-z2jh-namespace`` with the namespace where Z2JH is installed).
71+
6772
After installation, Helm should give you some instructions on how to configure Z2JH.
6873

6974
Configuring Z2JH to Work with ngshare
@@ -81,10 +86,10 @@ The ``ngshare`` Helm chart should output something like this at the end of insta
8186
ngshare.py: |
8287
c.JupyterHub.services.append({
8388
'name': 'ngshare',
84-
'url': 'http://ngshare:8080',
85-
'api_token': 'demo_token_9wRp0h4BLzAnC88jjBfpH0fa4QV9tZNI'})
89+
'url': 'http://ngshare.default.svc.cluster.local:8080',
90+
'api_token': '3VEgEzkhFkQsdZNI7zhnyMW6U0a2xsZq'})
8691
87-
If you have installed ``ngshare`` in the same namespace as JupyterHub, then just add this to your Z2JH ``config.yaml``. Otherwise, you will have to change the URL and use the fully qualified domain name for the ``ngshare`` service (usually ``ngshare.my-namespace.svc.cluster-domain.example``). After you have updated Z2JH's configuration using ``helm upgrade``, you can verify the service is working as intended by logging into JupyterHub, clicking "Control Panel", then "Services -> ngshare". If you see the ``ngshare`` welcome page, you may proceed.
92+
Follow the instructions and add the code block to your Z2JH ``config.yaml``. After you have updated Z2JH's configuration using ``helm upgrade``, you can verify the service is working as intended by logging into JupyterHub, clicking "Control Panel", then "Services -> ngshare". If you see the ``ngshare`` welcome page, you may proceed.
8893

8994
Installing ngshare_exchange
9095
---------------------------
@@ -106,18 +111,19 @@ Afterwards, you may install ``ngshare_exchange``:
106111
107112
python3 -m pip install ngshare_exchange
108113
109-
Finally, you need to configure nbgrader to use ngshare_exchange. This can be done by adding the following to nbgrader's global config file, ``/etc/jupyter/nbgrader_config.py``:
114+
Finally, you need to configure nbgrader to use ngshare_exchange. This can be done by adding some code to nbgrader's global config file, ``/etc/jupyter/nbgrader_config.py``. The relevant code should be output by the ``helm install`` command earlier when you installed ``ngshare``:
110115

111116
.. code:: python
112117
113118
from ngshare_exchange import configureExchange
114119
c=get_config()
115-
configureExchange(c)
116-
117-
# Add the following to let students access courses without configuration
120+
configureExchange(c, 'http://ngshare.default.svc.cluster.local:8080/services/ngshare')
121+
# Add the following line to let students access courses without configuration
118122
# For more information, read Notes for Instructors in the documentation
119123
c.CourseDirectory.course_id = '*'
120124
121-
A sample singleuser Dockerfile that does all of the above is available `on Github <https://github.com/lxylxy123456/ngshare/tree/master/testing/install_z2jh/Dockerfile-singleuser>`_.
125+
Depending on your helm values and the namespace you install in, the URL will be different. Be sure to follow the code your ``helm install`` command outputs.
126+
127+
A sample singleuser Dockerfile that does all of the above is available `on Github <https://github.com/LibreTexts/ngshare/tree/master/testing/install_z2jh/Dockerfile-singleuser>`_.
122128

123129
If running ``nbgrader list`` doesn't cause any significant errors, you have installed ``ngshare_exchange`` correctly. Please check `Notes for Administrators <notes_admin.html>`_ and `Notes for Instructors <notes_instructor.html>`_ for more information on how to use ``ngshare``. The students should be able to use nbgrader as normal without additional configuration.

docs/user_guide/upgrade.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ If you installed ngshare using a helm chart, upgrading is as simple as a `helm u
1111
# assuming your release is called ngshare
1212
helm upgrade ngshare ngshare/ngshare -f your_config.yaml
1313
14+
Please note that if during your first installation you didn't specify an API token, the randomized API token will be regenerated every upgrade. Therefore, it's highly recommended to specify the API token in your config.yaml.
15+
1416
If you aren't using the helm chart and installed ngshare using pip, upgrade through pip:
1517

1618
.. code:: bash

helmchart/ngshare/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v1
22
name: ngshare
33
version: 0.0.1-set.by.chartpress
44
description: Exchange service allowing nbgrader to be used on a Z2JH environment
5-
home: https://github.com/lxylxy123456/ngshare/
6-
icon: https://raw.githubusercontent.com/lxylxy123456/ngshare/master/ngshare/favicon.png
5+
home: https://github.com/LibreTexts/ngshare/
6+
icon: https://raw.githubusercontent.com/LibreTexts/ngshare/master/ngshare/favicon.png
77
maintainers:
88
- name: rkevin
99
url: https://github.com/rkevin-arch

helmchart/ngshare/templates/NOTES.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@ hub:
66
ngshare.py: |
77
c.JupyterHub.services.append({
88
'name': '{{ include "ngshare.name" . }}',
9-
'url': 'http://{{ include "ngshare.fullname" . }}:{{ .Values.deployment.port }}',
9+
'url': 'http://{{ include "ngshare.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.deployment.port }}',
1010
'api_token': '{{ include "ngshare.getToken" . }}'})
1111

1212
Afterwards, install ngshare_exchange in every Docker image that has nbgrader.
13-
https://ngshare.readthedocs.io/user_guide/install_z2jh.html#installing-ngshare-exchange
13+
Then, place the following in /etc/jupyter/nbgrader_config.py:
14+
15+
from ngshare_exchange import configureExchange
16+
c=get_config()
17+
configureExchange(c, 'http://{{ include "ngshare.fullname" .}}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.deployment.port }}/services/{{ include "ngshare.name" . }}')
18+
# Add the following line to let students access courses without configuration
19+
# For more information, read Notes for Instructors in the documentation
20+
c.CourseDirectory.course_id = '*'
21+
22+
Read the documentation for more detailed instructions:
23+
https://ngshare.readthedocs.io/en/latest/user_guide/install_z2jh.html
1424

1525
Please let us know on Github if you encounter any issues, thanks!
1626
{{- if .Values.ngshare.hub_api_token_is_random }}

0 commit comments

Comments
 (0)