Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
61 changes: 61 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build & Check (dry run)

# Manually triggered workflow to build, check, and smoke-test the package
# without publishing anywhere. Use this to validate a release candidate
# before cutting a tag or publishing to TestPyPI / PyPI.

on:
workflow_dispatch:

permissions:
contents: read

jobs:
build-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Poetry
run: pipx install poetry

- name: Configure Poetry
run: poetry config virtualenvs.in-project true

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: .venv
key: venv-build-check-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: poetry install --only main

- name: Build wheel and sdist
run: poetry build

- name: Check package (twine)
run: |
python -m pip install --upgrade twine
twine check dist/*

- name: Smoke-test wheel install
run: |
python -m venv /tmp/deeptab-wheel-test
source /tmp/deeptab-wheel-test/bin/activate
pip install dist/*.whl
python -c "import deeptab; print('version:', deeptab.__version__)"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
28 changes: 28 additions & 0 deletions .github/workflows/publish-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,31 @@ jobs:
prerelease: true
generate_release_notes: true
files: dist/*

smoke-test-testpypi:
name: Smoke-test install from TestPyPI
needs: publish-rc
runs-on: ubuntu-latest
permissions: {}

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install from TestPyPI (with retry)
run: |
VERSION="${GITHUB_REF_NAME#v}"
echo "Installing deeptab==$VERSION from TestPyPI"
for i in 1 2 3 4 5; do
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
"deeptab==$VERSION" && break
echo "Attempt $i failed, retrying in 30s..."
sleep 30
done

- name: Import smoke test
run: python -c "import deeptab; print('version:', deeptab.__version__)"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,6 @@ docs/_build/html/*

dev
dev/*


lightning_logs/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./docs/images/logo/mamba_tabular.jpg" width="400"/>
<img src="./docs/images/logo/deeptab-v1.png" width="520"/>

[![PyPI](https://img.shields.io/pypi/v/deeptab)](https://pypi.org/project/deeptab)
![PyPI - Downloads](https://img.shields.io/pypi/dm/deeptab)
Expand Down
112 changes: 112 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap");

:root {
font-size: 95%; /* zoom-out: more content per page */
--pst-color-primary: #2563eb;
--pst-color-secondary: #7c3aed;
--pst-color-accent: #06b6d4;
--pst-color-link: #2563eb;
--pst-font-size-base: 1rem;
--code-font:
"JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", "Consolas",
monospace;
}

html[data-theme="dark"] {
--pst-color-primary: #38bdf8;
--pst-color-secondary: #a78bfa;
--pst-color-accent: #22d3ee;
--pst-color-link: #38bdf8;
}

/* Dark mode: code block background and text */
html[data-theme="dark"] div.highlight,
html[data-theme="dark"] .highlight pre {
background: #1e2433;
color: #abb2bf;
}

html[data-theme="dark"] .highlight .k {
color: #c678dd;
} /* keyword */
html[data-theme="dark"] .highlight .s,
html[data-theme="dark"] .highlight .s1,
html[data-theme="dark"] .highlight .s2 {
color: #98c379;
} /* string */
html[data-theme="dark"] .highlight .c,
html[data-theme="dark"] .highlight .c1 {
color: #5c6370;
font-style: italic;
} /* comment */
html[data-theme="dark"] .highlight .mi,
html[data-theme="dark"] .highlight .mf {
color: #d19a66;
} /* number */
html[data-theme="dark"] .highlight .nf {
color: #61afef;
} /* function name */
html[data-theme="dark"] .highlight .nc {
color: #e5c07b;
} /* class name */
html[data-theme="dark"] .highlight .kn {
color: #c678dd;
} /* import keyword */
html[data-theme="dark"] .highlight .nn {
color: #e5c07b;
} /* module name */

.bd-main .bd-content .bd-article-container {
max-width: 900px;
}

.bd-sidebar-primary {
font-size: 0.92rem;
}

.sd-card {
border-radius: 14px;
box-shadow: none;
border: 1px solid var(--pst-color-border);
}

.sd-card:hover {
border-color: var(--pst-color-primary);
transform: translateY(-1px);
transition: all 0.15s ease-in-out;
}

.highlight pre {
border-radius: 12px;
font-family: var(--code-font);
font-size: 0.875rem;
line-height: 1.65;
padding: 1.1rem 1.25rem;
font-feature-settings:
"liga" 1,
"calt" 1;
}

/* Inline code */
code.literal,
p code,
li code,
td code {
font-family: var(--code-font);
font-size: 0.85em;
background: var(--pst-color-surface);
border: 1px solid var(--pst-color-border);
border-radius: 5px;
padding: 0.1em 0.4em;
}

