Skip to content

Commit

Permalink
Merge pull request #281 from allenai/modernization
Browse files Browse the repository at this point in the history
project modernization
  • Loading branch information
seanmacavaney authored Mar 9, 2025
2 parents ddf862b + e8f946a commit fe956e0
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 147 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: install-deps
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: build
run: |
python -m build
- name: upload
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
55 changes: 0 additions & 55 deletions .github/workflows/push.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/release.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: test

on:
push: {branches: [master]} # pushes to master
pull_request: {} # all PRs

jobs:
pytest:
strategy:
matrix:
python-version: ['3.8', '3.11']
os: ['ubuntu-latest', 'windows-latest', 'macOs-13']

runs-on: ${{ matrix.os }}
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
pip install --upgrade -r requirements.txt -r requirements-test.txt
pip install -e .
- name: Unit Test
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOs-latest'
run: |
pip install pytest
pytest test/util.py test/metadata.py test/integration/dummy.py test/integration/vaswani.py test/formats/ test/test_defaulttext.py
- name: Unit Test (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
pip install pytest
pytest test\util.py test\metadata.py test\integration\dummy.py test\integration\vaswani.py test\formats\ test\test_defaulttext.py
env:
PATH: 'C:/Program Files/zlib/bin/'
11 changes: 0 additions & 11 deletions .github/workflows/verify_downloads.yml

This file was deleted.

8 changes: 3 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include ir_datasets/docs/*.yaml
include ir_datasets/docs/*.bib
include ir_datasets/etc/*.json
include requirements.txt
include LICENSE
recursive-include ir_datasets *.yaml
recursive-include ir_datasets *.bib
recursive-include ir_datasets *.json
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "ir_datasets"
description = "provides a common interface to many IR ad-hoc ranking benchmarks, training datasets, etc."
readme = "README.md"
authors = [
{name = "Sean MacAvaney", email = "[email protected]"},
]
maintainers = [
{name = "Sean MacAvaney", email = "[email protected]"},
]
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python",
"Operating System :: OS Independent",
"Topic :: Text Processing",
"Topic :: Text Processing :: Indexing",
"License :: OSI Approved :: MIT License",
]
dynamic = ["version", "dependencies"]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = ["test"]

[tool.setuptools.dynamic]
version = {attr = "ir_datasets.__version__"}
dependencies = {file = ["requirements.txt"]}

[project.urls]
"Homepage" = "https://ir-datasets.com/"
"Documentation" = "https://project.readthedocs.io/"
"Source" = "https://github.com/allenai/ir_datasets"
"Issues" = "https://github.com/allenai/ir_datasets/issues"
"Bug Tracker" = "https://github.com/allenai/ir_datasets/issues"

[project.scripts]
ir_datasets = "ir_datasets:main_cli"
28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

0 comments on commit fe956e0

Please sign in to comment.