Skip to content

Commit

Permalink
py310 (#143)
Browse files Browse the repository at this point in the history
* 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 698f6b8.
  • Loading branch information
seanmacavaney authored Oct 19, 2022
1 parent e3d8e1c commit df6d7d5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
},
Expand Down
16 changes: 12 additions & 4 deletions test/formats/test_tsv.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit df6d7d5

Please sign in to comment.