Skip to content

Commit

Permalink
feat: switch the package name from "tutor-openedx" to "tutor"
Browse files Browse the repository at this point in the history
The package maintainer of the "tutor" package was kind enough to
transfer ownership of the project to us. This is great, because we no
longer have to use the "openedx" suffix, which is trademarked.

For the time being, we keep maintaining the "tutor-openedx" package
which has a 1-to-1 dependency on the "tutor" package. In the future, we
expect that we will no longer push upgrades to tutor-openedx.
  • Loading branch information
regisb committed Jul 3, 2021
1 parent b6aefda commit c15eec5
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Note: Breaking changes between versions are indicated by "💥".

## Unreleased

- [Improvement] Tutor is now published on pypi as "tutor".

## v12.0.1 (2021-06-22)

- [Bugfix] Fix double pulling mongodb image when upgrading from Koa to Lilac.
- [Improvement] Better logging during `plugins disable`.
- [Bugfix] Fix "upstream sent too big header" error during login of existing users after a Koa to Lilac upgrade.
- [Feature] Added the ability to skip `config.yml` file modification while running `tutor config save` command with `-e` or `--env-only` flag.
- [Feature] Add new config value `FORUM_MONGODB_DATABASE` to set the forum database name
- [Feature] Add new config value `FORUM_MONGODB_DATABASE` to set the forum database name.

## v12.0.0 (2021-06-09)

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM docker.io/python:3.7-slim-stretch
COPY --from=library/docker:19.03 /usr/local/bin/docker /usr/bin/docker
COPY --from=docker/compose:1.24.0 /usr/local/bin/docker-compose /usr/bin/docker-compose

RUN pip install tutor-openedx
RUN pip install tutor
RUN mkdir /opt/tutor
ENV TUTOR_ROOT /opt/tutor

Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ upgrade-requirements: ## Upgrade requirements files

build-pythonpackage: ## Build a python package ready to upload to pypi
python setup.py sdist
python setup-obsolete.py sdist

push-pythonpackage: ## Push python package to pypi
twine upload --skip-existing dist/tutor-$(shell make version).tar.gz
twine upload --skip-existing dist/tutor-openedx-$(shell make version).tar.gz

test: test-lint test-unit test-types test-format test-pythonpackage ## Run all tests by decreasing order or priority
Expand All @@ -39,7 +41,7 @@ test-types: ## Check type definitions
mypy --exclude=templates --ignore-missing-imports --strict tutor/ tests/

test-pythonpackage: build-pythonpackage ## Test that package can be uploaded to pypi
twine check dist/tutor-openedx-$(shell make version).tar.gz
twine check dist/tutor-$(shell make version).tar.gz

format: ## Format code automatically
black $(BLACK_OPTS)
Expand Down
2 changes: 1 addition & 1 deletion docs/cli_download.rst → docs/download/binary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
.. parsed-literal::
sudo curl -L "\ https\ ://github.com/overhangio/tutor/releases/download/v\ |tutor_version|/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
sudo chmod 0755 /usr/local/bin/tutor
sudo chmod 0755 /usr/local/bin/tutor
3 changes: 3 additions & 0 deletions docs/download/pip.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. parsed-literal::
pip install tutor
10 changes: 4 additions & 6 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Direct binary download

The latest binaries can be downloaded from https://github.com/overhangio/tutor/releases. From the command line:

.. include:: cli_download.rst
.. include:: download/binary.rst

This is the simplest and recommended installation method for most people. Note however that you will not be able to use custom plugins with this pre-compiled binary. The only plugins you can use with this approach are those that are already bundled with the binary: see the :ref:`existing plugins <existing_plugins>`.

Expand All @@ -42,16 +42,14 @@ This is the simplest and recommended installation method for most people. Note h
Alternative installation methods
--------------------------------

If you would like to inspect the Tutor source code, you are most welcome to install Tutor from `Pypi <https://pypi.org/project/tutor-openedx/>`_ or directly from `the Github repository <https://github.com/overhangio/tutor>`_. You will need python >= 3.6 with pip and the libyaml development headers. On Ubuntu, these requirements can be installed by running::
If you would like to inspect the Tutor source code, you are most welcome to install Tutor from `Pypi <https://pypi.org/project/tutor/>`_ or directly from `the Github repository <https://github.com/overhangio/tutor>`_. You will need python >= 3.6 with pip and the libyaml development headers. On Ubuntu, these requirements can be installed by running::

sudo apt install python3 python3-pip libyaml-dev

Installing from pypi
~~~~~~~~~~~~~~~~~~~~

::

pip install tutor-openedx
.. include:: download/pip.rst

Installing from source
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -129,7 +127,7 @@ Then, delete all data associated to your Open edX platform::
Finally, uninstall Tutor itself::

# If you installed tutor from source
pip uninstall tutor-openedx
pip uninstall tutor

# If you downloaded the tutor binary
sudo rm /usr/local/bin/tutor
6 changes: 5 additions & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ Quickstart (1-click install)

1. `Download <https://github.com/overhangio/tutor/releases>`_ the latest stable release of Tutor and place the ``tutor`` executable in your path. From the command line:

.. include:: cli_download.rst
.. include:: download/binary.rst

Or:

.. include:: download/pip.rst

2. Run ``tutor local quickstart``
3. You're done!
Expand Down
66 changes: 66 additions & 0 deletions setup-obsolete.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import io
import os
import sys

from setuptools import setup

HERE = os.path.abspath(os.path.dirname(__file__))


def load_readme():
return """
WARNING: This project has moved to https://pypi.org/project/tutor/. You should now install Tutor with::
pip install tutor
"""


def load_about():
about = {}
with io.open(
os.path.join(HERE, "tutor", "__about__.py"), "rt", encoding="utf-8"
) as f:
exec(f.read(), about) # pylint: disable=exec-used
return about


ABOUT = load_about()

setup(
name="tutor-openedx",
version=ABOUT["__version__"],
url="https://docs.tutor.overhang.io/",
project_urls={
"Documentation": "https://docs.tutor.overhang.io/",
"Code": "https://github.com/overhangio/tutor",
"Issue tracker": "https://github.com/overhangio/tutor/issues",
"Community": "https://discuss.overhang.io",
},
license="AGPLv3",
author="Overhang.io",
author_email="[email protected]",
description="The Docker-based Open edX distribution designed for peace of mind",
long_description=load_readme(),
long_description_content_type="text/x-rst",
packages=[],
python_requires=">=3.5",
install_requires=["tutor=={}".format(ABOUT["__version__"])],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)
sys.stderr.write("""
Installing Tutor from tutor-openedx is deprecated. You should instead install the "tutor" package with:
pip install tutor
""")
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def is_requirement(line):
ABOUT = load_about()

setup(
name="tutor-openedx",
name="tutor",
version=ABOUT["__version__"],
url="https://docs.tutor.overhang.io/",
project_urls={
Expand All @@ -47,7 +47,7 @@ def is_requirement(line):
license="AGPLv3",
author="Overhang.io",
author_email="[email protected]",
description="The docker-based Open edX distribution designed for peace of mind",
description="The Docker-based Open edX distribution designed for peace of mind",
long_description=load_readme(),
long_description_content_type="text/x-rst",
packages=find_packages(exclude=["tests*"]),
Expand Down

0 comments on commit c15eec5

Please sign in to comment.