diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 519e489f61..2e7770ca24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,6 @@ defaults: shell: bash -el {0} env: - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" PYTHON_VERSION: "3.11" PACKAGE: "holoviews" @@ -30,31 +29,28 @@ jobs: steps: - run: echo "All builds have finished, have been approved, and ready to publish" + pixi_lock: + name: Pixi lock + runs-on: ubuntu-latest + steps: + - uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi + conda_build: name: Build Conda + needs: [pixi_lock] runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - fetch-depth: "100" - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - - name: conda setup - run: | - # pyct is for running setup.py - conda install -y conda-build build pyct -c pyviz/label/dev + environments: "build" + download-data: false - name: conda build - run: | - source ./scripts/build_conda.sh - echo "CONDA_FILE="$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV + run: pixi run -e build build-conda - uses: actions/upload-artifact@v4 if: always() with: name: conda - path: ${{ env.CONDA_FILE }} + path: dist/*tar.bz2 if-no-files-found: error conda_publish: @@ -88,21 +84,15 @@ jobs: pip_build: name: Build PyPI + needs: [pixi_lock] runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "100" - - name: Fetch unshallow - run: git fetch --prune --tags --unshallow -f - - uses: actions/setup-python@v5 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Install build - run: | - python -m pip install build + environments: "build" + download-data: false - name: Build package - run: python -m build . + run: pixi run -e build build-pip - uses: actions/upload-artifact@v4 if: always() with: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 578df685c2..d3d8a607f2 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,8 +21,15 @@ on: - cron: "0 14 * * SUN" jobs: + pixi_lock: + name: Pixi lock + runs-on: ubuntu-latest + steps: + - uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi + build_docs: name: Documentation + needs: [pixi_lock] runs-on: "ubuntu-latest" timeout-minutes: 120 defaults: @@ -39,35 +46,16 @@ jobs: PANEL_EMBED: "true" PANEL_EMBED_JSON: "true" PANEL_EMBED_JSON_PREFIX: "json" + DASK_DATAFRAME__QUERY_PLANNING: false steps: - - uses: holoviz-dev/holoviz_tasks/install@v0 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi with: - name: Documentation - python-version: "3.10" - channel-priority: flexible - channels: pyviz/label/dev,conda-forge,nodefaults - envs: "-o doc" - cache: true - conda-update: true + environments: docs - name: Set output id: vars run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Download data - run: | - conda activate test-environment - bash scripts/download_data.sh - - name: generate rst - run: | - conda activate test-environment - nbsite generate-rst --org holoviz --project-name holoviews - - name: refmanual - run: | - conda activate test-environment - python ./doc/generate_modules.py holoviews -d ./doc/reference_manual -n holoviews -e tests - - name: build docs - run: | - conda activate test-environment - nbsite build --what=html --output=builtdocs --org holoviz --project-name holoviews + - name: Build documentation + run: pixi run -e docs docs-build - name: upload dev if: | (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') || diff --git a/.github/workflows/nightly_lock.yaml b/.github/workflows/nightly_lock.yaml new file mode 100644 index 0000000000..9d3379af2b --- /dev/null +++ b/.github/workflows/nightly_lock.yaml @@ -0,0 +1,14 @@ +name: nightly_lock +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +jobs: + pixi_lock: + name: Pixi lock + runs-on: ubuntu-latest + steps: + - uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi + + # TODO: Upload the lock-file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 57e3226018..ef11a3ada8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -33,17 +33,10 @@ defaults: shell: bash -el {0} env: - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" DISPLAY: ":99.0" PYTHONIOENCODING: "utf-8" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OMP_NUM_THREADS: 1 - OPENBLAS_NUM_THREADS: 1 - MKL_NUM_THREADS: 1 - VECLIB_MAXIMUM_THREADS: 1 - NUMEXPR_NUM_THREADS: 1 - NUMBA_NUM_THREADS: 1 - PYDEVD_DISABLE_FILE_VALIDATION: 1 + DASK_DATAFRAME__QUERY_PLANNING: false jobs: pre_commit: @@ -61,7 +54,7 @@ jobs: code_change: ${{ steps.filter.outputs.code }} matrix: ${{ env.MATRIX }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request' - name: Check for code changes uses: dorny/paths-filter@v3 @@ -71,7 +64,7 @@ jobs: code: - 'holoviews/**' - 'examples/**' - - 'setup.py' + - 'pixi.toml' - 'pyproject.toml' - '.github/workflows/test.yaml' - name: Set matrix option @@ -90,16 +83,16 @@ jobs: if: env.MATRIX_OPTION == 'default' run: | MATRIX=$(jq -nsc '{ - "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "python-version": ["3.9", "3.12"] + "os": ["ubuntu-latest", "macos-14", "windows-latest"], + "environment": ["test-39", "test-312"] }') echo "MATRIX=$MATRIX" >> $GITHUB_ENV - name: Set test matrix with 'full' option if: env.MATRIX_OPTION == 'full' run: | MATRIX=$(jq -nsc '{ - "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "python-version": ["3.9", "3.10", "3.11", "3.12"] + "os": ["ubuntu-latest", "macos-14", "windows-latest"], + "environment": ["test-39", "test-310", "test311", "test312"] }') echo "MATRIX=$MATRIX" >> $GITHUB_ENV - name: Set test matrix with 'downstream' option @@ -107,136 +100,94 @@ jobs: run: | MATRIX=$(jq -nsc '{ "os": ["ubuntu-latest"], - "python-version": ["3.11"] + "environment": ["test-311"] }') echo "MATRIX=$MATRIX" >> $GITHUB_ENV + pixi_lock: + name: Pixi lock + runs-on: ubuntu-latest + steps: + - uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi + with: + cache: ${{ github.event.inputs.cache == 'true' || github.event.inputs.cache == '' }} + unit_test_suite: - name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, setup] + name: unit:${{ matrix.environment }}:${{ matrix.os }} + needs: [pre_commit, setup, pixi_lock] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: ${{ fromJson(needs.setup.outputs.matrix) }} timeout-minutes: 120 - env: - DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} unit tests" - PYTHON_VERSION: ${{ matrix.python-version }} steps: - - uses: holoviz-dev/holoviz_tasks/install@v0 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi if: needs.setup.outputs.code_change == 'true' with: - name: unit_test_suite - python-version: ${{ matrix.python-version }} - channel-priority: flexible - channels: pyviz/label/dev,conda-forge,nodefaults - envs: "-o flakes -o tests -o examples_tests -o tests_ci" - cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} - conda-update: true - id: install + environments: ${{ matrix.environment }} - name: Check packages latest version if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - python scripts/check_latest_packages.py bokeh panel param datashader - - name: Download data - if: needs.setup.outputs.code_change == 'true' - run: | - conda activate test-environment - bash scripts/download_data.sh - - name: doit test_unit + pixi run -e ${{ matrix.environment }} check-latest-packages bokeh panel param datashader + - name: Test Unit if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - doit test_unit - - name: test examples + pixi run -e ${{ matrix.environment }} test-unit --cov=./holoviews --cov-report=xml + - name: Test Examples if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - doit test_examples - - name: codecov + pixi run -e ${{ matrix.environment }} test-example + - uses: codecov/codecov-action@v4 if: needs.setup.outputs.code_change == 'true' - run: | - conda activate test-environment - codecov + with: + token: ${{ secrets.CODECOV_TOKEN }} ui_test_suite: - name: UI tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, setup] + name: ui:${{ matrix.environment }}:${{ matrix.os }} + needs: [pre_commit, setup, pixi_lock] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.9"] + environment: ["test-ui"] timeout-minutes: 60 env: - DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} UI tests" PANEL_LOG_LEVEL: info - # Without this env var `doit env_create ...` uses by default - # the `pyviz` channel, except that we don't want to configure - # it as one of the sources. - PYCTDEV_SELF_CHANNEL: "pyviz/label/dev" steps: - - uses: holoviz-dev/holoviz_tasks/install@v0 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi if: needs.setup.outputs.code_change == 'true' with: - name: ui_test_suite - python-version: ${{ matrix.python-version }} - channels: pyviz/label/dev,conda-forge,nodefaults - envs: "-o recommended -o tests -o build -o tests_ci" - cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} - playwright: true - id: install - - name: doit test_ui + environments: ${{ matrix.environment }} + - name: Test UI if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - doit test_ui - - name: Upload coverage to Codecov + pixi run -e ${{ matrix.environment }} test-ui --cov=./holoviews --cov-report=xml + - uses: codecov/codecov-action@v4 if: needs.setup.outputs.code_change == 'true' - uses: codecov/codecov-action@v3 with: - files: ./coverage.xml - flags: ui-tests - fail_ci_if_error: false # optional (default = false) + token: ${{ secrets.CODECOV_TOKEN }} core_test_suite: - name: Core tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} - needs: [pre_commit, setup] + name: core:${{ matrix.environment }}:${{ matrix.os }} + needs: [pre_commit, setup, pixi_lock] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.12"] + environment: ["test-core"] timeout-minutes: 120 - env: - DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} core tests" - PYTHON_VERSION: ${{ matrix.python-version }} steps: - - uses: holoviz-dev/holoviz_tasks/install@v0 + - uses: holoviz-dev/holoviz_tasks/pixi_install@pixi if: needs.setup.outputs.code_change == 'true' with: - name: core_test_suite - python-version: ${{ matrix.python-version }} - # channel-priority: strict - channels: pyviz/label/dev,conda-forge,nodefaults - envs: "-o tests_core -o tests_ci" - cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} - id: install - - name: Download data - if: needs.setup.outputs.code_change == 'true' - run: | - conda activate test-environment - bash scripts/download_data.sh + environments: ${{ matrix.environment }} - name: Check packages latest version if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - python scripts/check_latest_packages.py numpy pandas bokeh panel param - - name: doit test_unit + pixi run -e ${{ matrix.environment }} check-latest-packages numpy pandas bokeh panel param + - name: Test Unit if: needs.setup.outputs.code_change == 'true' run: | - conda activate test-environment - pytest holoviews + pixi run -e ${{ matrix.environment }} test-unit diff --git a/.gitignore b/.gitignore index a75807cd77..ae3111fef6 100644 --- a/.gitignore +++ b/.gitignore @@ -20,13 +20,14 @@ .ipynb_checkpoints .coverage .pytest_cache +.pixi +holoviews/_version.py /release /doc/Tutorials-WIP/*.ipynb .idea .vscode holoviews.rc -/examples/assets/ ghostdriver.log holoviews/.version .dir-locals.el diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 00ee15d10f..0000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,13 +0,0 @@ -include README.rst -include LICENSE.txt -include CHANGELOG.md -include holoviews/.version -include holoviews/ipython/*.html -include holoviews/plotting/mpl/*.mplstyle -include holoviews/tests/ipython/notebooks/*.ipynb -global-exclude *.py[co] -global-exclude __pycache__ -global-exclude *~ -global-exclude *.ipynb_checkpoints/* -graft examples -graft holoviews/examples diff --git a/conda.recipe/README.md b/conda.recipe/README.md deleted file mode 100644 index 35638017b0..0000000000 --- a/conda.recipe/README.md +++ /dev/null @@ -1,14 +0,0 @@ -## Release Procedure - -- Ensure all tests pass. - -- Tag commit a PEP440 style tag (starting with the prefix 'v') and push to github - -```bash -git tag -a vx.x.x -m 'Version x.x.x' -git push --tags -``` - -Example tags might include v1.9.3 v1.10.0a1 or v1.11.3b3 - -- Build conda packages diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml deleted file mode 100644 index 087efe849e..0000000000 --- a/conda.recipe/meta.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{% set sdata = load_setup_py_data(setup_file="../setup.py", from_recipe_dir=True) %} - -package: - name: {{ sdata['name'] }} - version: {{ VERSION }} - -source: - url: ../dist/{{ sdata['name'] }}-{{ VERSION }}-py3-none-any.whl - -build: - noarch: python - script: {{ PYTHON }} -m pip install -vv {{ sdata['name'] }}-{{ VERSION }}-py3-none-any.whl - entry_points: - {% for group,epoints in sdata.get("entry_points",{}).items() %} - {% for entry_point in epoints %} - - {{ entry_point }} - {% endfor %} - {% endfor %} - -requirements: - build: - - python {{ sdata['python_requires'] }} - {% for dep in sdata['extras_require']['build'] %} - - {{ dep }} - {% endfor %} - run: - - python {{ sdata['python_requires'] }} - {% for dep in sdata.get('install_requires',{}) %} - - {{ dep }} - {% endfor %} - {% for dep in sdata['extras_require']['recommended'] %} - - {{ dep }} - {% endfor %} - -test: - imports: - - {{ sdata['name'] }} - commands: - - pip check - requires: - - pip - -about: - home: https://holoviews.org - summary: Stop plotting your data - annotate your data and let it visualize itself. - license: BSD 3-Clause diff --git a/doc/conf.py b/doc/conf.py index 63fe74c028..1c2cb85a52 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -61,6 +61,8 @@ 'nbsite.analytics', ] +myst_enable_extensions = ["colon_fence", "deflist"] + nbsite_analytics = { 'goatcounter_holoviz': True, } diff --git a/doc/developer_guide/index.md b/doc/developer_guide/index.md new file mode 100644 index 0000000000..c25212997e --- /dev/null +++ b/doc/developer_guide/index.md @@ -0,0 +1,190 @@ +# Setting up a development environment + +The HoloViews library is a project that provides a wide range of data interfaces and an extensible set of plotting backends, which means the development and testing process involves a broad set of libraries. + +This guide describes how to install and configure development environments. + +If you have any problems with the steps here, please reach out in the `dev` channel on [Discord](https://discord.gg/rb6gPXbdAr) or on [Discourse](https://discourse.holoviz.org/). + +## Preliminaries + +### Basic understanding of how to contribute to Open Source + +If this is your first open-source contribution, please study one +or more of the below resources. + +- [How to Get Started with Contributing to Open Source | Video](https://youtu.be/RGd5cOXpCQw) +- [Contributing to Open-Source Projects as a New Python Developer | Video](https://youtu.be/jTTf4oLkvaM) +- [How to Contribute to an Open Source Python Project | Blog post](https://www.educative.io/blog/contribue-open-source-python-project) + +### Git + +The HoloViews source code is stored in a [Git](https://git-scm.com) source control repository. The first step to working on HoloViews is to install Git onto your system. There are different ways to do this, depending on whether you use Windows, Mac, or Linux. + +To install Git on any platform, refer to the [Installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) section of the [Pro Git Book](https://git-scm.com/book/en/v2). + +To contribute to HoloViews, you will also need [Github account](https://github.com/join) and knowledge of the [_fork and pull request workflow_](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). + +### Pixi + +Developing all aspects of HoloViews requires a wide range of packages in different environments. To make this more manageable, Pixi manages the developer experience. To install Pixi, follow [this guide](https://prefix.dev/docs/pixi/overview#installation). + +#### Glossary + +- Tasks: A task is what can be run with `pixi run `. Tasks can be anything from installing packages to running tests. +- Environments: An environment is a set of packages installed in a virtual environment. Each environment has a name; you can run tasks in a specific environment with the `-e` flag. For example, `pixi run -e test-core test-unit` will run the `test-unit` task in the `test-core` environment. +- Lock-file: A lock-file is a file that contains all the information about the environments. + +For more information, see the [Pixi documentation](https://pixi.sh/latest/). + +:::{admonition} Note +:class: info + +The first time you run `pixi`, it will create a `.pixi` directory in the source directory. This directory will contain all the files needed for the virtual environments. The `.pixi` directory can be large, so don't accidentally put it into a cloud-synced directory. +::: + +## Installing the Project + +### Cloning the Project + +The source code for the HoloViews project is hosted on [GitHub](https://github.com/holoviz/holoviews). The first thing you need to do is clone the repository. + +1. Go to [github.com/holoviz/holoviews](https://github.com/holoviz/holoviews) +2. [Fork the repository](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#forking-a-repository) +3. Run in your terminal: `git clone https://github.com//holoviews` + +The instructions for cloning above created a `holoviews` directory at your file system location. This `holoviews` directory is the _source checkout_ for the remainder of this document, and your current working directory is this directory. + +### Fetch tags from upstream + +The version number of the package depends on [`git tags`](https://git-scm.com/book/en/v2/Git-Basics-Tagging), so you need to fetch the tags from the upstream repository: + +```bash +git remote add upstream https://github.com/holoviz/holoviews.git +git fetch --tags upstream +git push --tags +``` + +## Start developing + +To start developing, run the following command + +```bash +pixi install +``` + +The first time you run it, it will create a `lock-file` with information for all available environments. This command will take a minute or so to run. When this is finished, it is possible to run the following command to download the data HoloViews tests and examples depend upon. + +```bash +pixi run download-data +``` + +### Editable install + +It can be advantageous to install the HoloViews in [editable mode](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs): + +```bash +pixi run install +``` + +:::{admonition} Note +:class: info + +Currently, this needs to be run for each environment. So, if you want to install in the `test-ui` environment, you can add `--environment` / `-e` to the command: + +```bash +pixi run -e test-ui install +``` + +::: + +## Linting + +HoloViews uses [pre-commit](https://pre-commit.com/) to apply linting to HoloViews code. Linting can be run for all the files with: + +```bash +pixi run lint +``` + +Linting can also be set up to run automatically with each commit; this is the recommended way because if linting is not passing, the [Continuous Integration](https://en.wikipedia.org/wiki/Continuous_integration) (CI) will also fail. + +```bash +pixi run lint-install +``` + +## Testing + +To help keep HoloViews maintainable, all Pull Requests (PR) with code changes should typically be accompanied by relevant tests. While exceptions may be made for specific circumstances, the default assumption should be that a Pull Request without tests will not be merged. + +There are three types of tasks and five environments related to tests. + +### Unit tests + +Unit tests are usually small tests executed with [pytest](https://docs.pytest.org). They can be found in `holoviews/tests/`. +Unit tests can be run with the `test-unit` task: + +```bash +pixi run test-unit +``` + +The task is available in the following environments: `test-39`, `test-310`, `test-311`, `test-312`, and `test-core`. Where the first ones have the same environments except for different Python versions, and `test-core` only has a core set of dependencies. + +If you haven't set the environment flag in the command, you need to select which one of the environments to use. + +### Example tests + +HoloViews's documentation consists mainly of Jupyter Notebooks. The example tests execute all the notebooks and fail if an error is raised. Example tests are possible thanks to [nbval](https://nbval.readthedocs.io/) and can be found in the `examples/` folder. +Example tests can be run with the following command: + +```bash +pixi run test-example +``` + +This task has the same environments as the unit tests except for `test-core`. + +### UI tests + +HoloViews provides web components that users can interact with through the browser. UI tests allow checking that these components get displayed as expected and that the backend <-> front-end bi-communication works correctly. UI tests are possible thanks to [Playwright](https://playwright.dev/python/). +The test can be found in the `holoviews/tests/ui/` folder. +UI tests can be run with the following task. This task is only available in the `test-ui` environment. The first time you run it, it will download the necessary browser files to run the tests in the Chrome browser. + +```bash +pixi run test-ui +``` + +## Documentation + +The documentation can be built with the command: + +```bash +pixi run docs-build +``` + +As HoloViews uses notebooks for much of the documentation, this will take significant time to run (around an hour). +If you want to run it locally, you can temporarily disable the gallery by setting the environment variable `export HV_DOC_GALLERY=False`. +You can also disable the reference gallery by setting the environment variable `export HV_DOC_REF_GALLERY=False`. + +A development version of HoloViews can be found [here](https://dev.holoviews.org/). You can ask a maintainer if they want to make a dev release for your PR, but there is no guarantee they will say yes. + +## Build + +HoloViews have to build tasks. One is for installing packages with Pip, and the other is for installing packages with Conda. + +```bash +pixi run build-pip +pixi run build-conda +``` + +## Continuous Integration + +Every push to the `main` branch or any PR branch on GitHub automatically triggers a test build with [GitHub Actions](https://github.com/features/actions). + +You can see the list of all current and previous builds at [this URL](https://github.com/holoviz/holoviews/actions) + +### Etiquette + +GitHub Actions provides free build workers for open-source projects. A few considerations will help you be considerate of others needing these limited resources: + +- Run the tests locally before opening or pushing to an opened PR. + +- Group commits to meaningful chunks of work before pushing to GitHub (i.e., don't push on every commit). diff --git a/doc/index.rst b/doc/index.rst index fdf3210fc9..74b7aa900d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -132,6 +132,7 @@ After you have successfully installed and configured HoloViews, please see `Gett User Guide Gallery Reference Gallery + Developer Guide Releases API FAQ diff --git a/dodo.py b/dodo.py deleted file mode 100644 index b68ffd1e3a..0000000000 --- a/dodo.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -if "PYCTDEV_ECOSYSTEM" not in os.environ: - os.environ["PYCTDEV_ECOSYSTEM"] = "conda" - -from pyctdev import * # noqa: api - - -def task_pip_on_conda(): - """Experimental: provide pip build env via conda""" - return {'actions':[ - # some ecosystem=pip build tools must be installed with conda when using conda... - 'conda install -y pip twine wheel rfc3986 keyring', - # ..and some are only available via conda-forge - 'conda install -y -c conda-forge tox virtualenv', - ]} diff --git a/holoviews/__init__.py b/holoviews/__init__.py index e3231dece9..1ca017cdf6 100644 --- a/holoviews/__init__.py +++ b/holoviews/__init__.py @@ -75,39 +75,47 @@ """ import os import sys +import warnings import param -__version__ = str(param.version.Version(fpath=__file__, archive_commit="$Format:%h$", - reponame="holoviews")) - -from . import util # noqa (API import) -from .core import archive, config # noqa (API import) -from .core.boundingregion import BoundingBox # noqa (API import) -from .core.dimension import Dimension # noqa (API import) -from .core.element import Element, Collator # noqa (API import) -from .core.layout import (Layout, NdLayout, Empty, # noqa (API import) - AdjointLayout) -from .core.ndmapping import NdMapping # noqa (API import) -from .core.options import (Options, Store, Cycle, # noqa (API import) - Palette, StoreOptions) -from .core.overlay import Overlay, NdOverlay # noqa (API import) -from .core.spaces import (HoloMap, Callable, DynamicMap, # noqa (API import) - GridSpace, GridMatrix) - -from .operation import Operation # noqa (API import) +from . import util # noqa (API import) +from .__version import __version__ +from .core import archive, config # noqa (API import) +from .core.boundingregion import BoundingBox # noqa (API import) +from .core.dimension import Dimension # noqa (API import) +from .core.element import Collator, Element # noqa (API import) +from .core.layout import AdjointLayout, Empty, Layout, NdLayout # noqa (API import) +from .core.ndmapping import NdMapping # noqa (API import) +from .core.options import ( # noqa (API import) + Cycle, + Options, + Palette, + Store, + StoreOptions, +) +from .core.overlay import NdOverlay, Overlay # noqa (API import) +from .core.spaces import ( # noqa (API import) + Callable, + DynamicMap, + GridMatrix, + GridSpace, + HoloMap, +) from .element import * from .element import __all__ as elements_list -from .selection import link_selections # noqa (API import) -from .util import (extension, renderer, output, opts, # noqa (API import) - render, save) -from .util.transform import dim # noqa (API import) -from .util.warnings import HoloviewsDeprecationWarning, HoloviewsUserWarning # noqa: F401 +from .operation import Operation # noqa (API import) +from .selection import link_selections # noqa (API import) +from .util import extension, opts, output, render, renderer, save # noqa (API import) from .util._versions import show_versions # noqa: F401 +from .util.transform import dim # noqa (API import) +from .util.warnings import ( # noqa: F401 + HoloviewsDeprecationWarning, + HoloviewsUserWarning, +) # Suppress warnings generated by NumPy in matplotlib # Expected to be fixed in next matplotlib release -import warnings warnings.filterwarnings("ignore", message="elementwise comparison failed; returning scalar instead") @@ -173,7 +181,7 @@ def help(obj, visualization=True, ansi=True, backend=None, pydoc.help(obj) -del os, rcfile, warnings +del os, sys, rcfile, warnings def __getattr__(name): if name == "annotate": diff --git a/holoviews/__version.py b/holoviews/__version.py new file mode 100644 index 0000000000..f01259f510 --- /dev/null +++ b/holoviews/__version.py @@ -0,0 +1,44 @@ +"""Define the package version. + +Called __version.py as setuptools_scm will create a _version.py +""" + +import os.path + +PACKAGE = "holoviews" + +try: + # For performance reasons on imports, avoid importing setuptools_scm + # if not in a .git folder + if os.path.exists(os.path.join(os.path.dirname(__file__), "..", ".git")): + # If setuptools_scm is installed (e.g. in a development environment with + # an editable install), then use it to determine the version dynamically. + from setuptools_scm import get_version + + # This will fail with LookupError if the package is not installed in + # editable mode or if Git is not installed. + __version__ = get_version(root="..", relative_to=__file__) + else: + raise FileNotFoundError +except (ImportError, LookupError, FileNotFoundError): + # As a fallback, use the version that is hard-coded in the file. + try: + # __version__ was added in _version in setuptools-scm 7.0.0, we rely on + # the hopefully stable version variable. + from ._version import version as __version__ + except (ModuleNotFoundError, ImportError): + # Either _version doesn't exist (ModuleNotFoundError) or version isn't + # in _version (ImportError). ModuleNotFoundError is a subclass of + # ImportError, let's be explicit anyway. + + # Try something else: + from importlib.metadata import PackageNotFoundError, version + + try: + __version__ = version(PACKAGE) + except PackageNotFoundError: + # The user is probably trying to run this without having installed + # the package. + __version__ = "0.0.0+unknown" + +__all__ = ("__version__",) diff --git a/holoviews/tests/util/test_utils.py b/holoviews/tests/util/test_utils.py index 9438f1856c..824031b131 100644 --- a/holoviews/tests/util/test_utils.py +++ b/holoviews/tests/util/test_utils.py @@ -5,7 +5,7 @@ from pyviz_comms import CommManager -from holoviews import Store, notebook_extension +from holoviews import Store from holoviews.core.options import OptionTree from holoviews.element.comparison import ComparisonTestCase from holoviews.plotting import bokeh, mpl @@ -26,6 +26,8 @@ class TestOutputUtil(ComparisonTestCase): def setUp(self): if notebook is None: raise SkipTest("Jupyter Notebook not available") + from holoviews.ipython import notebook_extension + notebook_extension(*BACKENDS) Store.current_backend = 'matplotlib' Store.renderers['matplotlib'] = mpl.MPLRenderer.instance() diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 0000000000..acb8bf5d9e --- /dev/null +++ b/pixi.toml @@ -0,0 +1,160 @@ +[project] +name = "holoviews" +channels = ["conda-forge", "pyviz/label/dev"] +platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"] + +[tasks] +check-latest-packages = 'python scripts/check_latest_packages.py' +download-data = 'python scripts/download_data.py' +install = 'python -m pip install --no-deps --disable-pip-version-check -e .' + +[environments] +test-39 = ["py39", "test-core", "test", "example", "test-example", "test-unit-task"] +test-310 = ["py310", "test-core", "test", "example", "test-example", "test-unit-task"] +test-311 = ["py311", "test-core", "test", "example", "test-example", "test-unit-task"] +test-312 = ["py312", "test-core", "test", "example", "test-example", "test-unit-task"] +test-ui = ["py312", "test-core", "test", "test-ui"] +test-core = ["py312", "test-core", "test-unit-task"] +docs = ["py311", "example", "doc"] +build = ["py311", "build"] +lint = ["py311", "lint"] + +[dependencies] +python = ">=3.9" +pip= "*" +param = ">=1.12.0,<3.0" +panel = ">=1.0" +pyviz_comms = ">=2.1" +colorcet = "*" +numpy = ">=1.0" +packaging = "*" +pandas = ">=0.20.0" +# Recommended +ipython = ">=5.4.0" +notebook = "*" +matplotlib-base = ">=3" +bokeh = ">=3.1" + +[feature.py39.dependencies] +python = "3.9.*" + +[feature.py310.dependencies] +python = "3.10.*" + +[feature.py311.dependencies] +python = "3.11.*" + +[feature.py312.dependencies] +python = "3.12.*" + +[feature.example.dependencies] +networkx = "*" +pillow = "*" +xarray = ">=0.10.4" +plotly = ">=4.0" +# dash >=1.16 +streamz = ">=0.5.0" +ffmpeg = "*" +cftime = "*" +netcdf4 = "*" +dask-core = "*" +scipy = "*" +shapely = "*" +scikit-image = "*" +pyarrow = "*" +pooch = "*" +datashader = ">=0.11.1" +notebook = ">=7.0" + +# ============================================= +# =================== TESTS =================== +# ============================================= +[feature.test-core.dependencies] +pytest = "*" +pytest-cov = "*" +pytest-github-actions-annotate-failures = "*" +pytest-rerunfailures = "*" +nbconvert = "*" +pillow = "*" +plotly = ">=4.0" +contourpy = "*" + +[feature.test-unit-task.tasks] +test-unit = 'pytest holoviews' # So it not showing up for UI tests + +[feature.test.dependencies] +dask-core = "*" +ibis-sqlite = "*" +xarray = ">=0.10.4" +networkx = "*" +shapely = "*" +ffmpeg = "*" +cftime = "*" +scipy = ">=1.10" # Python 3.9 + Windows downloads 1.9 +selenium = "*" +spatialpandas = "*" +datashader = ">=0.11.1" +xyzservices = "*" +# dash >=1.16 + +[feature.test.target.unix.dependencies] +tsdownsample = "*" # currently not available on Windows + +[feature.test-example.tasks] +test-example = 'pytest -n auto --dist loadscope --nbval-lax examples' + +[feature.test-example.dependencies] +nbval = "*" +pytest-xdist = "*" + +[feature.test-ui] +channels = ["conda-forge", "pyviz/label/dev", "microsoft"] + +[feature.test-ui.dependencies] +playwright = "*" +pytest-playwright = "*" + +[feature.test-ui.tasks] +install-ui = 'playwright install chromium' + +[feature.test-ui.tasks.test-ui] +cmd = 'pytest holoviews/tests/ui --ui --browser chromium' +depends_on = ["install-ui"] + +# ============================================= +# =================== DOCS ==================== +# ============================================= +[feature.doc.dependencies] +nbsite = ">=0.8.4,<0.9.0" +graphviz = "*" +pooch = "*" +selenium = "*" + +[feature.doc.tasks] +docs-generate-rst = 'nbsite generate-rst --org holoviz --project-name holoviews' +docs-refmanual = 'python ./doc/generate_modules.py holoviews -d ./doc/reference_manual -n holoviews -e tests' +docs-generate = 'nbsite build --what=html --output=builtdocs --org holoviz --project-name holoviews' + +[feature.doc.tasks.docs-build] +depends_on = ['docs-generate-rst', 'docs-refmanual', 'docs-generate'] + +# ============================================= +# ================== BUILD ==================== +# ============================================= +[feature.build.dependencies] +build = "*" +conda-build = "*" + +[feature.build.tasks] +build-conda = 'bash scripts/conda/build.sh' +build-pip = 'python -m build .' + +# ============================================= +# =================== lint ==================== +# ============================================= +[feature.lint.dependencies] +pre-commit = "*" + +[feature.lint.tasks] +lint = 'pre-commit run --all-files' +lint-install = 'pre-commit install' diff --git a/pyproject.toml b/pyproject.toml index 4338a5e691..1090553c9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,72 @@ [build-system] -requires = [ +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "holoviews" +dynamic = ["version"] +description = "A high-level plotting API for the PyData ecosystem built on HoloViews." +readme = "README.md" +license = { text = "BSD" } +requires-python = ">=3.9" +authors = [ + { name = "Jean-Luc Stevens", email = "developers@holoviz.org" }, + { name = "Philipp Rudiger", email = "developers@holoviz.org" }, +] +maintainers = [ + { name = "HoloViz developers", email = "developers@holoviz.org" }, +] +classifiers = [ + "License :: OSI Approved :: BSD License", + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Natural Language :: English", + "Framework :: Matplotlib", + "Topic :: Scientific/Engineering", + "Topic :: Software Development :: Libraries", +] +dependencies = [ "param >=1.12.0,<3.0", - "pyct >=0.4.4", - "setuptools >=30.3.0", + "numpy >=1.0", + "pyviz_comms >=2.1", + "panel >=1.0", + "colorcet", + "packaging", + "pandas >=0.20.0", ] +[project.urls] +Homepage = "https://holoviews.org" +Source = "http://github.com/holoviz/holoviews" +HoloViz = "https://holoviz.org/" + +[project.optional-dependencies] +recommended = ["ipython >=5.4.0", "notebook", "matplotlib >=3", "bokeh >=3.1"] + +[project.scripts] +holoviews = "holoviews.util.command:main" + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.targets.wheel] +include = ["holoviews"] + +[tool.hatch.build.targets.sdist] +include = ["holoviews", "CHANGELOG.md"] + +[tool.hatch.build.targets.sdist.force-include] +examples = "holoviews/examples" + +[tool.hatch.build.hooks.vcs] +version-file = "holoviews/_version.py" + [tool.pytest.ini_options] addopts = ["--strict-config", "--strict-markers", "--color=yes"] minversion = "7" @@ -51,10 +113,18 @@ filterwarnings = [ "ignore:Passing a (SingleBlockManager|BlockManager) to (Series|GeoSeries|DataFrame|GeoDataFrame) is deprecated:DeprecationWarning", # https://github.com/holoviz/spatialpandas/issues/137 # 2024-02 "ignore:The current Dask DataFrame implementation is deprecated:DeprecationWarning", # https://github.com/dask/dask/issues/10917 + # 2024-04 + "ignore:No data was collected:coverage.exceptions.CoverageWarning", # https://github.com/pytest-dev/pytest-cov/issues/627 ] [tool.coverage] run.concurrency = ["greenlet"] +omit = ["holoviews/__version.py"] +exclude_also = [ + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", + "if ._pyodide. in sys.modules:", +] [tool.ruff] fix = true diff --git a/scripts/build_conda.sh b/scripts/build_conda.sh deleted file mode 100755 index 4b47650355..0000000000 --- a/scripts/build_conda.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -git status - -export SETUPTOOLS_ENABLE_FEATURES="legacy-editable" -python -m build -w . - -git diff --exit-code - -VERSION=$(find dist -name "*.whl" -exec basename {} \; | cut -d- -f2) -export VERSION -conda build conda.recipe/ --no-anaconda-upload --no-verify diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh new file mode 100755 index 0000000000..277ca7196b --- /dev/null +++ b/scripts/conda/build.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +PACKAGE="holoviews" + +for file in dist/*.whl dist/*.tar.bz2; do + if [ -e "$file" ]; then + echo "dist folder already contains $(basename "$file"). Please delete it before running this script." + exit 1 + fi +done + +git diff --exit-code +python -m build . # Can add -w when this is solved: https://github.com/pypa/hatch/issues/1305 + +VERSION=$(find dist -name "*.whl" -exec basename {} \; | cut -d- -f2) +export VERSION +conda build scripts/conda/recipe --no-anaconda-upload --no-verify + +mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2" dist diff --git a/scripts/conda/recipe/meta.yaml b/scripts/conda/recipe/meta.yaml new file mode 100644 index 0000000000..ea83e2fd10 --- /dev/null +++ b/scripts/conda/recipe/meta.yaml @@ -0,0 +1,47 @@ +{% set pyproject = load_file_data('../../../pyproject.toml', from_recipe_dir=True) %} +{% set project = pyproject['project'] %} + +package: + name: {{ project["name"] }} + version: {{ VERSION }} + +source: + url: ../../../dist/{{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + +build: + noarch: python + script: {{ PYTHON }} -m pip install -vv {{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + entry_points: + {% for group,epoints in project.get("entry_points",{}).items() %} + {% for entry_point in epoints %} + - {{ entry_point }} + {% endfor %} + {% endfor %} + +requirements: + build: + - python {{ project['requires-python'] }} + {% for dep in pyproject['build-system']['requires'] %} + - {{ dep }} + {% endfor %} + run: + - python {{ project['requires-python'] }} + {% for dep in project.get('dependencies', []) %} + - {{ dep }} + {% endfor %} + {% for dep in project['optional-dependencies']['recommended'] %} + - {{ dep }} + {% endfor %} + +test: + imports: + - {{ project["name"] }} + commands: + - pip check + requires: + - pip + +about: + home: https://holoviews.org + summary: Stop plotting your data - annotate your data and let it visualize itself. + license: BSD 3-Clause diff --git a/scripts/download_data.py b/scripts/download_data.py new file mode 100644 index 0000000000..291c50ab83 --- /dev/null +++ b/scripts/download_data.py @@ -0,0 +1,13 @@ +import bokeh.sampledata + +bokeh.sampledata.download() + +try: + import pooch # noqa: F401 + import scipy # noqa: F401 + import xarray as xr +except ImportError: + pass +else: + xr.tutorial.open_dataset("air_temperature") + xr.tutorial.open_dataset("rasm") diff --git a/scripts/download_data.sh b/scripts/download_data.sh deleted file mode 100755 index 16754fee73..0000000000 --- a/scripts/download_data.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -euxo pipefail - -bokeh sampledata - -python -c " -try: - import pooch - import scipy - import xarray as xr -except ImportError: - pass -else: - xr.tutorial.open_dataset('air_temperature') - xr.tutorial.open_dataset('rasm') -" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ee80d48e0f..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[metadata] -license_files = LICENSE.txt - -[tool:pyctdev.conda] -namespace_map = - ibis-framework=ibis-sqlite - dask=dask-core - geoviews=geoviews-core - matplotlib=matplotlib-base diff --git a/setup.py b/setup.py deleted file mode 100644 index 0edb3fd2ad..0000000000 --- a/setup.py +++ /dev/null @@ -1,223 +0,0 @@ -#!/usr/bin/env python - -import json -import os -import shutil -import sys - -import pyct.build -from setuptools import find_packages, setup - -setup_args = {} -install_requires = [ - "param >=1.12.0,<3.0", - "numpy >=1.0", - "pyviz_comms >=2.1", - "panel >=1.0", - "colorcet", - "packaging", - "pandas >=0.20.0", -] - -extras_require = {} - -extras_require['lint'] = [ - 'ruff', - 'pre-commit', -] - -# Test requirements -extras_require['tests_core'] = [ - 'pytest', - 'pytest-cov', - 'pytest-xdist', - 'pytest-rerunfailures', - 'matplotlib >=3', - 'nbconvert', - 'bokeh >=3.1', - 'pillow', - 'plotly >=4.0', - 'ipython >=5.4.0', - 'contourpy', -] - -# Optional tests dependencies, i.e. one should be able -# to run and pass the test suite without installing any -# of those. -extras_require['tests'] = extras_require['tests_core'] + [ - 'dask', - 'ibis-framework', # Mapped to ibis-sqlite in setup.cfg for conda - 'xarray >=0.10.4', - 'networkx', - 'shapely', - 'ffmpeg', - 'cftime', - 'scipy >=1.10', # Python 3.9 + Windows downloads 1.9 - 'selenium', - 'spatialpandas', - 'datashader >=0.11.1', - 'dash >=1.16', - 'xyzservices >=2022.9.0', -] - -if os.name != "nt": - # Currently not available on Windows on conda-forge - extras_require['tests'] += ['tsdownsample'] - -extras_require['tests_ci'] = [ - 'codecov', - "pytest-github-actions-annotate-failures", -] - -extras_require['tests_gpu'] = extras_require['tests'] + [ - 'cudf', -] - -extras_require['tests_nb'] = ['nbval'] -extras_require['ui'] = ['playwright', 'pytest-playwright'] - -# Notebook dependencies -extras_require["notebook"] = ["ipython >=5.4.0", "notebook"] - -# IPython Notebook + pandas + matplotlib + bokeh -extras_require["recommended"] = extras_require["notebook"] + [ - "matplotlib >=3", - "bokeh >=3.1", -] - -# Requirements to run all examples -extras_require["examples"] = extras_require["recommended"] + [ - "networkx", - "pillow", - "xarray >=0.10.4", - "plotly >=4.0", - 'dash >=1.16', - "streamz >=0.5.0", - "ffmpeg", - "cftime", - "netcdf4", - "dask", - "scipy", - "shapely", - "scikit-image", - "pyarrow", - "pooch", - "datashader >=0.11.1", - "notebook >=7.0", -] - - -extras_require["examples_tests"] = extras_require["examples"] + extras_require['tests_nb'] - -# Not used in tox.ini or elsewhere, kept for backwards compatibility. -extras_require["unit_tests"] = extras_require["examples"] + extras_require["tests"] + extras_require['lint'] - -extras_require['doc'] = extras_require['examples'] + [ - 'nbsite >=0.8.4,<0.9.0', - 'myst-nb <1', - 'graphviz', - 'bokeh >=3.1', - 'pooch', - 'selenium', -] - -extras_require['all'] = sorted(set(sum(extras_require.values(), []))) - -extras_require["build"] = [ - "param >=1.7.0", - "setuptools >=30.3.0", - "pyct >=0.4.4", -] - -def get_setup_version(reponame): - """ - Helper to get the current version from either git describe or the - .version file (if available). - """ - basepath = os.path.split(__file__)[0] - version_file_path = os.path.join(basepath, reponame, ".version") - try: - from param import version - except ImportError: - version = None - if version is not None: - return version.Version.setup_version( - basepath, reponame, archive_commit="$Format:%h$" - ) - else: - print( - "WARNING: param>=1.6.0 unavailable. If you are installing a package, this warning can safely be ignored. If you are creating a package or otherwise operating in a git repository, you should install param>=1.6.0." - ) - return json.load(open(version_file_path))["version_string"] - - -setup_args.update( - dict( - name="holoviews", - version=get_setup_version("holoviews"), - python_requires=">=3.9", - install_requires=install_requires, - extras_require=extras_require, - description="Stop plotting your data - annotate your data and let it visualize itself.", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - author="Jean-Luc Stevens and Philipp Rudiger", - author_email="holoviews@gmail.com", - maintainer="HoloViz Developers", - maintainer_email="developers@pyviz.org", - platforms=["Windows", "Mac OS X", "Linux"], - license="BSD", - url="https://www.holoviews.org", - project_urls={ - "Source": "https://github.com/holoviz/holoviews", - }, - entry_points={"console_scripts": ["holoviews = holoviews.util.command:main"]}, - packages=find_packages(), - include_package_data=True, - classifiers=[ - "License :: OSI Approved :: BSD License", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Operating System :: OS Independent", - "Intended Audience :: Science/Research", - "Intended Audience :: Developers", - "Natural Language :: English", - "Framework :: Matplotlib", - "Topic :: Scientific/Engineering", - "Topic :: Software Development :: Libraries", - ], - ) -) - - -if __name__ == "__main__": - example_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), "holoviews/examples" - ) - - if "develop" not in sys.argv and "egg_info" not in sys.argv: - pyct.build.examples(example_path, __file__, force=True) - - if "install" in sys.argv: - header = "HOLOVIEWS INSTALLATION INFORMATION" - bars = "=" * len(header) - - extras = "\n".join("holoviews[%s]" % e for e in setup_args["extras_require"]) - - print(f"{bars}\n{header}\n{bars}") - - print("\nHoloViews supports the following installation types:\n") - print("%s\n" % extras) - print("Users should consider using one of these options.\n") - print("By default only a core installation is performed and ") - print("only the minimal set of dependencies are fetched.\n\n") - print("For more information please visit http://holoviews.org/install.html\n") - print(bars + "\n") - - setup(**setup_args) - - if os.path.isdir(example_path): - shutil.rmtree(example_path) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index b5a5876ed0..0000000000 --- a/tox.ini +++ /dev/null @@ -1,67 +0,0 @@ -# For use with pyct (https://github.com/pyviz/pyct), but just standard -# tox config (works with tox alone). - -[tox] -# python version test group extra envs extra commands -envlist = {py39,py310,py311,py312}-{unit,ui,examples,all_recommended,simple}-{default}-{dev,pkg} - -[_simple] -description = Install holoviews without any optional dependencies -deps = . -commands = python -c "import holoviews as hv; print(hv.__version__)" - -[_unit_core] -description = Run unit tests with coverage but no optional test dependency -deps = .[tests_core] -commands = pytest holoviews --cov=./holoviews - -[_unit] -description = Run unit tests with coverage and all the optional test dependencies -deps = .[tests] -commands = pytest holoviews --cov=./holoviews - -[_unit_gpu] -description = Run unit tests with coverage and all the optional test dependencies -deps = .[tests_gpu] -commands = pytest holoviews --cov=./holoviews - -[_ui] -description = Run UI tests -deps = .[tests, ui] -commands = pytest holoviews --cov=./holoviews --cov-report=xml --ui --browser chromium - -[_examples] -description = Test that default examples run -deps = .[examples_tests] -commands = pytest -n auto --dist loadscope --nbval-lax examples - -[_all_recommended] -description = Run all recommended tests -deps = .[tests, examples_tests] -commands = {[_unit]commands} - {[_examples]commands} - -[_pkg] -commands = holoviews --install-examples - -[testenv] -sitepackages = True -install_command = pip install --no-deps {opts} pytest {packages} - -changedir = {envtmpdir} - -commands = examples-pkg: {[_pkg]commands} - unit: {[_unit]commands} - unit_core: {[_unit_core]commands} - unit_gpu: {[_unit_gpu]commands} - ui: {[_ui]commands} - simple: {[_simple]commands} - examples: {[_examples]commands} - all_recommended: {[_all_recommended]commands} - -deps = unit: {[_unit]deps} - unit_core: {[_unit_core]deps} - unit_gpu: {[_unit_gpu]deps} - ui: {[_ui]commands} - examples: {[_examples]deps} - all_recommended: {[_all_recommended]deps}