pysegmenters-rules_segmenter 1.6.263__tar.gz → 1.6.267__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/.pre-commit-config.yaml +0 -2
- pysegmenters_rules_segmenter-1.6.267/LICENSE +17 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/PKG-INFO +6 -36
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/README.md +3 -6
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/pyproject.toml +4 -21
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/src/pysegmenters_rules_segmenter/__init__.py +1 -1
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/src/pysegmenters_rules_segmenter/rules_segmenter.py +17 -80
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/src/pysegmenters_rules_segmenter/rules_sentencizer.py +5 -0
- pysegmenters_rules_segmenter-1.6.263/.bumpversion.cfg +0 -23
- pysegmenters_rules_segmenter-1.6.263/.github/workflows/main.yml +0 -37
- pysegmenters_rules_segmenter-1.6.263/.readthedocs.yml +0 -15
- pysegmenters_rules_segmenter-1.6.263/LICENSE +0 -21
- pysegmenters_rules_segmenter-1.6.263/RELEASE.md +0 -39
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/.gitignore +0 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/.gitmodules +0 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/.python-version +0 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/AUTHORS.md +0 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/CHANGELOG.md +0 -0
- {pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/Taskfile.yml +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Copyright (c) 2021-2026 Kairntech. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and its documentation are the proprietary and confidential
|
|
4
|
+
property of Kairntech. They are protected by copyright law and international
|
|
5
|
+
treaties.
|
|
6
|
+
|
|
7
|
+
No part of this software may be used, copied, modified, merged, published,
|
|
8
|
+
distributed, sublicensed or sold, in source or binary form, without the prior
|
|
9
|
+
written permission of Kairntech, except as expressly permitted by a separate
|
|
10
|
+
license agreement signed with Kairntech.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
15
|
+
KAIRNTECH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
16
|
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
17
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,37 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pysegmenters-rules_segmenter
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.267
|
|
4
4
|
Summary: Rule-based segmenter
|
|
5
5
|
Project-URL: Homepage, https://github.com/oterrier/pysegmenters_rules_segmenter/
|
|
6
6
|
Author-email: Olivier Terrier <olivier.terrier@kairntech.com>
|
|
7
|
-
License:
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2021 Olivier Terrier
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions:
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in
|
|
19
|
-
all copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27
|
-
THE SOFTWARE.
|
|
7
|
+
License: Proprietary
|
|
28
8
|
License-File: AUTHORS.md
|
|
29
9
|
License-File: LICENSE
|
|
30
10
|
Classifier: Development Status :: 4 - Beta
|
|
31
11
|
Classifier: Intended Audience :: Developers
|
|
32
12
|
Classifier: Intended Audience :: Information Technology
|
|
33
13
|
Classifier: Intended Audience :: System Administrators
|
|
34
|
-
Classifier: License ::
|
|
14
|
+
Classifier: License :: Other/Proprietary License
|
|
35
15
|
Classifier: Operating System :: OS Independent
|
|
36
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
37
17
|
Classifier: Topic :: Software Development
|
|
@@ -42,14 +22,7 @@ Requires-Python: >=3.12
|
|
|
42
22
|
Requires-Dist: pymultirole-plugins<1.7.0,>=1.6.0
|
|
43
23
|
Requires-Dist: spacy[lookups]>=3.7.0
|
|
44
24
|
Provides-Extra: dev
|
|
45
|
-
Requires-Dist: bump2version; extra == 'dev'
|
|
46
25
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
47
|
-
Provides-Extra: docs
|
|
48
|
-
Requires-Dist: lxml-html-clean; extra == 'docs'
|
|
49
|
-
Requires-Dist: m2r2; extra == 'docs'
|
|
50
|
-
Requires-Dist: sphinx; extra == 'docs'
|
|
51
|
-
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
52
|
-
Requires-Dist: sphinxcontrib-apidoc; extra == 'docs'
|
|
53
26
|
Provides-Extra: sbom
|
|
54
27
|
Requires-Dist: cyclonedx-bom; extra == 'sbom'
|
|
55
28
|
Requires-Dist: pip-audit; extra == 'sbom'
|
|
@@ -62,12 +35,9 @@ Description-Content-Type: text/markdown
|
|
|
62
35
|
|
|
63
36
|
# pysegmenters_rules_segmenter
|
|
64
37
|
|
|
65
|
-
[](https://pysegmenters_rules_segmenter.readthedocs.io)
|
|
69
|
-
[](https://pypi.org/project/pysegmenters_rules_segmenter/)
|
|
70
|
-
[](https://pypi.org/project/pysegmenters_rules_segmenter/)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
[](https://pypi.org/project/pysegmenters-rules_segmenter/)
|
|
40
|
+
[](https://pypi.org/project/pysegmenters-rules_segmenter/)
|
|
71
41
|
|
|
72
42
|
Rule based segmenter based on Spacy
|
|
73
43
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# pysegmenters_rules_segmenter
|
|
2
2
|
|
|
3
|
-
[](https://pysegmenters_rules_segmenter.readthedocs.io)
|
|
7
|
-
[](https://pypi.org/project/pysegmenters_rules_segmenter/)
|
|
8
|
-
[](https://pypi.org/project/pysegmenters_rules_segmenter/)
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://pypi.org/project/pysegmenters-rules_segmenter/)
|
|
5
|
+
[](https://pypi.org/project/pysegmenters-rules_segmenter/)
|
|
9
6
|
|
|
10
7
|
Rule based segmenter based on Spacy
|
|
11
8
|
|
{pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/pyproject.toml
RENAMED
|
@@ -7,7 +7,7 @@ name = "pysegmenters-rules_segmenter"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "Rule-based segmenter"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license = {
|
|
10
|
+
license = {text = "Proprietary"}
|
|
11
11
|
authors = [
|
|
12
12
|
{name = "Olivier Terrier", email = "olivier.terrier@kairntech.com"},
|
|
13
13
|
]
|
|
@@ -21,7 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
22
22
|
"Topic :: Software Development :: Libraries",
|
|
23
23
|
"Topic :: Software Development",
|
|
24
|
-
"License ::
|
|
24
|
+
"License :: Other/Proprietary License",
|
|
25
25
|
"Development Status :: 4 - Beta",
|
|
26
26
|
"Programming Language :: Python :: 3.12",
|
|
27
27
|
]
|
|
@@ -44,17 +44,7 @@ test = [
|
|
|
44
44
|
"ruff",
|
|
45
45
|
"pip",
|
|
46
46
|
]
|
|
47
|
-
|
|
48
|
-
"sphinx",
|
|
49
|
-
"sphinx-rtd-theme",
|
|
50
|
-
"m2r2",
|
|
51
|
-
"sphinxcontrib.apidoc",
|
|
52
|
-
"lxml_html_clean",
|
|
53
|
-
]
|
|
54
|
-
dev = [
|
|
55
|
-
"pre-commit",
|
|
56
|
-
"bump2version",
|
|
57
|
-
]
|
|
47
|
+
dev = ["pre-commit"]
|
|
58
48
|
|
|
59
49
|
sbom = ["cyclonedx-bom", "pip-audit"]
|
|
60
50
|
|
|
@@ -70,14 +60,7 @@ exclude = [
|
|
|
70
60
|
"/tests",
|
|
71
61
|
"/docs",
|
|
72
62
|
"Jenkinsfile",
|
|
73
|
-
"
|
|
74
|
-
"bumpversion.py",
|
|
75
|
-
"mypy.ini",
|
|
76
|
-
"hgnc_cache.sqlite",
|
|
77
|
-
"trivy-html-template.tpl",
|
|
78
|
-
"MIGRATION.md",
|
|
79
|
-
".gitignore",
|
|
80
|
-
".dockerignore"
|
|
63
|
+
".gitignore"
|
|
81
64
|
]
|
|
82
65
|
|
|
83
66
|
[tool.pytest.ini_options]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
|
-
import time
|
|
4
3
|
from abc import ABC
|
|
5
4
|
from functools import cache
|
|
6
5
|
from typing import Any, cast
|
|
@@ -10,8 +9,7 @@ from pydantic import BaseModel, Field
|
|
|
10
9
|
from pymultirole_plugins.util import comma_separated_to_list
|
|
11
10
|
from pymultirole_plugins.v1.schema import Document, Sentence
|
|
12
11
|
from pymultirole_plugins.v1.segmenter import SegmenterBase, SegmenterParameters
|
|
13
|
-
from spacy.cli.download import
|
|
14
|
-
from spacy.language import Language
|
|
12
|
+
from spacy.cli.download import download, get_compatibility
|
|
15
13
|
from wasabi import msg
|
|
16
14
|
|
|
17
15
|
from pysegmenters_rules_segmenter.rules_sentencizer import RuleSentencizer
|
|
@@ -116,13 +114,13 @@ class RulesSegmenter(SegmenterBase, ABC):
|
|
|
116
114
|
exc_info=True,
|
|
117
115
|
)
|
|
118
116
|
return documents
|
|
117
|
+
json_split = json_rules_to_string(split_rules)
|
|
118
|
+
json_join = json_rules_to_string(join_rules)
|
|
119
119
|
for document in documents:
|
|
120
120
|
# Retrieve nlp pipe
|
|
121
|
-
lang =
|
|
121
|
+
lang = (document.metadata or {}).get("language")
|
|
122
122
|
if lang is None or lang not in supported_languages:
|
|
123
123
|
raise AttributeError(f"Metadata language {lang} is required and must be in {SUPPORTED_LANGUAGES}")
|
|
124
|
-
json_split = json_rules_to_string(split_rules)
|
|
125
|
-
json_join = json_rules_to_string(join_rules)
|
|
126
124
|
nlp, enable_pipes = get_custom_sentencizer(lang, json_split, json_join)
|
|
127
125
|
with nlp.select_pipes(enable=enable_pipes):
|
|
128
126
|
document.sentences = []
|
|
@@ -140,12 +138,6 @@ class RulesSegmenter(SegmenterBase, ABC):
|
|
|
140
138
|
return RulesSegmenterParameters
|
|
141
139
|
|
|
142
140
|
|
|
143
|
-
def document_language(doc: Document, default: str = None):
|
|
144
|
-
if doc.metadata is not None and "language" in doc.metadata:
|
|
145
|
-
return doc.metadata["language"]
|
|
146
|
-
return default
|
|
147
|
-
|
|
148
|
-
|
|
149
141
|
def json_rules_to_string(json_rules: list[list[dict[str, Any]]]):
|
|
150
142
|
str_rules = None
|
|
151
143
|
if json_rules:
|
|
@@ -158,7 +150,7 @@ def json_rules_to_string(json_rules: list[list[dict[str, Any]]]):
|
|
|
158
150
|
return str_rules
|
|
159
151
|
|
|
160
152
|
|
|
161
|
-
#
|
|
153
|
+
# spaCy model of each language; a language without one gets a blank model
|
|
162
154
|
MODEL_SHORTCUTS = {
|
|
163
155
|
"en": "en_core_web_sm",
|
|
164
156
|
"de": "de_core_news_sm",
|
|
@@ -167,31 +159,29 @@ MODEL_SHORTCUTS = {
|
|
|
167
159
|
"fr": "fr_core_news_sm",
|
|
168
160
|
"it": "it_core_news_sm",
|
|
169
161
|
"nl": "nl_core_news_sm",
|
|
170
|
-
"el": "el_core_news_sm",
|
|
171
|
-
"nb": "nb_core_news_sm",
|
|
172
|
-
"lt": "lt_core_news_sm",
|
|
173
|
-
"xx": "xx_ent_wiki_sm",
|
|
174
162
|
"zh": "zh_core_web_sm",
|
|
175
163
|
"ru": "ru_core_news_sm",
|
|
176
|
-
"ja": "ja_core_news_sm",
|
|
177
164
|
}
|
|
178
165
|
|
|
179
166
|
|
|
180
167
|
@cache
|
|
181
|
-
def get_nlp(lang: str, exclude=()
|
|
182
|
-
del ttl_hash
|
|
168
|
+
def get_nlp(lang: str, exclude=()):
|
|
183
169
|
model = MODEL_SHORTCUTS.get(lang, lang)
|
|
184
|
-
# model = lang
|
|
185
170
|
try:
|
|
186
|
-
|
|
187
|
-
except
|
|
188
|
-
|
|
189
|
-
|
|
171
|
+
return spacy.load(model, exclude=exclude)
|
|
172
|
+
except OSError:
|
|
173
|
+
if model not in get_compatibility():
|
|
174
|
+
msg.fail(
|
|
175
|
+
f"No compatible package found for '{model}' (spaCy v{spacy.about.__version__}), fallback to blank model"
|
|
176
|
+
)
|
|
177
|
+
return spacy.blank(model)
|
|
178
|
+
download(model)
|
|
179
|
+
return spacy.load(model, exclude=exclude)
|
|
190
180
|
|
|
191
181
|
|
|
192
182
|
@cache
|
|
193
|
-
def get_custom_sentencizer(lang: str, json_split: str, json_join: str
|
|
194
|
-
nlp = get_nlp(lang, exclude=("parser", "tagger", "ner", "lemmatizer")
|
|
183
|
+
def get_custom_sentencizer(lang: str, json_split: str, json_join: str):
|
|
184
|
+
nlp = get_nlp(lang, exclude=("parser", "tagger", "ner", "lemmatizer"))
|
|
195
185
|
split_rules = json.loads(json_split) if json_split else None
|
|
196
186
|
join_rules = json.loads(json_join) if json_join else None
|
|
197
187
|
unique_name = f"sentencizer_{json_split if json_split else ''}_{json_join if json_join else ''}"
|
|
@@ -200,56 +190,3 @@ def get_custom_sentencizer(lang: str, json_split: str, json_join: str, ttl_hash=
|
|
|
200
190
|
)
|
|
201
191
|
enable_pipes = [p for p in nlp.pipe_names if not p.startswith("sentencizer_") or p == sentencizer.name]
|
|
202
192
|
return nlp, enable_pipes
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
@cache
|
|
206
|
-
def get_spacy_sentencizer(lang: str, ttl_hash=None):
|
|
207
|
-
nlp = get_nlp(lang, exclude=(), ttl_hash=ttl_hash)
|
|
208
|
-
enable_pipes = list(nlp.pipe_names)
|
|
209
|
-
return nlp, enable_pipes
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
def get_ttl_hash(seconds=3600):
|
|
213
|
-
"""Return the same value withing `seconds` time period"""
|
|
214
|
-
return round(time.time() / seconds)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
def load_spacy_model(model, exclude, *pip_args):
|
|
218
|
-
suffix = "-py3-none-any.whl"
|
|
219
|
-
dl_tpl = "{m}-{v}/{m}-{v}{s}"
|
|
220
|
-
model_name = model
|
|
221
|
-
if model in MODEL_SHORTCUTS:
|
|
222
|
-
msg.warn(
|
|
223
|
-
f"As of spaCy v3.0, shortcuts like '{model}' are deprecated. Please "
|
|
224
|
-
f"use the full pipeline package name '{MODEL_SHORTCUTS[model]}' instead."
|
|
225
|
-
)
|
|
226
|
-
model_name = MODEL_SHORTCUTS[model]
|
|
227
|
-
compatibility = get_compatibility()
|
|
228
|
-
if model_name not in compatibility:
|
|
229
|
-
msg.fail(
|
|
230
|
-
f"No compatible package found for '{model}' (spaCy v{spacy.about.__version__}), fallback to blank model"
|
|
231
|
-
)
|
|
232
|
-
return spacy.blank(model_name)
|
|
233
|
-
else:
|
|
234
|
-
version = get_version(model_name, compatibility)
|
|
235
|
-
download_model(dl_tpl.format(m=model_name, v=version, s=suffix), pip_args)
|
|
236
|
-
msg.good(
|
|
237
|
-
"Download and installation successful",
|
|
238
|
-
f"You can now load the package via spacy.load('{model_name}')",
|
|
239
|
-
)
|
|
240
|
-
# If a model is downloaded and then loaded within the same process, our
|
|
241
|
-
# is_package check currently fails, because pkg_resources.working_set
|
|
242
|
-
# is not refreshed automatically (see #3923). We're trying to work
|
|
243
|
-
# around this here be requiring the package explicitly.
|
|
244
|
-
require_package(model_name)
|
|
245
|
-
return spacy.load(model_name, exclude=exclude)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
def require_package(name):
|
|
249
|
-
try:
|
|
250
|
-
import pkg_resources
|
|
251
|
-
|
|
252
|
-
pkg_resources.working_set.require(name)
|
|
253
|
-
return True
|
|
254
|
-
except: # noqa: E722
|
|
255
|
-
return False
|
|
@@ -68,6 +68,11 @@ class RuleSentencizer:
|
|
|
68
68
|
for token in doc[start:end]:
|
|
69
69
|
if token.is_sent_start:
|
|
70
70
|
token.is_sent_start = False
|
|
71
|
+
# Tokens no rule split on do not start a sentence: without this, a text where no rule
|
|
72
|
+
# matched has no SENT_START annotation, hence no sentence at all (SHERPA-3083)
|
|
73
|
+
for token in doc[1:]:
|
|
74
|
+
if token.is_sent_start is None:
|
|
75
|
+
token.is_sent_start = False
|
|
71
76
|
if doc.has_annotation("SENT_START"):
|
|
72
77
|
# Trim starting spaces
|
|
73
78
|
for sent in doc.sents:
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
[bumpversion]
|
|
2
|
-
current_version = 0.1.0.dev0
|
|
3
|
-
commit = True
|
|
4
|
-
tag = True
|
|
5
|
-
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
|
|
6
|
-
serialize =
|
|
7
|
-
{major}.{minor}.{patch}.{release}{build}
|
|
8
|
-
{major}.{minor}.{patch}
|
|
9
|
-
|
|
10
|
-
[bumpversion:part:release]
|
|
11
|
-
optional_value = prod
|
|
12
|
-
first_value = dev
|
|
13
|
-
values =
|
|
14
|
-
dev
|
|
15
|
-
prod
|
|
16
|
-
|
|
17
|
-
[bumpversion:part:build]
|
|
18
|
-
|
|
19
|
-
[bumpversion:file:pysegmenters_rules_segmenter/__init__.py]
|
|
20
|
-
|
|
21
|
-
[bumpversion:file:CHANGELOG.md]
|
|
22
|
-
search = ## [unreleased]
|
|
23
|
-
replace = ## [{new_version}]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: tests
|
|
2
|
-
|
|
3
|
-
on: [push]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
runs-on: ${{ matrix.os }}
|
|
8
|
-
strategy:
|
|
9
|
-
max-parallel: 4
|
|
10
|
-
matrix:
|
|
11
|
-
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
12
|
-
python-version: [3.8]
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v1
|
|
15
|
-
- shell: bash
|
|
16
|
-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
17
|
-
id: extract_branch
|
|
18
|
-
- shell: bash
|
|
19
|
-
run: echo "##[set-output name=py_version;]$(py_ver=${{ matrix.python-version }} && echo ${py_ver//./})"
|
|
20
|
-
id: extract_py_version
|
|
21
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
-
uses: actions/setup-python@v1
|
|
23
|
-
with:
|
|
24
|
-
python-version: ${{ matrix.python-version }}
|
|
25
|
-
- name: Install dependencies
|
|
26
|
-
run: |
|
|
27
|
-
python -m pip install --upgrade pip
|
|
28
|
-
pip install tox tox-gh-actions
|
|
29
|
-
- name: Test
|
|
30
|
-
run: tox
|
|
31
|
-
- name: Upload coverage
|
|
32
|
-
if: matrix.os == 'ubuntu-latest'
|
|
33
|
-
uses: codecov/codecov-action@v1.0.3
|
|
34
|
-
with:
|
|
35
|
-
token: ${{secrets.CODECOV_TOKEN}}
|
|
36
|
-
file: ./.coverage.xml
|
|
37
|
-
flags: ${{ steps.extract_branch.outputs.branch }},py${{ steps.extract_py_version.outputs.py_version }}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Olivier Terrier
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Release Instructions
|
|
2
|
-
|
|
3
|
-
This document guides a contributor through creating a release of pysegmenters_rules_segmenter.
|
|
4
|
-
|
|
5
|
-
## Preflight checks
|
|
6
|
-
|
|
7
|
-
### Ensure all tests pass
|
|
8
|
-
|
|
9
|
-
Locally you can run `tox` to check that all tests pass, and check that tests
|
|
10
|
-
against all supported environments are passing also by checking qsim's
|
|
11
|
-
[GitHub actions](https://github.com/oterrier/pysegmenters_rules_segmenter/actions?query=branch%3Amaster+workflow%3Atests).
|
|
12
|
-
|
|
13
|
-
#### Verify that `AUTHORS.md` is up-to-date
|
|
14
|
-
|
|
15
|
-
The following command shows the number of commits per author since the last
|
|
16
|
-
annotated tag:
|
|
17
|
-
```
|
|
18
|
-
t=$(git describe --abbrev=0); echo Commits since $t; git shortlog -s $t..
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Make the release
|
|
22
|
-
|
|
23
|
-
Run
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
bumpversion release # bump version from .devX to release version
|
|
27
|
-
git push --tags # push tagged release to upstream
|
|
28
|
-
flit publish # publish to PyPI
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Start work on the next release
|
|
32
|
-
|
|
33
|
-
Run
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
bumpversion minor
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
To start work on the next release
|
|
File without changes
|
|
File without changes
|
{pysegmenters_rules_segmenter-1.6.263 → pysegmenters_rules_segmenter-1.6.267}/.python-version
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|