Skip to content

Commit

Permalink
update tox
Browse files Browse the repository at this point in the history
  • Loading branch information
momonga-ml committed Nov 10, 2023
1 parent 92a3a1d commit 5d9f504
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ jobs:

- name: Install dependencies
run: |
make install-dev
make install-test
- name: Run tox
run: |
make tox
- name: Run lint
run: |
make lint
make lint-notebooks
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ lint:
@echo "Running linting..."
@$(BLACK) denseclus tests setup.py
@$(RUFF) denseclus tests setup.py --fix --preview
@$(PYLINT) denseclus
@$(PYLINT) denseclus --disable=R0902,W0222,W0221,C0103

lint-notebooks:
@echo "Linting notebooks..."
@nbqa black notebooks/*.ipynb
@nbqa isort notebooks/*.ipynb
nbstripout notebooks/*.ipynb
@nbqa pylint notebooks/*.ipynb


test:
Expand All @@ -46,7 +45,6 @@ install:
install-dev: install
@echo "Installing dev dependencies..."
@$(PIP) install -r requirements-dev.txt
@$(PIP) pip install -e ".[dev]"

install-test: install
@echo "Installing test dependencies..."
Expand Down
2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- python>=3.7
- python>=3.10
- pip
- numpy
- scipy
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/usr/bin/env/python3
import setuptools
from denseclus import __version__ as current_version

import os

print(os.environ["PYTHONPATH"])


with open("README.md", encoding="utf-8") as fh:
long_description = fh.read()

Expand All @@ -15,7 +10,7 @@

setuptools.setup(
name="Amazon DenseClus",
version=current_version,
version="0.1.0",
author="Charles Frenzel & Baichuan Sun",
description="Dense Clustering for Mixed Data Types",
long_description=long_description,
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ src_dir =
[tox]
isolated_build = True
minversion = 3.15
envlist = py311
envlist = py310


[testenv]
deps =
pytest
pytest-cov
ruff
black
coverage
Expand All @@ -31,10 +32,10 @@ passenv =
extras =
testing
commands =
pytest {posargs}
pytest --cov=src --cov-report=term-missing {posargs}
black denseclus
ruff denseclus --fix --preview
pylint --fail-under=7 denseclus
pylint --fail-under=7 denseclus --disable=R0902,W0222,W0221,C0103
mypy denseclus
coverage erase
coverage run --include=denseclus/* -m pytest -ra
Expand Down Expand Up @@ -136,4 +137,4 @@ commands =

[gh-actions]
python =
3.7: py37
3.10: py310

0 comments on commit 5d9f504

Please sign in to comment.