From df6d7d5dd5782b46490c131e0eb5776e16229a44 Mon Sep 17 00:00:00 2001 From: Sean MacAvaney Date: Wed, 19 Oct 2022 14:39:30 -0400 Subject: [PATCH] py310 (#143) * py3.10 automated build * lz4 version that supports py3.10 * py3.10 fix (test only) * min python version & updated readme to reflect * update zlib-state version for windows support on py3.10 * Revert "update zlib-state version for windows support on py3.10" This reverts commit 698f6b84a9819a5cce8382b0d8109d6ed787f4f5. --- .github/workflows/push.yml | 2 +- README.md | 2 +- requirements.txt | 2 +- setup.py | 2 +- test/formats/test_tsv.py | 16 ++++++++++++---- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6833ae76..06481df6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, '3.10'] os: ['ubuntu-latest', 'windows-latest', 'macOs-latest'] architecture: ['x64'] diff --git a/README.md b/README.md index f2680894..7d2a7e68 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ $ python setup.py bdist_wheel $ pip install dist/ir_datasets-*.whl ``` -Tested with python versions 3.6 and 3.7 +Tested with python versions 3.7, 3.8, 3.9, and 3.10. (Mininum python version is 3.7.) ## Features diff --git a/requirements.txt b/requirements.txt index 1d3c23a7..35fa7975 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ pyyaml>=5.3.1 requests>=2.22.0 tqdm>=4.38.0 trec-car-tools>=2.5.4 -lz4>=3.1.1 +lz4>=3.1.10 warc3-wet>=0.2.3 warc3-wet-clueweb09>=0.2.5 zlib-state>=0.1.3 diff --git a/setup.py b/setup.py index 6e678475..6fb16fba 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ packages=setuptools.find_packages(include=['ir_datasets', 'ir_datasets.*']), install_requires=list(open('requirements.txt')), classifiers=[], - python_requires='>=3.6', + python_requires='>=3.7', entry_points={ 'console_scripts': ['ir_datasets=ir_datasets:main_cli'], }, diff --git a/test/formats/test_tsv.py b/test/formats/test_tsv.py index 387e23e2..3c65eefe 100644 --- a/test/formats/test_tsv.py +++ b/test/formats/test_tsv.py @@ -1,7 +1,6 @@ import os from typing import NamedTuple, Tuple import shutil -from collections import namedtuple import unittest from ir_datasets.formats import TsvDocs, TsvQueries, TsvDocPairs from ir_datasets.util import StringFile @@ -10,7 +9,10 @@ class TestTsv(unittest.TestCase): def test_core(self): - data_type = namedtuple('data_type', ['doc_id', 'field1', 'field2']) + class data_type(NamedTuple): + doc_id: str + field1: str + field2: str mock_file = StringFile(''' 123\tsome field\tanother field 123\t repeated entry \tshouldn't filter @@ -37,7 +39,10 @@ def test_core(self): def test_too_many_columns(self): - data_type = namedtuple('data_type', ['doc_id', 'field1', 'field2']) + class data_type(NamedTuple): + doc_id: str + field1: str + field2: str mock_file = StringFile(''' 123\tsome field\tanother field 123\trepeated entry\tshouldn't filter\ttoo many columns @@ -59,7 +64,10 @@ def test_too_many_columns(self): def test_too_few_columns(self): - data_type = namedtuple('data_type', ['doc_id', 'field1', 'field2']) + class data_type(NamedTuple): + doc_id: str + field1: str + field2: str mock_file = StringFile(''' 123\tsome field\tanother field 123\ttoo few fields