/* sphinx-copybutton: align with rounded blocks */
div.highlight {
border-radius: 12px;
overflow: hidden;
}

.bd-header {
box-shadow: none;
border-bottom: 1px solid var(--pst-color-border);
}
43 changes: 35 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
sys.path.insert(1, os.path.dirname(os.path.abspath("../")) + os.sep + "deeptab")

project = "deeptab"
project_copyright = "2024, BASF SE"
author = "Anton Frederik Thielmann, Manish Kumar, Christoph Weisser, Benjamin Saefken, Soheila Samiee"
project_copyright = "2024-2026, OpenTabular"

try:
version = _version("deeptab")
Expand Down Expand Up @@ -51,6 +50,7 @@
"sphinx_rtd_theme",
# "pydata_sphinx_theme",
"sphinx_autodoc_typehints",
"sphinx_design",
]
autodoc_mock_imports = [
"lightning",
Expand Down Expand Up @@ -105,30 +105,57 @@
show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = "friendly"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# 'sphinx_rtd_theme' # 'furo', 'press', 'pydata_sphinx_theme'
html_theme = "sphinx_book_theme"
# html_static_path = ['_static']
# html_css_files = ['custom.css']
# html_js_files = ['custom.js']
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_extra_path = ["llms.txt"]

html_theme_options = {
"repository_url": "https://github.com/OpenTabular/DeepTab",
"repository_branch": "main",
"path_to_docs": "docs",
"use_edit_page_button": True,
"use_source_button": True,
"show_toc_level": 2,
"navigation_with_keys": True,
"show_prev_next": True,
"globaltoc_collapse": False,
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/OpenTabular/DeepTab",
"icon": "fa-brands fa-github",
},
{
"name": "PyPI",
"url": "https://pypi.org/project/deeptab/",
"icon": "fa-brands fa-python",
},
],
}

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "images/logo/mamba_tabular.jpg"
html_logo = "images/logo/deeptab-v1.png"

# Override the Sphinx default title that appends `documentation`
html_title = f"{project} {project_copyright}"
html_title = "DeepTab"
# Format of the last updated section in the footer
html_last_updated_fmt = "%Y-%m-%d"

html_context = {
"github_user": "OpenTabular",
"github_repo": "DeepTab",
"github_version": "main",
"doc_path": "docs",
}

# -- Options for autodoc ------------------------------------------------------

autodoc_default_options = {
Expand Down
27 changes: 21 additions & 6 deletions docs/contributing.md → docs/developer_guide/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,30 @@ This project uses conventional commits and intentional, maintainer-controlled re
git push origin vX.Y.Z
```
- This tag push triggers `publish-pypi.yml` → builds and publishes to PyPI + creates GitHub Release
- For RC tags (`vX.Y.Zrc1`), push triggers `publish-testpypi.yml` → publishes to TestPyPI instead
- For RC tags (`vX.Y.Zrc1`), push triggers `publish-testpypi.yml` → publishes to TestPyPI, then a second `smoke-test-testpypi` job installs the exact RC from TestPyPI in a clean environment and runs an import smoke test to confirm the uploaded package is installable from the index

### Validating a Build Without Publishing

Before cutting a tag or publishing anywhere, you can trigger a full dry-run build via the **Build & Check** workflow:

1. Go to **Actions → Build & Check (dry run)** in the GitHub repository.
2. Click **Run workflow** and select the branch to validate.
3. The workflow will:
- Build both wheel and sdist with Poetry
- Run `twine check` on both artifacts
- Install the wheel in a fresh virtual environment and run an import smoke test
- Upload the `dist/` folder as a downloadable artifact (retained for 7 days)

This is the recommended step before opening a release PR or pushing an RC tag.

### What Triggers a Release?

| Event | Result |
| ----------------------------- | ------------------------------------- |
| Push to `main` | CI tests only |
| Maintainer pushes `v*` tag | PyPI publish + GitHub Release |
| Maintainer pushes `v*rc*` tag | PyPI pre-release + GitHub pre-release |
| Event | Result |
| ----------------------------- | ------------------------------------------------------------------- |
| `workflow_dispatch` | Dry-run build + twine check + smoke test (no publish) |
| Push to `main` | CI tests only |
| Maintainer pushes `v*rc*` tag | TestPyPI publish + GitHub pre-release + TestPyPI install smoke test |
| Maintainer pushes `v*` tag | PyPI publish + GitHub Release |

### Commit Types and Their Effect on Version

Expand Down
Loading
Loading