diff --git a/.cruft.json b/.cruft.json index a14abc9a..67f6cef3 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/KennethEnevoldsen/swift-python-cookiecutter", - "commit": "e96eb05162a0e45a8ad5aa446c72229372e79cdb", + "commit": "e02068889310225ea4f65ea0b203c2949e1597a9", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9f2a0283..cc2ffc80 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ # GitHub action to run linting -name: run linting +name: run-linting on: pull_request: diff --git a/.github/workflows/stalebot.yml b/.github/workflows/stalebot.yml index 65d28d5c..9bd9ee89 100644 --- a/.github/workflows/stalebot.yml +++ b/.github/workflows/stalebot.yml @@ -20,4 +20,5 @@ jobs: close-pr-message: "This PR was closed automatically. Feel free to re-open it if you still want to work on it." close-pr-label: "closed-by-stalebot" operations-per-run: 20 - exempt-pr-labels: "dependencies,bot" + exempt-pr-labels: "no-stale" + exempt-issue-labels: "no-stale" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 86cfe8f0..f4624f5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,33 @@ +## v2.7.7 (2024-01-17) + +### Ci + +* ci: Updated makefile ([`f6dd006`](https://github.com/centre-for-humanities-computing/DaCy/commit/f6dd0068dfafb871e93fa956e1a6a686795fd3e8)) + +### Fix + +* fix: check for correct 'emotionally_laden' doc extension when creating emotion classifier ([`c2b6c93`](https://github.com/centre-for-humanities-computing/DaCy/commit/c2b6c930a3ef98893c73916dab2daaa9e095731e)) + +### Unknown + +* Merge pull request #286 from centre-for-humanities-computing/fix-emotionally-laden-extension-bug + +fix: check for correct 'emotionally_laden' doc extension when creating emotion classifier ([`7fe60a4`](https://github.com/centre-for-humanities-computing/DaCy/commit/7fe60a4a3612de61a5ee2c155d7678b241dfbd8b)) + +* Merge pull request #280 from centre-for-humanities-computing/cruft-update + +Update based on cruft template ([`017e13d`](https://github.com/centre-for-humanities-computing/DaCy/commit/017e13d3d50d02d8f7ce36d1cc1d1289b1501c78)) + +* Updated based on cruft template ([`24feedd`](https://github.com/centre-for-humanities-computing/DaCy/commit/24feedd247271ae0ad8e02d5760fedcc19cede32)) + +* Merge pull request #279 from centre-for-humanities-computing/sarakolding-patch-1 ([`af7d33b`](https://github.com/centre-for-humanities-computing/DaCy/commit/af7d33b986834dd71458de9fa7adf2261ab9079f)) + +* Update names.py ([`c74e75a`](https://github.com/centre-for-humanities-computing/DaCy/commit/c74e75ab223d4bf6dcbe398dd7f443ab62b5cbef)) + + ## v2.7.6 (2023-12-07) ### Fix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7237cfe6..8f75434a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ Here is a list of important resources for contributors: [Apache-2.0 license]: https://opensource.org/license/apache-2-0/ [source code]: https://github.com/centre-for-humanities-computing/dacy -[documentation]: https://dacy.readthedocs.io/ +[documentation]: https://centre-for-humanities-computing.github.io/dacy/index.html [issue tracker]: https://github.com/centre-for-humanities-computing/dacy/issues ## How to report a bug diff --git a/makefile b/makefile index f3eff8c7..4c3c83a3 100644 --- a/makefile +++ b/makefile @@ -37,5 +37,5 @@ view-docs: update-from-template: @echo "--- 🔄 Updating from template ---" @echo "This will update the project from the template, make sure to resolve any .rej files" - cruft update + cruft update --skip-apply-ask diff --git a/pyproject.toml b/pyproject.toml index 5ce1a248..f6aee940 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dacy" -version = "2.7.6" +version = "2.7.7" description = "A Danish pipeline trained in SpaCy that has achieved State-of-the-Art performance on all dependency parsing, NER and POS-tagging for Danish" authors = [ { name = "Kenneth Enevoldsen", email = "kennethcenevoldsen@gmail.com" }, diff --git a/src/dacy/sentiment/wrapped_models.py b/src/dacy/sentiment/wrapped_models.py index 5e8ada9e..d4043404 100644 --- a/src/dacy/sentiment/wrapped_models.py +++ b/src/dacy/sentiment/wrapped_models.py @@ -139,7 +139,7 @@ def make_emotion_transformer( doc_extension_prediction: str, labels: List[str], # type: ignore ) -> SequenceClassificationTransformer: - if not Doc.has_extension("dacy/emotionally_laden"): + if not Doc.has_extension("emotionally_laden"): warn( "The 'emotion' component assumes the 'emotionally_laden' extension is set." + " To set it you can run nlp.add_pipe('dacy/emotionally_laden')", @@ -162,7 +162,7 @@ def make_emotion_transformer( # overwrite extension such that it return no emotion if the document does not have # an emotion - if Doc.has_extension("dacy/emotionally_laden"): + if Doc.has_extension("emotionally_laden"): def label_getter(doc) -> Optional[str]: # noqa: ANN001 # type: ignore if doc._.emotionally_laden == "emotional": diff --git a/tests/test_sentiment.py b/tests/test_sentiment.py index 7b4dd1f5..0777c92c 100644 --- a/tests/test_sentiment.py +++ b/tests/test_sentiment.py @@ -36,8 +36,10 @@ def test_add_berttone_polarity(): def test_add_bertemotion_laden(): nlp = spacy.blank("da") nlp.add_pipe("dacy/emotionally_laden") + nlp.add_pipe("dacy/emotion") doc = nlp("Der er et træ i haven") assert doc._.emotionally_laden == "no emotion" + assert doc._.emotion == "no emotion" def test_add_bertemotion_emo():