diff --git a/.github/workflows/bleeding-edge.yaml b/.github/workflows/bleeding-edge.yaml index ab39e778..cb1899d0 100644 --- a/.github/workflows/bleeding-edge.yaml +++ b/.github/workflows/bleeding-edge.yaml @@ -36,15 +36,11 @@ jobs: with: python-version: 3.11-dev - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools wheel - python -m pip install git+https://github.com/yt-project/yt.git - - name: Build run: | - python -m pip install ".[test]" + python -m pip install --upgrade pip + python -m pip install ".[experimental]" + python -m pip install -r tests/requirements.txt - name: Run Tests run: pytest --color=yes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f258155..cacebbef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Build run: | - python3 -m pip install -U pip - python3 -m pip install ".[test]" + python -m pip install --upgrade pip + python -m pip install . + python -m pip install -r tests/requirements.txt + - name: run tests run: pytest --color=yes @@ -55,8 +58,9 @@ jobs: - name: Build run: | - python3 -m pip install --upgrade pip - python3 -m pip install .[typecheck] + python -m pip install --upgrade pip + python -m pip install . + python -m pip install mypy==0.971 - name: Run mypy run: mypy yt_idefix diff --git a/README.md b/README.md index d7150cbc..6e424691 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,21 @@ [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) A maturing yt frontend for Idefix and Pluto (vtk), packaged as an extension for yt. -This frontend is a candidate for integration in the core yt code base. ## Installation ```shell -pip install yt_idefix +python -m pip install yt_idefix ``` + +Alternatively, use +```shell +python -m pip install "yt_idefix[experimental]" +``` +to require the bleeding-edge version of `yt`, enabling all experimental +features, including unreleased ones. Note that this route takes longer (a couple +minutes) to install because it will compile yt from source. See [Experimental features](#experimental-features). + ## Usage After importing `yt` itself, make sure to activate the extension @@ -26,23 +34,31 @@ import yt import yt_idefix ``` -Now `yt.load` will be able to read Pluto/Idefix `.vtk` output files, as well as Idefix `.dmp` dump files. +Now `yt.load` will be able to read Pluto/Idefix `.vtk` output files, as well as +Idefix `.dmp` dump files. + +## Experimental features -## Strecthed grids support +### Seamless plugin support +*new in yt 4.2 (unreleased) + yt_idefix 0.16* -### yt_idefix 0.12.0 and newer +`yt>=4.2` supports automatic +loading for external frontends, i.e., the extra import line (`import yt_idefix`) +will not be needed with this version. -version 0.12.0 brings experimental *native* support for streched grids, which is under -active development upstream, in yt itself. +This feature is marked as experimental until yt 4.2.0 is released. -Slices should now work seamlessly even with older versions of yt, however -yt 4.1 will be required to perform projections correctly. +### Strecthed grids support +*new in yt 4.1 + yt_idefix 0.12* +- `yt_idefix>=0.12.0` natively supports `yt.SlicePlot` for streched grids +- `yt>=4.1.0` is required from `yt.ProjectionPlot` -**update**: yt_idefix 0.13.3 is the last release allowing yt 4.0.x, yt_idefix 0.14.0 requires yt 4.1 +Streched grids support is considered experimental as of yt 4.1 -### yt_idefix 0.11 and older (deprecated) +## Deprecated features +*will be removed in yt_idefix 1.0* yt_idefix ships a specialized loader function for datasets with streched grids `yt_idefix.load_stretched`. This function is only provided as a workaround 4.0.x limitations, but it's highly limited itself: diff --git a/pyproject.toml b/pyproject.toml index 31ecb911..47b3a1a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "yt_idefix" -version = "0.15.0" +version = "0.16.0" description = "An extension module for yt, adding a frontend for Idefix" authors = [ { name = "C.M.T. Robert" }, @@ -37,19 +37,21 @@ dependencies = [ "yt>=4.1.0", ] +[project.optional-dependencies] +experimental = [ + "yt@git+https://github.com/yt-project/yt.git#egg=main", +] + +[project.entry-points."yt.frontends"] +# these entry points require yt 4.2 (unreleased at the time of writing) +# they are included early for testing purposes +IdefixDmpkDataset = "yt_idefix.api:IdefixDmpDataset" +IdefixVtkDataset = "yt_idefix.api:IdefixVtkDataset" +PlutoVtkDataset = "yt_idefix.api:PlutoVtkDataset" + [project.license] text = "GPL-3.0" -[project.optional-dependencies] -test = [ - "more-itertools>=8.4", - "pyaml>=17.10.0", - "pytest>=7.0", - "unyt>=2.9.2", -] -typecheck = [ - "mypy==0.971", -] [project.readme] file = "README.md" diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 00000000..9ed88937 --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,4 @@ +more-itertools>=8.4 +pyaml>=17.10.0 +pytest>=7.0 +unyt>=2.9.2 diff --git a/yt_idefix/__init__.py b/yt_idefix/__init__.py index 11e2bcb4..63ad8e62 100644 --- a/yt_idefix/__init__.py +++ b/yt_idefix/__init__.py @@ -2,4 +2,4 @@ # immediately after `import yt.extensions.idefix` from yt_idefix.api import * -__version__ = "0.15.0" +__version__ = "0.16.0"