Skip to content

Commit 3c7bceb

Browse files
committed
added install-from-source documentation, linked to main readme
1 parent 4c8a890 commit 3c7bceb

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ testcaches = .hypothesis .pytest_cache .pytype coverage.xml htmlcov .coverage
2525
all: version test build
2626

2727
develop: devversion package test
28-
python3 setup.py develop --uninstall
29-
python3 setup.py develop
28+
python3 -m pip uninstall mmif-python -y
29+
python3 -m pip install -e
3030

3131
publish: distclean version package test
3232
test `git branch --show-current` = "master"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ including ;
1515
## For more ...
1616
* [Version history and patch notes](https://github.com/clamsproject/mmif-python/blob/main/CHANGELOG.md)
1717
* [MMIF Python API documentation](https://clamsproject.github.io/mmif-python)
18+
* [Getting started ...](https://clams.ai/mmif-python/latest/introduction.html) (includes installation instruction)
1819
* [MMIF JSON specification and schema](https://clamsproject.github.io/mmif)

documentation/introduction.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,32 @@ Package ``mmif-python`` is distributed via the official PyPI. Users are supposed
2727
2828
This will install a package `mmif` to local python.
2929

30+
31+
Installing from source tree for development
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
34+
.. note::
35+
This is not necessary for most users who just want to use the ``mmif-python`` package. This is only for developers who want to modify the source code.
36+
37+
Following these instructions will install the ``mmif-python`` package in `"editable" mode <https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs>`_. This means that any changes you make to the source code will be immediately available to the installed package.
38+
39+
1. First, you need a general developer toolchain that includes the ``make`` command.
40+
2. Then, run the following command in the root of the source tree:
41+
42+
.. code-block:: bash
43+
44+
make develop
45+
46+
This will install all dependencies, run all the tests, and then install the package in editable mode.
47+
48+
3. If you want to skip the testing, you can run `make package` first, and then manually install the package in editable mode:
49+
50+
.. code-block:: bash
51+
52+
make package
53+
python3 -m pip install -e .
54+
55+
3056
The MMIF format and specification is evolving over time, and ``mmif-python`` package will be updated along with the changes in MMIF format.
3157

3258
.. note:: MMIF format is not always backward-compatible. To find out more about relations between MMIF specification versions and ``mmif-python`` versions, please take time to read our decision on the subject `here <https://mmif.clams.ai/versioning/>`_. If you need to know which python SDK supports which specification version, see :ref:`target-versions` page.

0 commit comments

Comments
 (0)