From fcc9cbd0f7aaede7af23871d1d8359211109e53b Mon Sep 17 00:00:00 2001 From: rafelafrance Date: Wed, 10 Apr 2024 10:29:50 -0400 Subject: [PATCH] Eat your own dog food. Use make for CI & update readme --- .github/workflows/python-app.yml | 9 ++------- Makefile | 2 +- README.md | 8 ++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index bab6442..79a0e8a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -19,12 +19,7 @@ jobs: python-version: '3.11' - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install . - pip install git+https://github.com/rafelafrance/common_utils.git@main#egg=common_utils - pip install git+https://github.com/rafelafrance/spell-well.git@main#egg=spell-well - pip install git+https://github.com/rafelafrance/traiter.git@master#egg=traiter - python -m spacy download en_core_web_md + make install - name: Test with unittest run: | - export MOCK_DATA=1; python -m unittest discover + make test diff --git a/Makefile b/Makefile index c14061f..064d9d5 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PIP_INSTALL=$(PYTHON) -m pip install SPACY_MODEL=$(PYTHON) -m spacy download en_core_web_md test: - $(PYTHON) -m unittest discover + export MOCK_DATA=1; $(PYTHON) -m unittest discover install: venv source $(VENV)/bin/activate diff --git a/README.md b/README.md index 63c9c95..992f649 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ And I also split some functionality out to enable me to use it in other projects - `LabelTraiter`: Parsing treatments (this repo) and herbarium labels are now separate repositories. - https://github.com/rafelafrance/LabelTraiter +I should also mention that this repository builds upon other repositories: +- `common_utils`: This is just a grab bag of simple utilities I used in several other project. I got tired of having to change every repository that used them each time there was an edit, so I just put them here. + - `https://github.com/rafelafrance/common_utils` +- `spell-well`: Is a super simple "delete-only" spell checker I wrote. There may be better options now, but it survives until I can find one that handles our particular needs. + - `https://github.com/rafelafrance/spell-well` +- `traiter`: This is the base code for all the rule-based parsers (aka traiters) that I write. The details change but the underlying process is the same for all. + - `https://github.com/rafelafrance/traiter` + ## All right, what's this all about then? **Challenge**: Extract trait information from plant treatments. That is, if I'm given treatment text like: (Reformatted to emphasize targeted traits.)