pax_global_header 0000666 0000000 0000000 00000000064 14636363363 0014527 g ustar 00root root 0000000 0000000 52 comment=14771aba95594ec3e2c7a27f214a2e91fd2dff6c
param-2.1.1/ 0000775 0000000 0000000 00000000000 14636363363 0012630 5 ustar 00root root 0000000 0000000 param-2.1.1/.flake8 0000664 0000000 0000000 00000001037 14636363363 0014004 0 ustar 00root root 0000000 0000000 [flake8]
# TODO tests should not be excluded (one day...)
include = param numbergen
exclude =
.venv,
jupyter_execute,
.git,
__pycache__,
.eggs,
*.egg,
doc,
dist,
build,
_build,
tests,
.ipynb_checkpoints
ignore = E114,
E116,
E126,
E128,
E129,
E2,
E3,
E4,
E5,
E731,
E701,
E702,
E703,
E704,
E722,
E741,
E742,
E743,
W503,
W504,
param-2.1.1/.gitattributes 0000664 0000000 0000000 00000000032 14636363363 0015516 0 ustar 00root root 0000000 0000000 __init__.py export-subst
param-2.1.1/.github/ 0000775 0000000 0000000 00000000000 14636363363 0014170 5 ustar 00root root 0000000 0000000 param-2.1.1/.github/FUNDING.yml 0000664 0000000 0000000 00000000110 14636363363 0015775 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
open_collective: holoviz
param-2.1.1/.github/workflows/ 0000775 0000000 0000000 00000000000 14636363363 0016225 5 ustar 00root root 0000000 0000000 param-2.1.1/.github/workflows/build.yaml 0000664 0000000 0000000 00000005323 14636363363 0020213 0 ustar 00root root 0000000 0000000 name: packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
# Dry-run only
workflow_dispatch:
schedule:
- cron: '0 13 * * SUN'
jobs:
conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: conda setup
run: |
conda update --name base conda
conda install anaconda-client conda-build
pip install hatch
- name: conda build
run: |
VERSION=`hatch version` conda build conda.recipe/
- name: conda dev upload
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev $(VERSION=`hatch version` conda build --output conda.recipe)
- name: conda main upload
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev --label=main $(VERSION=`hatch version` conda build --output conda.recipe)
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: env setup
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: pip build
run: |
python -m build
- name: Publish package to PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PPU }}
password: ${{ secrets.PPP }}
packages_dir: dist/
param-2.1.1/.github/workflows/docs.yaml 0000664 0000000 0000000 00000004246 14636363363 0020047 0 ustar 00root root 0000000 0000000 name: docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
workflow_dispatch:
inputs:
target:
description: 'Site to build and deploy'
type: choice
options:
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 13 * * SUN'
jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: graphviz
run: sudo apt install graphviz graphviz-dev
- name: env setup
run: |
python -m pip install --upgrade pip
python -m pip install hatch
- name: build docs
run: hatch -v run docs:build
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v4
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
(github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: holoviz-dev/param
publish_dir: ./builtdocs
force_orphan: true
- name: Deploy main
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builtdocs
cname: param.holoviz.org
force_orphan: true
param-2.1.1/.github/workflows/downstream_tests.yaml 0000664 0000000 0000000 00000001227 14636363363 0022520 0 ustar 00root root 0000000 0000000 name: downstream_tests
on:
# Run this workflow after the build workflow has completed.
workflow_run:
workflows: [packages]
types: [completed]
# Or by triggering it manually via Github's UI
workflow_dispatch:
inputs:
manual:
description: don't change me!
type: boolean
required: true
default: true
jobs:
downstream_tests:
uses: holoviz-dev/holoviz_tasks/.github/workflows/run_downstream_tests.yaml@main
with:
downstream_repos_as_json: "{\"downstream_repo\":[\"panel\", \"lumen\", \"holoviews\", \"datashader\", \"colorcet\"]}"
secrets:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
param-2.1.1/.github/workflows/test.yaml 0000664 0000000 0000000 00000005306 14636363363 0020074 0 ustar 00root root 0000000 0000000 name: tests
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
schedule:
- cron: '0 13 * * SUN'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre_commit:
name: Run pre-commit hooks
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "1"
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit
uses: pre-commit/action@v3.0.0
test_suite:
name: Test ${{ matrix.python-version }}, ${{ matrix.platform }}
needs: [pre_commit]
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: ['ubuntu-latest', 'windows-latest', 'macos-latest']
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9"]') || fromJSON('["3.8", "3.10", "3.12"]') }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: env setup
run: |
python -m pip install --upgrade pip
python -m pip install hatch
- name: temp patch pip for blosc2
if: contains(matrix.platform, 'ubuntu') && matrix.python-version == '3.8'
run: echo "PIP_ONLY_BINARY=blosc2" >> $GITHUB_ENV
- name: run unit tests
run: hatch -v run +py=${{ matrix.python-version }} tests:with_coverage
- name: run examples tests
# A notebook fails on Windows (UNIX path used in an example)
# No need to run these tests for PyPy really
if: contains(matrix.platform, 'ubuntu') && !startsWith(matrix.python-version, 'py')
run: hatch -v run +py=${{ matrix.python-version }} tests_examples:examples
- name: Upload coverage reports to Codecov
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
verbose: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
param-2.1.1/.gitignore 0000664 0000000 0000000 00000000601 14636363363 0014615 0 ustar 00root root 0000000 0000000 *.py[cod]
#*#
*~
*.egg
*.egg-info
*.swp
*.DS_Store
*.so
*.o
*.out
*.lock
.ipynb_checkpoints
.vscode
dist/
.venv/
# Docs
builtdocs/
jupyter_execute/
doc/Reference_Manual/
doc/user_guide/data.pickle
doc/user_guide/output.csv
doc/reference/generated
# Unit test / Coverage report
.coverage
coverage.xml
# Versionning
param/_version.py
# asv benchmark
benchmarks/.asv
benchmarks/param
param-2.1.1/.gitmodules 0000664 0000000 0000000 00000000000 14636363363 0014773 0 ustar 00root root 0000000 0000000 param-2.1.1/.pre-commit-config.yaml 0000664 0000000 0000000 00000001273 14636363363 0017114 0 ustar 00root root 0000000 0000000 # This is the configuration for pre-commit, a local framework for managing pre-commit hooks
# Check out the docs at: https://pre-commit.com/
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-toml
- id: detect-private-key
- id: end-of-file-fixer
exclude: (\.min\.js$|\.svg$)
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/hoxbro/clean_notebook
rev: v0.1.10
hooks:
- id: clean-notebook
param-2.1.1/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000000454 14636363363 0015432 0 ustar 00root root 0000000 0000000 # Code of Conduct
For the code of conduct, see [HoloViz/HoloViz - CODE_OF_CONDUCT.md](https://github.com/holoviz/holoviz/blob/param-gov/CODE_OF_CONDUCT.md).
The Param Project’s equivalently named documents take precedence over any external materials referenced within this linked document above.
param-2.1.1/LICENSE.txt 0000664 0000000 0000000 00000002742 14636363363 0014460 0 ustar 00root root 0000000 0000000 Copyright (c) 2005-2022, HoloViz team.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holder nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
param-2.1.1/README.md 0000664 0000000 0000000 00000005300 14636363363 0014105 0 ustar 00root root 0000000 0000000
| | |
| --- | --- |
| Build Status | [](https://github.com/holoviz/param/actions/workflows/test.yaml)
| Coverage | [](https://codecov.io/gh/holoviz/param) ||
| Latest dev release | [](https://github.com/holoviz/param/tags) [](https://holoviz-dev.github.io/param/) |
| Latest release | [](https://github.com/holoviz/param/releases) [](https://pypi.python.org/pypi/param) [](https://anaconda.org/pyviz/param) [](https://anaconda.org/conda-forge/param) [](https://anaconda.org/anaconda/param) |
| Python | [](https://pypi.org/project/param/)
| Docs | [](https://github.com/holoviz/param/tree/gh-pages) [](https://param.holoviz.org) |
| Binder | [](https://mybinder.org/v2/gh/holoviz/param/main?labpath=doc) |
| Support | [](https://discourse.holoviz.org/) |
Param is a library providing Parameters: Python attributes extended to have features such as type and range checking, dynamically generated values, documentation strings, default values, etc., each of which is inherited from parent classes if not specified in a subclass.
Param contains only two required Python files, with no external dependencies, and is provided freely for both non-commercial and commercial use under a BSD license, so that it can easily be included as part of other projects.
Please see [param's website](https://param.holoviz.org) for official releases, installation instructions, documentation, and examples.
param-2.1.1/benchmarks/ 0000775 0000000 0000000 00000000000 14636363363 0014745 5 ustar 00root root 0000000 0000000 param-2.1.1/benchmarks/README.md 0000664 0000000 0000000 00000005674 14636363363 0016240 0 ustar 00root root 0000000 0000000 # Benchmarking
`Param` uses ASV (https://asv.readthedocs.io) for benchmarking.
## Preparation
Install `asv` into your environment with for example:
```
hatch shell
cd benchmarks
pip install asv
```
ASV then runs benchmarks in isolated virtual environments that it creates using `virtualenv`.
## Running benchmarks
To run all benchmarks against the default `main` branch:
```
cd benchmarks
asv run
```
The first time this is run it will create a machine file to store information about your machine. Then a virtual environment will be created and each benchmark will be run multiple times to obtain a statistically valid benchmark time.
To list the benchmark timings stored for the `main` branch use:
```
asv show main
```
ASV ships with its own simple webserver to interactively display the results in a webbrowser. To use this:
```
asv publish
asv preview
```
and then open a web browser at the URL specified.
If you want to quickly run all benchmarks once only to check for errors, etc, use:
```
asv dev
```
instead of `asv run`.
## Adding new benchmarks
Add new benchmarks to existing or new classes in the `benchmarks/benchmarks` directory. Any class member function with a name that starts with `time` will be identified as a timing benchmark when `asv` is run.
Data that is required to run benchmarks is usually created in the `setup()` member function. This ensures that the time taken to setup the data is not included in the benchmark time. The `setup()` function is called once for each invocation of each benchmark, the data are not cached.
At the top of each benchmark class there are lists of parameter names and values. Each benchmark is repeated for each unique combination of these parameters.
If you only want to run a subset of benchmarks, use syntax like:
```
asv run -b ShadeCategorical
```
where the text after the `-b` flag is used as a regex to match benchmark file, class and function names.
## Benchmarking code changes
You can compare the performance of code on different branches and in different commits. Usually if you want to determine how much faster a new algorithm is, the old code will be in the `main` branch and the new code will be in a new feature branch. Because ASV uses virtual environments and checks out the `param` source code into these virtual environments, your new code must be committed into the new feature branch locally.
To benchmark the latest commits on `main` and your new feature branch, edit `asv.conf.json` to change the line
```
"branches": ["main"],
```
into
```
"branches": ["main", "new_feature_branch"],
```
or similar.
Now when you `asv run` the benchmarks will be run against both branches in turn.
Then use
```
asv show
```
to list the commits that have been benchmarked, and
```
asv compare commit1 commit2
```
to give you a side-by-side comparison of the two commits.
You can run `asv` for single tags and compare them
```
asv run v0.0.1^!
asv run v0.0.2^!
asv compare v0.0.1 v0.0.2
```
```
asv run v0.0.2..HEAD
param-2.1.1/benchmarks/asv.conf.json 0000664 0000000 0000000 00000001544 14636363363 0017361 0 ustar 00root root 0000000 0000000 {
"version": 1,
"project": "param",
"project_url": "https://param.holoviz.org",
"repo": "..",
"dvcs": "git",
"repo_subdir": "",
"branches": ["main"],
"install_command": ["in-dir={env_dir} python -m pip install {wheel_file}"],
"uninstall_command": ["return-code=any python -m pip uninstall -y {project}"],
"build_command": [
"python -m pip install hatch hatch-vcs",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
],
"environment_type": "virtualenv",
"install_timeout": 600,
"show_commit_url": "https://github.com/holoviz/param/commit/",
// "pythons": ["3.8"],
"benchmark_dir": "benchmarks",
"env_dir": ".asv/env",
"results_dir": ".asv/results",
"html_dir": ".asv/html",
"hash_length": 8,
"build_cache_size": 2
}
param-2.1.1/benchmarks/benchmarks/ 0000775 0000000 0000000 00000000000 14636363363 0017062 5 ustar 00root root 0000000 0000000 param-2.1.1/benchmarks/benchmarks/__init__.py 0000664 0000000 0000000 00000000000 14636363363 0021161 0 ustar 00root root 0000000 0000000 param-2.1.1/benchmarks/benchmarks/benchmarks.py 0000664 0000000 0000000 00000044453 14636363363 0021563 0 ustar 00root root 0000000 0000000 # Write the benchmarking functions here.
# See "Writing benchmarks" in the asv docs for more information.
import param
class ImportSuite:
def timeraw_import_param(self):
return """
import param
"""
class ParameterSuite:
def time_instantiation(self):
param.Parameter()
class ParameterizedSuite:
def time_class_bare(self):
class P(param.Parameterized): pass
def time_class_with_1_parameter(self):
class P(param.Parameterized):
x0 = param.Parameter()
def time_class_with_10_parameter(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
def time_class_with_100_parameter(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
x10 = param.Parameter()
x11 = param.Parameter()
x12 = param.Parameter()
x13 = param.Parameter()
x14 = param.Parameter()
x15 = param.Parameter()
x16 = param.Parameter()
x17 = param.Parameter()
x18 = param.Parameter()
x19 = param.Parameter()
x20 = param.Parameter()
x21 = param.Parameter()
x22 = param.Parameter()
x23 = param.Parameter()
x24 = param.Parameter()
x25 = param.Parameter()
x26 = param.Parameter()
x27 = param.Parameter()
x28 = param.Parameter()
x29 = param.Parameter()
x30 = param.Parameter()
x31 = param.Parameter()
x32 = param.Parameter()
x33 = param.Parameter()
x34 = param.Parameter()
x35 = param.Parameter()
x36 = param.Parameter()
x37 = param.Parameter()
x38 = param.Parameter()
x39 = param.Parameter()
x40 = param.Parameter()
x41 = param.Parameter()
x42 = param.Parameter()
x43 = param.Parameter()
x44 = param.Parameter()
x45 = param.Parameter()
x46 = param.Parameter()
x47 = param.Parameter()
x48 = param.Parameter()
x49 = param.Parameter()
x50 = param.Parameter()
x51 = param.Parameter()
x52 = param.Parameter()
x53 = param.Parameter()
x54 = param.Parameter()
x55 = param.Parameter()
x56 = param.Parameter()
x57 = param.Parameter()
x58 = param.Parameter()
x59 = param.Parameter()
x60 = param.Parameter()
x61 = param.Parameter()
x62 = param.Parameter()
x63 = param.Parameter()
x64 = param.Parameter()
x65 = param.Parameter()
x66 = param.Parameter()
x67 = param.Parameter()
x68 = param.Parameter()
x69 = param.Parameter()
x70 = param.Parameter()
x71 = param.Parameter()
x72 = param.Parameter()
x73 = param.Parameter()
x74 = param.Parameter()
x75 = param.Parameter()
x76 = param.Parameter()
x77 = param.Parameter()
x78 = param.Parameter()
x79 = param.Parameter()
x80 = param.Parameter()
x81 = param.Parameter()
x82 = param.Parameter()
x83 = param.Parameter()
x84 = param.Parameter()
x85 = param.Parameter()
x86 = param.Parameter()
x87 = param.Parameter()
x88 = param.Parameter()
x89 = param.Parameter()
x90 = param.Parameter()
x91 = param.Parameter()
x92 = param.Parameter()
x93 = param.Parameter()
x94 = param.Parameter()
x95 = param.Parameter()
x96 = param.Parameter()
x97 = param.Parameter()
x98 = param.Parameter()
x99 = param.Parameter()
class ParameterizedInstantiateSuite:
def setup(self):
class P1(param.Parameterized):
x0 = param.Parameter()
class P10(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
class P100(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
x10 = param.Parameter()
x11 = param.Parameter()
x12 = param.Parameter()
x13 = param.Parameter()
x14 = param.Parameter()
x15 = param.Parameter()
x16 = param.Parameter()
x17 = param.Parameter()
x18 = param.Parameter()
x19 = param.Parameter()
x20 = param.Parameter()
x21 = param.Parameter()
x22 = param.Parameter()
x23 = param.Parameter()
x24 = param.Parameter()
x25 = param.Parameter()
x26 = param.Parameter()
x27 = param.Parameter()
x28 = param.Parameter()
x29 = param.Parameter()
x30 = param.Parameter()
x31 = param.Parameter()
x32 = param.Parameter()
x33 = param.Parameter()
x34 = param.Parameter()
x35 = param.Parameter()
x36 = param.Parameter()
x37 = param.Parameter()
x38 = param.Parameter()
x39 = param.Parameter()
x40 = param.Parameter()
x41 = param.Parameter()
x42 = param.Parameter()
x43 = param.Parameter()
x44 = param.Parameter()
x45 = param.Parameter()
x46 = param.Parameter()
x47 = param.Parameter()
x48 = param.Parameter()
x49 = param.Parameter()
x50 = param.Parameter()
x51 = param.Parameter()
x52 = param.Parameter()
x53 = param.Parameter()
x54 = param.Parameter()
x55 = param.Parameter()
x56 = param.Parameter()
x57 = param.Parameter()
x58 = param.Parameter()
x59 = param.Parameter()
x60 = param.Parameter()
x61 = param.Parameter()
x62 = param.Parameter()
x63 = param.Parameter()
x64 = param.Parameter()
x65 = param.Parameter()
x66 = param.Parameter()
x67 = param.Parameter()
x68 = param.Parameter()
x69 = param.Parameter()
x70 = param.Parameter()
x71 = param.Parameter()
x72 = param.Parameter()
x73 = param.Parameter()
x74 = param.Parameter()
x75 = param.Parameter()
x76 = param.Parameter()
x77 = param.Parameter()
x78 = param.Parameter()
x79 = param.Parameter()
x80 = param.Parameter()
x81 = param.Parameter()
x82 = param.Parameter()
x83 = param.Parameter()
x84 = param.Parameter()
x85 = param.Parameter()
x86 = param.Parameter()
x87 = param.Parameter()
x88 = param.Parameter()
x89 = param.Parameter()
x90 = param.Parameter()
x91 = param.Parameter()
x92 = param.Parameter()
x93 = param.Parameter()
x94 = param.Parameter()
x95 = param.Parameter()
x96 = param.Parameter()
x97 = param.Parameter()
x98 = param.Parameter()
x99 = param.Parameter()
self.P1 = P1
self.P10 = P10
self.P100 = P100
def time_1_parameters(self):
self.P1()
def time_10_parameters(self):
self.P10()
def time_100_parameters(self):
self.P100()
class ParameterizedParamAccessSuite:
def setup(self):
class P1(param.Parameterized):
x0 = param.Parameter()
self.P1 = P1
self.p1 = P1()
def time_class(self):
self.P1.param
def time_instance(self):
self.p1.param
class ParameterizedParamContainsSuite:
def setup(self):
class P1(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
self.P1 = P1
self.p1 = P1()
def time_class(self):
'x5' in self.P1.param
def time_instance(self):
'x5' in self.p1.param
class ParameterizedSetattrSuite:
def setup(self):
class P1(param.Parameterized):
x0 = param.Parameter()
self.P1 = P1
self.p1 = P1(x0=0)
def time_class(self):
self.P1.x0 = 1
def time_instance(self):
self.p1.x0 = 1
class ParameterizedDependsSuite:
def time_declarative_1_parameter(self):
class P(param.Parameterized):
x0 = param.Parameter()
@param.depends('x0')
def foo0(self): pass
def time_watch_1_parameter(self):
class P(param.Parameterized):
x0 = param.Parameter()
@param.depends('x0', watch=True)
def foo0(self): pass
def time_declarative_10_parameters_separate_cb(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0')
def foo0(self): pass
@param.depends('x1')
def foo1(self): pass
@param.depends('x2')
def foo2(self): pass
@param.depends('x3')
def foo3(self): pass
@param.depends('x4')
def foo4(self): pass
@param.depends('x5')
def foo5(self): pass
@param.depends('x6')
def foo6(self): pass
@param.depends('x7')
def foo7(self): pass
@param.depends('x8')
def foo8(self): pass
@param.depends('x9')
def foo9(self): pass
def time_declarative_10_parameters_shared_cb(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9')
def foo(self): pass
def time_watch_10_parameters_separate_cb(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', watch=True)
def foo0(self): pass
@param.depends('x1', watch=True)
def foo1(self): pass
@param.depends('x2', watch=True)
def foo2(self): pass
@param.depends('x3', watch=True)
def foo3(self): pass
@param.depends('x4', watch=True)
def foo4(self): pass
@param.depends('x5', watch=True)
def foo5(self): pass
@param.depends('x6', watch=True)
def foo6(self): pass
@param.depends('x7', watch=True)
def foo7(self): pass
@param.depends('x8', watch=True)
def foo8(self): pass
@param.depends('x9', watch=True)
def foo9(self): pass
def time_watch_10_parameters_shared_cb(self):
class P(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', watch=True)
def foo(self): pass
class ParameterizedDependsInstantiateSuite:
def setup(self):
class P1Declarative(param.Parameterized):
x0 = param.Parameter()
@param.depends('x0')
def foo0(self): pass
class P1Watch(param.Parameterized):
x0 = param.Parameter()
@param.depends('x0', watch=True)
def foo0(self): pass
class P10DeclarativeSeparate(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0')
def foo0(self): pass
@param.depends('x1')
def foo1(self): pass
@param.depends('x2')
def foo2(self): pass
@param.depends('x3')
def foo3(self): pass
@param.depends('x4')
def foo4(self): pass
@param.depends('x5')
def foo5(self): pass
@param.depends('x6')
def foo6(self): pass
@param.depends('x7')
def foo7(self): pass
@param.depends('x8')
def foo8(self): pass
@param.depends('x9')
def foo9(self): pass
class P10DeclarativeShared(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9')
def foo(self): pass
class P10WatchSeparate(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', watch=True)
def foo0(self): pass
@param.depends('x1', watch=True)
def foo1(self): pass
@param.depends('x2', watch=True)
def foo2(self): pass
@param.depends('x3', watch=True)
def foo3(self): pass
@param.depends('x4', watch=True)
def foo4(self): pass
@param.depends('x5', watch=True)
def foo5(self): pass
@param.depends('x6', watch=True)
def foo6(self): pass
@param.depends('x7', watch=True)
def foo7(self): pass
@param.depends('x8', watch=True)
def foo8(self): pass
@param.depends('x9', watch=True)
def foo9(self): pass
class P10WatchShared(param.Parameterized):
x0 = param.Parameter()
x1 = param.Parameter()
x2 = param.Parameter()
x3 = param.Parameter()
x4 = param.Parameter()
x5 = param.Parameter()
x6 = param.Parameter()
x7 = param.Parameter()
x8 = param.Parameter()
x9 = param.Parameter()
@param.depends('x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', watch=True)
def foo(self): pass
self.P1Declarative = P1Declarative
self.P1Watch = P1Watch
self.P10DeclarativeSeparate = P10DeclarativeSeparate
self.P10DeclarativeShared = P10DeclarativeShared
self.P10WatchSeparate = P10WatchSeparate
self.P10WatchShared = P10WatchShared
def time_declarative_1_parameter(self):
self.P1Declarative()
def time_watch_1_parameter(self):
self.P1Watch()
def time_declarative_10_parameters_separate_cb(self):
self.P10DeclarativeSeparate()
def time_declarative_10_parameters_shared_cb(self):
self.P10DeclarativeShared()
def time_watch_10_parameters_separate_cb(self):
self.P10WatchSeparate()
def time_watch_10_parameters_shared_cb(self):
self.P10WatchShared()
class WatcherSuite:
def setup(self):
class P(param.Parameterized):
x0 = param.Parameter(0)
@param.depends('x0', watch=True)
def foo0(self): pass
self.p = P()
def time_trigger(self):
self.p.x0 += 1
param-2.1.1/binder/ 0000775 0000000 0000000 00000000000 14636363363 0014073 5 ustar 00root root 0000000 0000000 param-2.1.1/binder/environment.yml 0000664 0000000 0000000 00000000167 14636363363 0017166 0 ustar 00root root 0000000 0000000 name: param
channels:
- pyviz
- defaults
dependencies:
- python=3.9.7
- aiohttp=3.7.4
- panel=0.12.4
- pip
param-2.1.1/binder/postBuild 0000664 0000000 0000000 00000000050 14636363363 0015756 0 ustar 00root root 0000000 0000000 pip uninstall param --yes
pip install .
param-2.1.1/conda.recipe/ 0000775 0000000 0000000 00000000000 14636363363 0015162 5 ustar 00root root 0000000 0000000 param-2.1.1/conda.recipe/meta.yaml 0000664 0000000 0000000 00000002102 14636363363 0016767 0 ustar 00root root 0000000 0000000 {% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set buildsystem = pyproject['build-system'] %}
{% set project = pyproject['project'] %}
{% set name = project['name'] %}
{% set version = VERSION %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
path: ..
build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv
requirements:
build:
- python {{ project['requires-python'] }}
- pip
{% for dep in buildsystem['requires'] %}
- {{ dep }}
{% endfor %}
run:
- python {{ project['requires-python'] }}
test:
requires:
{% for dep in project['optional-dependencies']['tests'] %}
- {{ dep }}
{% endfor %}
source_files:
- pyproject.toml
- tests
imports:
- param
- numbergen
commands:
- python -c "import param; ver = param.__version__; assert ver != '0.0.0' and ver != 'unknown'"
- pytest tests
about:
home: {{ project['urls']['Homepage'] }}
summary: {{ project['description'] }}
license: {{ project['license']['text'] }}
license_file: LICENSE.txt
param-2.1.1/doc/ 0000775 0000000 0000000 00000000000 14636363363 0013375 5 ustar 00root root 0000000 0000000 param-2.1.1/doc/Promo.ipynb 0000664 0000000 0000000 00000026233 14636363363 0015542 0 ustar 00root root 0000000 0000000 {
"cells": [
{
"cell_type": "markdown",
"id": "6f716cf0",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "markdown",
"id": "fbaa7540",
"metadata": {},
"source": [
"# Introduction"
]
},
{
"cell_type": "markdown",
"id": "cddd48c6",
"metadata": {},
"source": [
"**Param is a library providing Parameters:**
\n",
"
![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
"