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
21 changes: 21 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .github/workflows/ruff.yml
name: Ruff Check

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Python & Ruff
run: |
pip install ruff

- name: Lint
run: ruff check .

- name: Format check
run: ruff format --check .

183 changes: 54 additions & 129 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,160 +1,85 @@
# Byte-compiled / optimized / DLL files
# Customized utilities log files
lohrasb.log

# macOS system files
.DS_Store
.AppleDouble
.LSOverride

# macOS folder attributes
Icon?
._*
.Spotlight-V100
.Trashes
*.swp

# Python bytecode
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
.python-version

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Poetry local config
poetry.toml

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# VS Code settings
.vscode/

# Jupyter and IPython
.ipynb_checkpoints/
profile_default/
ipython_config.py

# Unit test / coverage reports
htmlcov/
# Testing and coverage
.coverage
.cache/
.pytest_cache/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot
# Build artifacts
build/
dist/
*.egg-info/
.eggs/
*.egg
MANIFEST

# Django stuff:
# Logs and misc
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject
*.pot
*.mo
*.spec
*.pyd
*.pyo

# mkdocs documentation
# Site builds
/site

# mypy
# Static analysis
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Environment variables
.env
14 changes: 14 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .ruff.toml

line-length = 120
target-version = "py310"

[lint]
select = ["E", "F", "I", "B", "UP", "SIM"]
ignore = ["F541"]

[format]
docstring-code-format = true

[lint.per-file-ignores]
"data/make_cardio_train_pickle.py" = ["UP009"]
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# hash:sha256:6b212c24ad89ce60c5ad110a4239f9ecf823f2ab367e9fff719539640ecd4b5b
FROM registry.codeocean.com/codeocean/py-r:python3.10.12-R4.3.2-JupyterLab4.0.10-RStudiorstudio-server-2023.12.0-369-ubuntu22.04

ARG DEBIAN_FRONTEND=noninteractive

RUN pip3 install -U --no-cache-dir \
catboost==1.2.5 \
category-encoders==2.6.3 \
fasttreeshap==0.1.6 \
lightgbm==4.5.0 \
lohrasb==4.2.0 \
matplotlib==3.8.4 \
numpy==1.21.6 \
optuna-integration==3.6.0 \
pandas==1.3.5 \
ray==2.7.1 \
scikit-learn==1.0.2 \
seaborn \
shap==0.42.1 \
tune-sklearn==0.5.0 \
xgboost==2.1.1 \
zoish==5.0.4
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Makefile

format:
ruff format .

lint:
ruff check .

check: format lint
Loading