Skip to content
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
26 changes: 6 additions & 20 deletions .github/workflows/cpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,15 @@ jobs:
- name: Install Ubuntu packages
run: |
sudo apt-get update -y
- name: Install
- name: Install and upgrade python packages
run: |
python -m pip install -e .[all]
# hack
pip install fsspec==2022.5.0
- name: Lint with flake8
python -m pip install --upgrade pip setuptools==59.4.0 wheel tox
- name: Lint
run: |
flake8 .
- name: Lint with black
run: |
black --check .
- name: Lint with isort
run: |
isort -c .
- name: Lint with interrogate
run: |
interrogate --config=pyproject.toml
- name: Lint with codespell
run: |
codespell
tox -re lint
- name: Run unittests
run: |
python -m pytest -rxs tests/unit/
tox -re test-cpu
- name: Generate package for pypi
run: |
python setup.py sdist
Expand Down Expand Up @@ -81,7 +67,7 @@ jobs:
# Build docs, treat warnings as errors
- name: Building docs
run: |
make -C docs html SPHINXOPTS="-W -q"
tox -re docs
- name: Upload HTML
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[MASTER]

ignore-patterns=_version.py,versioneer.py
ignore-patterns=_version.py,model_config_pb2.py

extension-pkg-allow-list=hugectr,nvtabular_cpp

Expand All @@ -22,6 +22,7 @@ disable=fixme,
# we'll probably never enable these checks
invalid-name,
import-error,
no-self-use,

# disable code-complexity checks for now
# TODO: should we configure the thresholds for these rather than just disable?
Expand Down Expand Up @@ -58,16 +59,15 @@ disable=fixme,
duplicate-string-formatting-argument,
len-as-condition,
cyclic-import,
consider-using-f-string,
arguments-renamed,

# producing false positives
unexpected-keyword-arg,
not-an-iterable,
unsubscriptable-object
unsubscriptable-object,
signature-differs

[SIMILARITIES]
min-similarity-lines=30
min-similarity-lines=50
ignore-comments=yes
ignore-docstrings=yes
ignore-imports=yes
17 changes: 17 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-r base.txt
-r dev.txt

tritonclient[all]
tensorflow<=2.9.0

Sphinx==3.5.4
sphinx_rtd_theme==1.0.0
sphinx-multiversion@git+https://github.com/mikemckiernan/sphinx-multiversion.git
sphinxcontrib-copydirs@git+https://github.com/mikemckiernan/sphinxcontrib-copydirs.git
recommonmark==0.7.1
Jinja2<3.1
natsort==8.0.1
myst-nb==0.13.2
linkify-it-py==1.0.3
sphinx-external-toc==0.2.4
attrs==21.4.0
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ deps = -rrequirements/base.txt
commands =
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/core.git
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/nvtabular.git
python -m pip install -e .[all]
python -m pip install fsspec==2022.5.0
python -m pytest --cov-report term --cov=merlin -rxs tests/unit

[testenv:test-gpu]
Expand All @@ -39,7 +41,7 @@ commands =
; Runs in: Github Actions
; Runs all lint/code checks and fails the PR if there are errors.
; Install pre-commit-hooks to run these tests during development.
deps = -rrequirements-dev.txt
deps = -rrequirements/dev.txt
commands =
flake8 setup.py merlin/ tests/
black --check --diff merlin tests
Expand All @@ -53,7 +55,7 @@ commands =
; Generates documentation with sphinx. There are other steps in the Github Actions workflow
; to publish the documentation on release.
changedir = {toxinidir}
deps = -rrequirements-docs.txt
deps = -rrequirements/docs.txt
commands =
python -m sphinx.cmd.build -P -b html docs/source docs/build/html

Expand Down