Skip to content

Commit 6852be5

Browse files
committed
fix CI
1 parent 585b9d2 commit 6852be5

File tree

12 files changed

+38
-26
lines changed

12 files changed

+38
-26
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
Documentation:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1717
steps:
1818
- uses: actions/checkout@v2
1919

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
27-
os: [ubuntu-latest, windows-latest, macos-latest]
27+
os: [ubuntu-22.04, windows-latest, macos-latest]
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -42,7 +42,7 @@ jobs:
4242

4343
build_sdist:
4444
name: Build source distribution
45-
runs-on: ubuntu-latest
45+
runs-on: ubuntu-22.04
4646
steps:
4747
- uses: actions/checkout@v2
4848

@@ -58,7 +58,7 @@ jobs:
5858
name: Upload to PyPI
5959

6060
needs: [build_wheels, build_sdist]
61-
runs-on: ubuntu-latest
61+
runs-on: ubuntu-22.04
6262

6363
steps:
6464
- uses: actions/download-artifact@v4
@@ -76,7 +76,7 @@ jobs:
7676
# repository_url: https://test.pypi.org/legacy/
7777

7878
Documentation:
79-
runs-on: ubuntu-latest
79+
runs-on: ubuntu-22.04
8080
steps:
8181
- uses: actions/checkout@v3
8282

.github/workflows/test-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
os: [ubuntu-latest, windows-latest, macos-latest]
20+
os: [ubuntu-22.04, windows-latest, macos-latest]
2121

2222
steps:
2323
- uses: actions/checkout@v2
@@ -30,7 +30,7 @@ jobs:
3030

3131
build_sdist:
3232
name: Build source distribution
33-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-22.04
3434
steps:
3535
- uses: actions/checkout@v2
3636

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
linting:
1616
name: Linting
1717
if: github.event_name == 'pull_request'
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- uses: actions/checkout@v3
2121
with:
@@ -32,7 +32,7 @@ jobs:
3232

3333
pytest:
3434
name: Pytest
35-
runs-on: ubuntu-latest
35+
runs-on: ubuntu-22.04
3636
strategy:
3737
fail-fast: true
3838
matrix:
@@ -120,7 +120,7 @@ jobs:
120120

121121
documentation:
122122
name: Documentation
123-
runs-on: ubuntu-latest
123+
runs-on: ubuntu-22.04
124124
steps:
125125
- uses: actions/checkout@v2
126126

@@ -150,7 +150,7 @@ jobs:
150150

151151
simple-installation:
152152
name: Simple installation
153-
runs-on: ubuntu-latest
153+
runs-on: ubuntu-22.04
154154
strategy:
155155
fail-fast: true
156156
matrix:

edsnlp/pipes/ner/behaviors/alcohol/alcohol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def process(self, doc: Doc) -> List[Span]:
118118
stopped = self.negation.process(span)
119119
if not any(stopped_token.negation for stopped_token in stopped.tokens):
120120
span._.status = 2
121-
122-
if "zero_after" in span._.assigned.keys():
123-
span._.negation = True
121+
else:
122+
if "zero_after" in span._.assigned.keys():
123+
span._.negation = True
124124

125125
yield span

edsnlp/pipes/qualifiers/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ def get_matches(self, doc: Doc) -> List[Span]:
175175
def ensure_doc(self, doc: Union[Doc, Span]) -> Doc:
176176
return doc if not hasattr(doc, "as_doc") else doc.as_doc()
177177

178-
def process(self, doc: Doc) -> BaseQualifierResults:
179-
doc = self.ensure_doc(doc) # pragma: no cover
178+
def process(self, doc_like: Union[Doc, Span]) -> BaseQualifierResults:
179+
doc_like = self.ensure_doc(doc_like) # pragma: no cover
180180
raise NotImplementedError
181181

182182
def __call__(self, doc: Doc) -> Doc:

edsnlp/pipes/qualifiers/family/family.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ def set_extensions(self) -> None:
187187
if not Doc.has_extension("family"):
188188
Doc.set_extension("family", default=[])
189189

190-
def process(self, doc: Doc) -> FamilyResults:
191-
doc = self.ensure_doc(doc)
190+
def process(self, doc_like: Union[Doc, Span]) -> FamilyResults:
191+
doc = self.ensure_doc(doc_like)
192192
matches = self.get_matches(doc)
193193

194194
terminations = [m for m in matches if m.label_ == "termination"]

edsnlp/pipes/qualifiers/history/history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ def set_extensions(self) -> None:
326326
getter=deprecated_getter_factory("antecedent_cues", "history_cues"),
327327
)
328328

329-
def process(self, doc: Doc) -> HistoryResults:
330-
doc = self.ensure_doc(doc)
329+
def process(self, doc_like: Union[Doc, Span]) -> HistoryResults:
330+
doc = self.ensure_doc(doc_like)
331331
note_datetime = None
332332
if doc._.note_datetime is not None:
333333
try:

edsnlp/pipes/qualifiers/hypothesis/hypothesis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ def load_verbs(
262262
list_hypo_verbs_following,
263263
)
264264

265-
def process(self, doc: Doc) -> HypothesisResults:
266-
doc = self.ensure_doc(doc)
265+
def process(self, doc_like: Union[Doc, Span]) -> HypothesisResults:
266+
doc = self.ensure_doc(doc_like)
267267
matches = self.get_matches(doc)
268268

269269
terminations = [m for m in matches if m.label_ == "termination"]

edsnlp/pipes/qualifiers/negation/negation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ def __call__(self, doc: Doc) -> Doc:
295295
token._.negation = True
296296
return doc
297297

298-
def process(self, doc: Doc) -> NegationResults:
299-
doc = self.ensure_doc(doc)
298+
def process(self, doc_like: Union[Doc, Span]) -> NegationResults:
299+
doc = self.ensure_doc(doc_like)
300300
matches = self.get_matches(doc)
301301

302302
terminations = [m for m in matches if m.label_ == "termination"]

0 commit comments

Comments
 (0)