-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Pixi for development / CI and hatchling for build system #6182
Conversation
b40b746
to
f5d0e56
Compare
Hatchling in [tool.hatch.build.hooks.custom]
path = "scripts/hatch_build.py" The hatchling scriptfrom __future__ import annotations
import typing as t
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class BuildHook(BuildHookInterface):
"""The hatch jupyter builder build hook."""
PLUGIN_NAME = "install"
def initialize(self, version: str, _: dict[str, t.Any]) -> None:
"""Initialize the plugin."""
if self.target_name not in ["wheel", "sdist"]:
return
if version == "editable":
... |
doit test_examples | ||
- name: codecov | ||
pixi run -e ${{ matrix.environment }} test-example --cov=./holoviews --cov-report=xml --cov-append | ||
- uses: codecov/codecov-action@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not strictly related to the Pixi, but I noticed that it was failing. So I updated it to use the official workflow.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like IPython is not part of the sys.module
at the import time, but I'm not entirely sure why.
|
||
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, this will give some obscure error when running conda-build.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it easier to get the file.
@@ -0,0 +1,13 @@ | |||
import bokeh.sampledata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from bash to python because there was no need for it to be a bash file...
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved those to the install task.
@@ -90,153 +83,111 @@ 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"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to using Mac-arm64 as this is both faster and the newer architecture.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Just for playing around with it.
Task issue: holoviz-dev/holoviz_tasks#34
TODO (non-exhaustive)
tsdownsample
can only be added to certain archpixi.toml
or put it intopyproject.toml
(no strong opinions)pixi run
orpixi shell
post-install
which makes sense for this.sdist
using force-include withhatchling>=1.19
pypa/hatch#1305.A rough sketch of how I see things (aka. not something set in stone)
Current output of
pixi info
: