Skip to content

Commit

Permalink
Merge pull request #41 from messense/nox
Browse files Browse the repository at this point in the history
Switch from pipenv to nox
  • Loading branch information
ChillFish8 authored Jan 31, 2022
2 parents a9e75e5 + f901b8b commit 8e97a1e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 149 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: pip install pipenv
- run: pipenv install --dev
- run: pipenv run maturin develop
- run: pipenv run pytest -v tests
- uses: Swatinem/rust-cache@v1
- run: python3 -m pip install nox
- run: nox -s test-${{ matrix.python-version }}
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ futures = "0.3.5"
[dependencies.pyo3]
version = "0.15.1"
features = ["extension-module"]

[package.metadata.maturin]
requires-python = ">=3.7"
project-url = { Source = "https://github.com/quickwit-inc/tantivy-py" }
12 changes: 0 additions & 12 deletions Pipfile

This file was deleted.

109 changes: 0 additions & 109 deletions Pipfile.lock

This file was deleted.

12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ only supports python3.
# Development

Setting up a development environment can be done in a virtual environment using
`pipenv` or using local packages using the provided `Makefile`.
[`nox`](https://nox.thea.codes) or using local packages using the provided `Makefile`.

For the `pipenv` setup install the virtual environment and build the bindings using:
For the `nox` setup install the virtual environment and build the bindings using:

pipenv install --dev
pipenv run maturin develop

After the bindings are build, the tests can be run using:

pipenv run python -m pytest
python3 -m pip install nox
nox

For the `Makefile` based setup run:

Expand Down
8 changes: 8 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import nox


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
def test(session):
session.install("-rrequirements-dev.txt")
session.install("-e", ".", "--no-build-isolation")
session.run("pytest")
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["maturin"]
build-backend = "maturin"

[project]
name = "tantivy"
requires-python = ">=3.7"
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
maturin
pytest>=4.0
12 changes: 0 additions & 12 deletions tox.ini

This file was deleted.

0 comments on commit 8e97a1e

Please sign in to comment.