Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rhnfzl committed Nov 13, 2024
2 parents 6fe4d09 + 8c6d6ae commit a32ed73
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
push:
branches:
- main
tags:
- 'v*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python package

on:
push:
branches: [ "main" ]
branches: [ "main", "develop" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "develop" ]

jobs:
build:
Expand Down
1 change: 0 additions & 1 deletion sct/sct.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def init_pipeline(self):
self.pipeline.append(self.fix_bad_unicode)
if config.CHECK_TO_ASCII_UNICODE:
self.pipeline.append(self.to_ascii_unicode)

if config.CHECK_REPLACE_HTML:
self.pipeline.append(self.replace_html)
if config.CHECK_REPLACE_URLS:
Expand Down
8 changes: 7 additions & 1 deletion tests/test_sct.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
from contextlib import contextmanager
from sct.sct import TextCleaner
from sct.utils import ner
import os

def requires_ner(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
if os.getenv('GITHUB_ACTIONS'):
self.skipTest("Skipping NER tests in GitHub Actions")
if not hasattr(self.ner, 'en_model'):
self.skipTest("NER models not properly loaded")
return func(self, *args, **kwargs)
Expand Down Expand Up @@ -55,6 +58,10 @@ class TextCleanerTest(unittest.TestCase):

@classmethod
def setUpClass(cls):
if os.getenv('GITHUB_ACTIONS'):
cls.ner = None
return

try:
with timeout(1200): # 20 minute timeout
config.CHECK_NER_PROCESS = False
Expand Down Expand Up @@ -158,7 +165,6 @@ def test_faker_url(self, fkw):
self.assertEqual(clean_url, fkw)

@requires_ner
@settings(deadline=None)
def test_ner_process_basic(self):
"""Test basic NER processing with known entities."""
text = "John Smith works at Microsoft in New York."
Expand Down

0 comments on commit a32ed73

Please sign in to comment.