From 04bf4261629daa1984086c4264f68549b37e521e Mon Sep 17 00:00:00 2001 From: Faisal Adnan <68223517+faisaladnanpeltops@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:03:52 +0200 Subject: [PATCH 1/4] update how version text is retrieved --- nlu/__init__.py | 10 ---------- setup.py | 8 +++++--- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/nlu/__init__.py b/nlu/__init__.py index f261a5f9..21c13da7 100644 --- a/nlu/__init__.py +++ b/nlu/__init__.py @@ -20,16 +20,6 @@ import pandas as pd pd.DataFrame.iteritems = pd.DataFrame.items -def version(): - version_path = os.path.abspath(os.path.dirname(__file__)) - with open(os.path.join(version_path, '../VERSION'), encoding="utf-8") as version_file: - return version_file.read().strip() - -__version__ = version() - -def version(): return __version__ - - warnings.filterwarnings("ignore") logger = logging.getLogger('nlu') logger.setLevel(logging.CRITICAL) diff --git a/setup.py b/setup.py index e428c650..90ac7c09 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -import nlu - from codecs import open from os import path @@ -10,6 +8,10 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() +# Get a version from file +with open(path.join(here, 'VERSION')) as version_file: + version = f"{version_file.read().strip()}" + REQUIRED_PKGS = [ 'spark-nlp>=5.0.2', 'numpy', @@ -22,7 +24,7 @@ name='nlu', - version=nlu.version(), + version=version, description='John Snow Labs NLU provides state of the art algorithms for NLP&NLU with 20000+ of pretrained models in 200+ languages. It enables swift and simple development and research with its powerful Pythonic and Keras inspired API. It is powerd by John Snow Labs powerful Spark NLP library.', From 82fe5ca8ed6794e30c121a235b370b3b3fc47482 Mon Sep 17 00:00:00 2001 From: Faisal Adnan <68223517+faisaladnanpeltops@users.noreply.github.com> Date: Sat, 20 Jul 2024 20:00:30 +0200 Subject: [PATCH 2/4] test tag 1.1.12 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 50976656..d7f1518a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.5rc19 \ No newline at end of file +1.1.12 \ No newline at end of file From 03a574a76245295f56d58a10828217b5451cda52 Mon Sep 17 00:00:00 2001 From: Faisal Adnan <68223517+faisaladnanpeltops@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:25:47 +0200 Subject: [PATCH 3/4] include VERSION file in the package --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..b1fc69e0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include VERSION \ No newline at end of file From 67b036411d4b3953173d4f2d2f09c8c88565fd8a Mon Sep 17 00:00:00 2001 From: Faisal Adnan <68223517+faisaladnanpeltops@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:56:54 +0200 Subject: [PATCH 4/4] add meta.yaml --- conda/meta.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 conda/meta.yaml diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 00000000..a6f5d6e1 --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,34 @@ +package: + name: nlu + version: {{ environ.get('CODE_VERSION', '') }} + +app: + entry: nlu + summary: The power of 15000+ State-of-the-art pre-trained NLP models in 300 languages with 1 line of Python code. + +source: + path: ../conda_src + +build: + noarch: generic + number: 0 + script: "python3 -m pip install . --no-deps -vv" + +requirements: + build: + - python + run: + - python + - pyspark==3.0.1 + - spark-nlp >=5.2.0 + - numpy + - pyarrow >=0.16.0 + - pandas >=1.3.5 + - dataclasses +about: + home: https://nlu.johnsnowlabs.com/ + license: Apache License 2.0 + license_family: APACHE + license_url: https://github.com/JohnSnowLabs/nlu/blob/master/LICENSE + description: John Snow Labs' NLU is a Python library for applying state-of-the-art text mining, directly on any dataframe, with a single line of code. As a facade of the award-winning Spark NLP library, it comes with hundreds of pretrained models in tens of languages - all production-grade, scalable, and trainable. + summary: The The power of 15000+ State-of-the-art pre-trained NLP models in 300 languages with 1 line of Python code. \ No newline at end of file