diff --git a/.github/workflows/mr_ci.yml b/.github/workflows/mr_ci.yml
index a82bedce..fef6e30b 100644
--- a/.github/workflows/mr_ci.yml
+++ b/.github/workflows/mr_ci.yml
@@ -19,7 +19,7 @@ jobs:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
+ uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
diff --git a/.github/workflows/mr_ci_text_spotting.yml b/.github/workflows/mr_ci_text_spotting.yml
index c7ec1cfe..b67a8d2f 100644
--- a/.github/workflows/mr_ci_text_spotting.yml
+++ b/.github/workflows/mr_ci_text_spotting.yml
@@ -39,24 +39,25 @@ jobs:
run: |
python -m pip install wheel
python -m pip install numpy==1.26.4 torch==2.2.2 torchvision==0.17.2 -f https://download.pytorch.org/whl/torch_stable.html
- python -m pip install ".[dev]" # not text ones as windows install fails
+ python -m pip install ".[dev]"
python -m pip install pytest-cov
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
+ python -m pip install 'git+https://github.com/maps-as-data/DeepSolo.git'
+ python -m pip install 'git+https://github.com/maps-as-data/DPText-DETR.git'
+ python -m pip install 'git+https://github.com/maps-as-data/MapTextPipeline.git'
- - name: Clone + install DPText-DETR
+
+ - name: Clone DPText-DETR
run: |
git clone https://github.com/maps-as-data/DPText-DETR.git
- python -m pip install ./DPText-DETR
- - name: Clone + install DeepSolo
+ - name: Clone DeepSolo
run: |
git clone https://github.com/maps-as-data/DeepSolo.git
- python -m pip install ./DeepSolo
- - name: Clone + install MapTextPipeline
+ - name: Clone MapTextPipeline
run: |
git clone https://github.com/maps-as-data/MapTextPipeline.git
- python -m pip install ./MapTextPipeline
- name: Hugging Face CLI
run: |
diff --git a/.github/workflows/mr_pip_ci.yml b/.github/workflows/mr_pip_ci.yml
index 299c7677..0d613eb2 100644
--- a/.github/workflows/mr_pip_ci.yml
+++ b/.github/workflows/mr_pip_ci.yml
@@ -22,7 +22,7 @@ jobs:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
+ uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
@@ -44,4 +44,4 @@ jobs:
- name: Test with pytest
run: |
- python -m pytest ./tests
+ python -m pytest ./tests --ignore=tests/test_text_spotting/
diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml
index 93c8ff9b..502489b9 100644
--- a/.github/workflows/publish-to-pypi.yml
+++ b/.github/workflows/publish-to-pypi.yml
@@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- - name: Set up Python 3.9
+ - name: Set up Python 3.11
uses: actions/setup-python@v2
with:
- python-version: '3.9'
+ python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml
index 9362e62f..98a5d813 100644
--- a/.github/workflows/publish-to-test-pypi.yml
+++ b/.github/workflows/publish-to-test-pypi.yml
@@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- - name: Set up Python 3.9
+ - name: Set up Python 3.11
uses: actions/setup-python@v4
with:
- python-version: '3.9'
+ python-version: '3.11'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
@@ -32,5 +32,5 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- repository_url: https://test.pypi.org/legacy/
+ repository-url: https://test.pypi.org/legacy/
verbose: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88d07e31..fe34af37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,20 @@ The following table shows which versions of MapReader are compatible with which
_Add new changes here_
+## [v1.5.1](https://github.com/Living-with-machines/MapReader/releases/tag/v1.5.1) (2024-10-30)
+
+## Added
+
+- Added `text-requirement.txt` file to install text spotting dependencies. Users can now install text spotting dependencies using `pip install -r text-requirements.txt` ([#515](https://github.com/maps-as-data/MapReader/pull/515))
+
+## Removed
+
+- Removed `text` extras from `setup.py` ([#515](https://github.com/maps-as-data/MapReader/pull/515))
+
+## Fixed
+
+- Fixes upload to PyPI by removing `text` extras ([#515](https://github.com/maps-as-data/MapReader/pull/515))
+
## [v1.5.0](https://github.com/Living-with-machines/MapReader/releases/tag/v1.5.0) (2024-10-29)
### Added
diff --git a/docs/source/getting-started/installation-instructions/2-install-mapreader.rst b/docs/source/getting-started/installation-instructions/2-install-mapreader.rst
index 86b04715..a84c10d1 100644
--- a/docs/source/getting-started/installation-instructions/2-install-mapreader.rst
+++ b/docs/source/getting-started/installation-instructions/2-install-mapreader.rst
@@ -4,8 +4,13 @@ Step 2: Install MapReader
Method 1: Install from `PyPI `_
--------------------------------------------------------------------
-If you want to use the latest stable release of MapReader and do not want/need access to the worked examples or MapReader code, we recommend installing from PyPI.
-This is probably the easiest way to install MapReader.
+Installing MapReader from PyPI is probably the easiest way to install MapReader.
+
+We recommend using this method if:
+
+- You want to use the latest stable release of MapReader.
+- You **only want to use MapReader's classification pipeline** (i.e. you do not need the text spotting functionality).
+- You do not need access to the worked examples or MapReader code.
To install ``mapreader`` without the text spotting dependencies (i.e. just the classification pipeline):
@@ -13,19 +18,21 @@ To install ``mapreader`` without the text spotting dependencies (i.e. just the c
pip install mapreader
-Or, to install ``mapreader`` with the text spotting dependencies:
+.. note:: To install the dev dependencies too, use ``pip install "mapreader[dev]"``.
-.. code-block:: bash
+Method 2: Install from source
+-----------------------------
- pip install "mapreader[text]"
+Installing from source is the best way to install MapReader if you want to use the text spotting functionality or access the worked examples.
-.. note:: To install the dev dependencies too use ``pip install "mapreader[dev]"`` or ``pip install "mapreader[text, dev]"``.
+We recommend using this method if:
-Method 2: Install from source
------------------------------
+- You want to keep up with the latest changes to MapReader.
+- You **want to use the text spotting functionality** in addition to the classification pipeline.
+- You want access to the worked examples.
+- You want access to the MapReader code (e.g. for development purposes).
-If you want to keep up with the latest changes to MapReader, or want/need easy access to the worked examples or MapReader code, we recommend installing from source.
-This method will create a ``MapReader`` directory on your machine which will contain all the MapReader code, docs and worked examples.
+This method will clone the ``MapReader`` repository onto your machine. This folder will contain all the MapReader code, docs and worked examples.
.. note:: You will need to have `git `__ installed to use this method. If you are using conda, this can be done by running ``conda install git``. Otherwise, you should install git by following the instructions on `their website `__.
@@ -40,16 +47,16 @@ Then, to install ``mapreader`` without the text spotting dependencies:
.. code-block:: bash
cd MapReader
- pip install -v -e .
+ pip install .
-Or, to install ``mapreader`` with the text spotting dependencies:
+.. note:: To install the dev dependencies too, use ``pip install ".[dev]"``.
+
+Finally, to install the text spotting dependencies, you should run:
.. code-block:: bash
cd MapReader
- pip install -v -e ".[text]"
-
-.. note:: To install the dev dependencies too use ``pip install -v -e ".[dev]"`` or ``pip install -v -e ".[text, dev]"``.
+ pip install -r text-requirements.txt
..
Method 3: Install via conda (**EXPERIMENTAL**)
diff --git a/setup.py b/setup.py
index 2314c1b2..2f6fadd6 100644
--- a/setup.py
+++ b/setup.py
@@ -70,12 +70,6 @@
"black>=23.7.0,<25.0.0",
"flake8>=6.0.0,<8.0.0",
],
- "text": [
- "detectron2 @ git+https://github.com/facebookresearch/detectron2.git",
- "DPText-DETR @ git+https://github.com/maps-as-data/DPText-DETR.git",
- "DeepSolo @ git+https://github.com/maps-as-data/DeepSolo.git",
- "MapTextPipeline @ git+https://github.com/maps-as-data/MapTextPipeline.git",
- ],
},
classifiers=[
"Development Status :: 3 - Alpha",
diff --git a/text-requirements.txt b/text-requirements.txt
new file mode 100644
index 00000000..0d7e3dd9
--- /dev/null
+++ b/text-requirements.txt
@@ -0,0 +1,4 @@
+detectron2 @ git+https://github.com/facebookresearch/detectron2.git
+DeepSolo @ git+https://github.com/maps-as-data/DeepSolo.git
+DPText-DETR @ git+https://github.com/maps-as-data/DPText-DETR.git
+MapTextPipeline @ git+https://github.com/maps-as-data/MapTextPipeline.git