Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from pipenv to nox #41

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.