diff --git a/benchmarks/asv.conf.json b/benchmarks/asv.conf.json deleted file mode 100644 index fc92ce89e..000000000 --- a/benchmarks/asv.conf.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - // The version of the config file format. Do not change, unless - // you know what you are doing. - "version": 1, - - // The name of the project being benchmarked - "project": "yadism", - - // The project's homepage - "project_url": "https://n3pdf.github.io/yadism/", - - // The URL or local path of the source code repository for the - // project being benchmarked - "repo": "..", - - // List of branches to benchmark. If not provided, defaults to "master" - // (for git) or "tip" (for mercurial). - "branches": ["HEAD"], - - // The DVCS being used. If not set, it will be automatically - // determined from "repo" by looking at the protocol in the URL - // (if remote), or by looking for special directories, such as - // ".git" (if local). - "dvcs": "git", - - // The tool to use to create environments. May be "conda", - // "virtualenv" or other value depending on the plugins in use. - // If missing or the empty string, the tool will be automatically - // determined by looking for tools on the PATH environment - // variable. - "environment_type": "virtualenv", - - // the base URL to show a commit for the project. - "show_commit_url": "https://github.com/N3PDF/yadism/commit/", - - // The Pythons you'd like to test against. If not provided, defaults - // to the current version of Python used to run `asv`. - "pythons": ["3.8", "3.9", "3.10"], - - // The matrix of dependencies to test. Each key is the name of a - // package (in PyPI) and the values are version numbers. An empty - // list indicates to just test against the default (latest) - //version. - "matrix": { - "poetry": [] - }, - - // The directory (relative to the current directory) that benchmarks are - // stored in. If not provided, defaults to "benchmarks" - "benchmark_dir": "performance", - - // The directory (relative to the current directory) to cache the Python - // environments in. If not provided, defaults to "env" - // "env_dir": "env", - - // The directory (relative to the current directory) that raw benchmark - // results are stored in. If not provided, defaults to "results". - "results_dir": "results", - - // The directory (relative to the current directory) that the html tree - // should be written to. If not provided, defaults to "html". - "html_dir": "html", - - // The number of characters to retain in the commit hashes. - // "hash_length": 8, - - // `asv` will cache wheels of the recent builds in each - // environment, making them faster to install next time. This is - // number of builds to keep, per environment. - "build_cache_size": 8, - - // The commits after which the regression search in `asv publish` - // should start looking for regressions. Dictionary whose keys are - // regexps matching to benchmark names, and values corresponding to - // the commit (exclusive) after which to start looking for - // regressions. The default is to start from the first commit - // with results. If the commit is `null`, regression detection is - // skipped for the matching benchmark. - // - // "regressions_first_commits": { - // "some_benchmark": "352cdf", // Consider regressions only after this commit - // "another_benchmark": null, // Skip regression detection altogether - // } - - - "install_command": ["in-dir={env_dir} python -mpip install {wheel_file}[mark]"], - - "build_command": [ - "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps -w {build_cache_dir} {build_dir}" - ] -} diff --git a/benchmarks/performance/__init__.py b/benchmarks/performance/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/benchmarks/performance/full.py b/benchmarks/performance/full.py deleted file mode 100644 index e9911b8f8..000000000 --- a/benchmarks/performance/full.py +++ /dev/null @@ -1,60 +0,0 @@ -import copy - -import numpy as np -from banana.data import theories - -import yadism -from yadmark.data import observables - - -def generate_theory(): - theory = copy.deepcopy(theories.default_card) - - return theory - - -def generate_observable(): - observable = copy.deepcopy(observables.default_card) - - kinematics = [] - kinematics.extend([dict(x=x, Q2=20.0, y=0) for x in np.geomspace(1e-4, 0.9, 100)]) - kinematics.extend( - [dict(x=0.1, Q2=Q2, y=0) for Q2 in np.geomspace(4, 20, 1000).tolist()] - ) - - observable["observables"]["F2_light"] = kinematics - return observable - - -def compute_sf(): - theory = generate_theory() - observable = generate_observable() - - theory["TMC"] = 0 - - return yadism.Runner(theory, observable).get_result() - - -def compute_sf_tmc(): - theory = generate_theory() - observable = generate_observable() - - theory["TMC"] = 1 - - return yadism.Runner(theory, observable).get_result() - - -class MemorySuite: - def mem_sf(self): - return compute_sf() - - def mem_sf_tmc(self): - return compute_sf_tmc() - - -class PeakMemorySuite: - def peakmem_sf(self): - compute_sf() - - def peakmem_sf_tmc(self): - compute_sf_tmc() diff --git a/poetry.lock b/poetry.lock index 21593fed3..49828a54e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -98,23 +98,6 @@ files = [ astroid = ["astroid (>=2,<5)"] test = ["astroid (>=2,<5)", "pytest (<9.0)", "pytest-cov", "pytest-xdist"] -[[package]] -name = "asv" -version = "0.4.2" -description = "Airspeed Velocity: A simple Python history benchmarking tool" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -groups = ["test"] -files = [ - {file = "asv-0.4.2.tar.gz", hash = "sha256:9134f56b7a2f465420f17b5bb0dee16047a70f01029c996b7ab3f197de2d0779"}, -] - -[package.dependencies] -six = ">=1.4" - -[package.extras] -hg = ["python-hglib (>=1.5)"] - [[package]] name = "attrs" version = "25.4.0" @@ -2696,14 +2679,14 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= [[package]] name = "nbconvert" -version = "7.16.6" -description = "Converting Jupyter Notebooks (.ipynb files) to other formats. Output formats include asciidoc, html, latex, markdown, pdf, py, rst, script. nbconvert can be used both as a Python library (`import nbconvert`) or as a command line tool (invoked as `jupyter nbconvert ...`)." +version = "7.17.0" +description = "Convert Jupyter Notebooks (.ipynb files) to other formats." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["docs"] files = [ - {file = "nbconvert-7.16.6-py3-none-any.whl", hash = "sha256:1375a7b67e0c2883678c48e506dc320febb57685e5ee67faa51b18a90f3a712b"}, - {file = "nbconvert-7.16.6.tar.gz", hash = "sha256:576a7e37c6480da7b8465eefa66c17844243816ce1ccc372633c6b71c3c0f582"}, + {file = "nbconvert-7.17.0-py3-none-any.whl", hash = "sha256:4f99a63b337b9a23504347afdab24a11faa7d86b405e5c8f9881cd313336d518"}, + {file = "nbconvert-7.17.0.tar.gz", hash = "sha256:1b2696f1b5be12309f6c7d707c24af604b87dfaf6d950794c7b07acab96dda78"}, ] [package.dependencies] @@ -2724,8 +2707,8 @@ pygments = ">=2.4.1" traitlets = ">=5.1" [package.extras] -all = ["flaky", "ipykernel", "ipython", "ipywidgets (>=7.5)", "myst-parser", "nbsphinx (>=0.2.12)", "playwright", "pydata-sphinx-theme", "pyqtwebengine (>=5.15)", "pytest (>=7)", "sphinx (==5.0.2)", "sphinxcontrib-spelling", "tornado (>=6.1)"] -docs = ["ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (==5.0.2)", "sphinxcontrib-spelling"] +all = ["flaky", "intersphinx-registry", "ipykernel", "ipython", "ipywidgets (>=7.5)", "myst-parser", "nbsphinx (>=0.2.12)", "playwright", "pydata-sphinx-theme", "pyqtwebengine (>=5.15)", "pytest (>=7)", "sphinx (>=5.0.2)", "sphinxcontrib-spelling", "tornado (>=6.1)"] +docs = ["intersphinx-registry", "ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (>=5.0.2)", "sphinxcontrib-spelling"] qtpdf = ["pyqtwebengine (>=5.15)"] qtpng = ["pyqtwebengine (>=5.15)"] serve = ["tornado (>=6.1)"] @@ -4583,7 +4566,7 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main", "docs", "test"] +groups = ["main", "docs"] files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -5155,4 +5138,4 @@ mark = ["banana-hep", "sqlalchemy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<3.14" -content-hash = "a5eb98d4c9f58c0c697ad444e5dcafcff8503c77a60f9c8f69acae23bf284851" +content-hash = "2f124d493b22513b4d585d9580b7f64a8de8285270817ab648ce68c75f10394a" diff --git a/pyproject.toml b/pyproject.toml index a5f1c548b..aa576dcae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,6 @@ pytest = "^7.2.0" pytest-cov = "^4.0.0" pytest-env = "^0.6.2" hypothesis = "^6.39.3" -asv = "^0.4.2" pylint = "^3.1.0" [tool.poetry.group.docs] @@ -93,12 +92,6 @@ lint-warnings = "pylint src/ --exit-zero" sandbox = "python benchmarks/runners/sandbox.py" navigator = "yadnav --config benchmarks/banana.yaml" nav = "yadnav --config benchmarks/banana.yaml" -asv-run = "asv run --config benchmarks/asv.conf.json master..HEAD" -asv-preview = "asv preview --config benchmarks/asv.conf.json" -asv-publish = "asv publish --config benchmarks/asv.conf.json" -asv-show = "asv show --config benchmarks/asv.conf.json" -asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" } -asv = ["asv-run", "asv-publish", "asv-preview"] docs = { "shell" = "cd docs; make html" } docs-view = { "shell" = "cd docs; make view" } docs-server = { "shell" = "cd docs; make server" }