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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
src: pimmslearn
- uses: isort/isort-action@v1
with:
sortPaths: pimmslearn
lint:
name: Lint with ruff
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,8 +105,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12"]
os: [
"ubuntu-latest",
"macos-latest",
#"windows-latest" # tk/tcl issue in current runner images
]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ workflows/maxquant/out/
# builds
docs/_*
docs/reference
build
build

#Mac
*.DS_Store
74 changes: 38 additions & 36 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

# -- Project information -----------------------------------------------------

project = 'pimms'
copyright = '2023, Henry Webel'
author = 'Henry Webel'
project = "pimms"
copyright = "2023, Henry Webel"
author = "Henry Webel"

PACKAGE_VERSION = metadata.version("pimms-learn")
version = PACKAGE_VERSION
Expand All @@ -30,25 +30,23 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autodoc.typehints',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'myst_nb',
'sphinx_new_tab_link',
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.autodoc.typehints",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"myst_nb",
"sphinx_new_tab_link",
]

myst_enable_extensions = [
"strikethrough",
"dollarmath",
"amsmath"
]
myst_enable_extensions = ["strikethrough", "dollarmath", "amsmath"]


# Plolty support through require javascript library
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
html_js_files = ["https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"]
html_js_files = [
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
]

# https://myst-nb.readthedocs.io/en/latest/computation/execute.html
nb_execution_mode = "auto"
Expand All @@ -62,16 +60,17 @@
nb_merge_streams = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build',
'Thumbs.db',
'.DS_Store',
'jupyter_execute', # avoid local re-execution of written nbs during development
]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"jupyter_execute", # avoid local re-execution of written nbs during development
]

# Intersphinx options
intersphinx_mapping = {
Expand All @@ -88,8 +87,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

html_theme = 'sphinx_book_theme' # pip install sphinx-book-theme
html_logo = 'logos/logo.png'
html_theme = "sphinx_book_theme" # pip install sphinx-book-theme
html_logo = "logos/logo.png"
html_favicon = "logos/logo_thumbnail.png"

# See:
Expand Down Expand Up @@ -135,17 +134,20 @@

def run_apidoc(_):
from sphinx.ext import apidoc
apidoc.main([
"--force",
"--implicit-namespaces",
"--module-first",
# "--separate",
"-o",
str(PROJECT_ROOT / "docs" / "reference"),
str(PACKAGE_ROOT),
str(PACKAGE_ROOT / "*.c"),
str(PACKAGE_ROOT / "*.so"),
])

apidoc.main(
[
"--force",
"--implicit-namespaces",
"--module-first",
# "--separate",
"-o",
str(PROJECT_ROOT / "docs" / "reference"),
str(PACKAGE_ROOT),
str(PACKAGE_ROOT / "*.c"),
str(PACKAGE_ROOT / "*.so"),
]
)

def setup(app):
app.connect('builder-inited', run_apidoc)
app.connect("builder-inited", run_apidoc)
9 changes: 5 additions & 4 deletions pimmslearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

PyPI package is called pimms-learn (with a hyphen).
"""

from __future__ import annotations

# Set default logging handler to avoid "No handler found" warnings.
Expand All @@ -31,14 +32,14 @@

savefig = pimmslearn.plotting.savefig

__license__ = 'GPLv3'
__license__ = "GPLv3"
__version__ = metadata.version("pimms-learn")

__all__ = ['logging', 'nb', 'pandas', 'plotting', 'savefig']
__all__ = ["logging", "nb", "pandas", "plotting", "savefig"]

# set some defaults


njab.pandas.set_pandas_number_formatting(float_format='{:,.3f}')
njab.pandas.set_pandas_number_formatting(float_format="{:,.3f}")

pimmslearn.plotting.make_large_descriptors('x-large')
pimmslearn.plotting.make_large_descriptors("x-large")
6 changes: 3 additions & 3 deletions pimmslearn/analyzers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""General classes formalizing an experiment.
"""
"""General classes formalizing an experiment."""

from types import SimpleNamespace

from pimmslearn.analyzers import compare_predictions, diff_analysis

__all__ = ['diff_analysis', 'compare_predictions', 'Analysis']
__all__ = ["diff_analysis", "compare_predictions", "Analysis"]


class Analysis(SimpleNamespace):
Expand Down
Loading
Loading