From b9a3cde72d00e70302be406c5bd0fbff415150d3 Mon Sep 17 00:00:00 2001 From: Kyle Lahnakoski Date: Sun, 19 May 2024 18:31:16 -0400 Subject: [PATCH 1/2] update version number --- packaging/setup.py | 4 ++-- packaging/setuptools.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packaging/setup.py b/packaging/setup.py index c9392fe..e4fa12b 100644 --- a/packaging/setup.py +++ b/packaging/setup.py @@ -8,13 +8,13 @@ description='More Streams! Chained function calls', extras_require={"tests":["mo-files>=6.624.24125","mo-logs>=8.623.24125","zstandard>=0.22.0","boto3>=1.34.98","moto>=4.2.14","pandas>=2.0.3","mo-threads>=6.623.24125","mo-testing>=8.623.24125","mo-threads>=6.623.24125"]}, include_package_data=True, - install_requires=["mo-dots==10.623.24125","mo-files==6.624.24125","mo-future==7.584.24095","mo-json==6.624.24125"], + install_requires=["mo-dots==10.632.24139","mo-files==6.638.24140","mo-future==7.584.24095","mo-json==6.637.24140"], license='MPL 2.0', long_description='# More Streams!!\n\n[![PyPI Latest Release](https://img.shields.io/pypi/v/mo-streams.svg)](https://pypi.org/project/mo-streams/)\n [![Build Status](https://github.com/klahnakoski/mo-streams/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/klahnakoski/mo-streams/actions/workflows/build.yml)\n [![Coverage Status](https://coveralls.io/repos/github/klahnakoski/mo-streams/badge.svg?branch=dev)](https://coveralls.io/github/klahnakoski/mo-streams?branch=dev)\n[![Downloads](https://pepy.tech/badge/mo-streams/month)](https://pepy.tech/project/mo-streams)\n\n\nPython code is more elegant with method chaining!\n\n\n## Overview\n\nThere are two families of "streams" in this library, both are lazy:\n\n1. `ByteStream` - a traditional stream of bytes intended to pipe bytes through various byte transformers, like compression, encoding and encyrption. \n2. `ObjectStream`: An iterator/generator with a number of useful methods.\n\n### Example\n\nIn this case I am iterating through all files in a tar and parsing them:\n\n results = (\n File("tests/so_queries/so_queries.tar.zst")\n .content()\n .content()\n .exists()\n .utf8()\n .to_str()\n .map(parse)\n .to_list()\n )\n \n Each of the steps constructs a generator, and no work is done until the last step\n \n \n * `File().content()` - will unzst and untar the file content to an `ObjectStream` of file-like objects. It is short form for `stream(File().read_bytes()).from_zst().from_tar()`\n * The second `.content()` is applied to each of the file-like objects, returning `ByteStream` of the content for each\n * `.exists()` - some of the files (aka directories) in the tar file do not have content, we only include content that exists.\n * `.utf8` - convert to a `StringStream`\n * `.to_str` - convert to a Python `str`, we trust the content is not too large\n * `.map(parse)` - run the parser on each string\n * `.to_list()` - a "terminator", which executes the chain and returns a Python `list` with the results\n \n## Project Status\n\nAlive and in use, but \n\n* basic functions missing\n* inefficient - written using generators\n* generators not properly closed\n\n\n## Optional Reading\n\nThe method chaining style has two distinct benefits\n\n* functions are in the order they are applied \n* intermediate values need no temporary variables\n\nThe detriments are the same that we find in any declarative language: Incorrect code can be difficult to debug because you can not step through it to isolate the problem. For this reason, the majority of the code in this library is dedicated to validating the links in the function chain before they are run.\n\n### Lessons\n\nThe function chaining style, called "streams" in Java or "linq" in C#, leans heavly on the strict typed nature of those langauges. This is missing in Python, but type annotations help support this style of programming.\n\n', long_description_content_type='text/markdown', name='mo-streams', packages=["mo_streams"], url='https://github.com/klahnakoski/mo-streams', - version='1.625.24125', + version='1.638.24140', zip_safe=False ) \ No newline at end of file diff --git a/packaging/setuptools.json b/packaging/setuptools.json index 644f15f..6bd413d 100644 --- a/packaging/setuptools.json +++ b/packaging/setuptools.json @@ -20,8 +20,8 @@ ]}, "include_package_data": true, "install_requires": [ - "mo-dots==10.623.24125", "mo-files==6.624.24125", "mo-future==7.584.24095", - "mo-json==6.624.24125" + "mo-dots==10.632.24139", "mo-files==6.638.24140", "mo-future==7.584.24095", + "mo-json==6.637.24140" ], "license": "MPL 2.0", "long_description": { @@ -100,6 +100,6 @@ "name": "mo-streams", "packages": ["mo_streams"], "url": "https://github.com/klahnakoski/mo-streams", - "version": "1.625.24125", + "version": "1.638.24140", "zip_safe": false } \ No newline at end of file From bb2475bed1df355df01d0cb125be6db0fa957ea6 Mon Sep 17 00:00:00 2001 From: Kyle Lahnakoski Date: Sun, 19 May 2024 18:33:43 -0400 Subject: [PATCH 2/2] update lockfile --- tests/requirements.lock | 24 ++++++++++++------------ tests/requirements.txt | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/requirements.lock b/tests/requirements.lock index 59a090e..26379ae 100644 --- a/tests/requirements.lock +++ b/tests/requirements.lock @@ -1,7 +1,7 @@ -# Tests pass with python 3.8 on 2024-05-04 and with these versions +# Tests pass with python 3.8 on 2024-05-19 and with these versions # pip install --no-deps -r tests/requirements.lock -boto3==1.34.98 -botocore==1.34.98 +boto3==1.34.108 +botocore==1.34.108 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 @@ -12,17 +12,17 @@ Jinja2==3.1.3 jmespath==1.0.1 MarkupSafe==2.1.5 mo-collections==5.623.24125 -mo-dots==10.623.24125 -mo-files==6.624.24125 +mo-dots==10.632.24139 +mo-files==6.638.24140 mo-future==7.584.24095 mo-imports==7.584.24095 -mo-json==6.624.24125 -mo-kwargs==7.623.24125 -mo-logs==8.623.24125 -mo-math==7.623.24125 -mo-testing==8.623.24125 -mo-threads==6.623.24125 -mo-times==5.623.24125 +mo-json==6.637.24140 +mo-kwargs==7.632.24139 +mo-logs==8.632.24139 +mo-math==7.632.24139 +mo-testing==8.633.24139 +mo-threads==6.634.24139 +mo-times==5.632.24139 moto==4.2.14 numpy # 1.24.4 version locking causes: No module named 'distutils' pandas # 2.0.3 version locking causes: Could not build wheels for pandas diff --git a/tests/requirements.txt b/tests/requirements.txt index 407d5ce..8f29d72 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,9 +1,9 @@ -mo-files>=6.624.24125 -mo-logs>=8.623.24125 +mo-files>=6.638.24140 +mo-logs>=8.632.24139 zstandard>=0.22.0 -boto3>=1.34.98 +boto3>=1.34.108 moto>=4.2.14,<5 pandas>=2.0.3 -mo-threads>=6.623.24125 -mo-testing>=8.623.24125 -mo-threads>=6.623.24125 \ No newline at end of file +mo-threads>=6.634.24139 +mo-testing>=8.633.24139 +mo-threads>=6.634.24139 \ No newline at end of file