Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
13 changes: 12 additions & 1 deletion .gitignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this uv.lock used for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv is a Python package manager https://docs.astral.sh/uv/.
I was using it to develop locally but since it is not used in wakis I just added the lockfile to .gitignore (not sure if this should be version controlled generally speaking though)

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ ECT_*
*.PNG
_build/
dist/
wakis.egg-info/
wakis.egg-info/
.venv
.coverage
coverage.xml
*.pyc
*.pyo
*.pyd
*.so
.Python
*.ipynb_checkpoints
htmlcov/
uv.lock
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ include pyproject.toml
include *.md

# Include the license file
include LICENSE.txt

# Include requirements
include requirements.txt
include LICENSE
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# wakis Makefile


# Colors for output
RED := \033[0;31m
GREEN := \033[0;32m
YELLOW := \033[1;33m
NC := \033[0m # No Color

.PHONY: help install install-gpu clean docs

# Based on https://gist.github.com/prwhite/8168133?permalink_comment_id=4718682#gistcomment-4718682

## (Default) Print listing of key targets with their descriptions
help:
@printf "\n\033[1;33mwakis Makefile\033[0m\n"
@printf "\n\033[1;34mUsage:\033[0m \033[1;33mmake <target>\033[0m\n\n"
@awk '\
/^## / { \
desc = substr($$0, 4); \
getline nextline; \
if (match(nextline, /^([a-zA-Z0-9._-]+):/)) { \
target = substr(nextline, RSTART, RLENGTH-1); \
printf " \033[34m%-20s\033[0m %s\n", target, desc; \
} \
} \
' $(MAKEFILE_LIST)

## Install Python dependencies
install:
@echo -e "Installing Python dependencies..."
@pip install -e .[full]

## Install Python dependencies
install-gpu:
@echo -e "Installing Python dependencies with GPU support..."
@pip install -e .[full-gpu]

## Remove temporary and generated files
clean:
@echo -e "Cleaning up directory..."
@rm -rf __pycache__ .ruff_cache .pytest_cache *.egg-info .html *.html coverage.xml .coverage .mypy_cache results
@ cd docs && make -s clean


## Run Python tests
test:
pytest -s

## Build documentation
docs:
cd docs && make html
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ Create a dedicated **conda environment** and install dependencies:
cd wakis/
conda create --name wakis-env python=3.11
conda activate wakis-env
pip install -r requirements.txt
pip install -e . # install wakis in editable mode
pip install -e .[notebook, tests, docs] # install wakis in editable mode
pip install neffint iddefix bihc # Optional tools
```
πŸ› οΈ **Want to contribute?** To merge your changes into `main`, create a **Pull Request (PR)** following our [PR template](https://github.com/ImpedanCEI/wakis/blob/main/.github/pull_request_template.md).
Expand Down
135 changes: 68 additions & 67 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,87 +10,90 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import sys, os
sys.path.insert(0, os.path.abspath('../../wakis/'))
#sys.path.insert(0, os.path.abspath("../wakis"))
import sys
import os

sys.path.insert(0, os.path.abspath("../../wakis/"))
# sys.path.insert(0, os.path.abspath("../wakis"))
sys.path.insert(0, os.path.abspath("../"))
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath(".."))

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

project = 'wakis'
copyright = '2024, CERN, BE-ABP-CEI'
author = 'Elena de la Fuente, Lorenzo Giacomel, Giovanni Iadarola, Carlo Zannini'
project = "wakis"
copyright = "2024, CERN, BE-ABP-CEI"
author = "Elena de la Fuente, Lorenzo Giacomel, Giovanni Iadarola, Carlo Zannini"

# The full version, including alpha/beta/rc tags
release = '1.0'
release = "1.0"

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax', #for eqs
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx_copybutton',
#'sphinxemoji',
'myst_parser', #for markdown
'sphinx_design',
'sphinx_last_updated_by_git',
]

autodoc_preserve_defaults = True #preserves default args as in source code
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax", # for eqs
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinx_copybutton",
#'sphinxemoji',
"myst_parser", # for markdown
"sphinx_design",
"sphinx_last_updated_by_git",
]

autodoc_preserve_defaults = True # preserves default args as in source code

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

# The suffix of source filenames.

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
".rst": "restructuredtext",
".md": "markdown",
}

# 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']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
#project = u'wakis'
#copyright = u'2024, CERN, BE-ABP-CEI'
# project = u'wakis'
# copyright = u'2024, CERN, BE-ABP-CEI'

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


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_static_path = ['img']
html_theme = "sphinx_rtd_theme"
html_static_path = ["img"]
html_logo = "img/wakis-logo-pinkwhite.png"
html_theme_options = {
'logo_only': True,
'home_page_in_toc': True,
'display_version': False,
'collapse_navigation': False,
'navigation_depth': 1,
"logo_only": True,
"home_page_in_toc": True,
"display_version": False,
"collapse_navigation": False,
"navigation_depth": 1,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -99,75 +102,73 @@
# html_static_path = ['_static']

# Output file base name for HTML help builder.
htmlhelp_basename = 'ReadtheDocsTemplatedoc'
htmlhelp_basename = "ReadtheDocsTemplatedoc"


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
'''
"""
latex_documents = [
('index', 'ReadtheDocsTemplate.tex', u'Read the Docs Template Documentation',
u'Read the Docs', 'manual'),
]
'''
"""
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
'''
"""
texinfo_documents = [
('index', 'ReadtheDocsTemplate', u'Read the Docs Template Documentation',
u'Read the Docs', 'ReadtheDocsTemplate', 'One line description of project.',
'Miscellaneous'),
]
'''
"""
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# texinfo_no_detailmenu = False


# -- Extension configuration -------------------------------------------------
# -- Extension configuration -------------------------------------------------
Loading
Loading