Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release 0.1.1 (TBD)
-------------------

New:
* Support Cython 3 stable release
* Support Cherab 1.5

Bug fixes:
* Fix numpy array setflags() bug in UnstructGrid2D pickling. (#4)
* Fix incorrect transposition in get_cylindrical_velocity_interpolators(). (#5)
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ This module enables the creation of Cherab plasma objects and Raysect meshes fro

This add-on module requires IMAS to be installed with Python interface.

On ITER SDCC load the respective modules:
On ITER SDCC load the IMAS module:

```bash
module load IMAS
module load Raysect/0.7.1-intel-2020b
```
and then install with:

```bash
pip install cherab==1.4.0 --user
pip install -U cython==3.0a5 --user
pip install <path-to-cherab-imas> --user
pip install git@https://github.com/cherab/imas --user
```
Alternatively, install to a virtual environment:

```bash
python -m venv /path/to/cherab_virtual_environment
source /path/to/cherab_virtual_environment/bin/activate
pip install git@https://github.com/cherab/imas
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython==3.0a5", "raysect==0.8.1", "cherab==1.5.0.dev1"]
requires = ["setuptools", "oldest-supported-numpy", "cython~=3.0", "raysect==0.8.1.*", "cherab==1.5.*"]
build-backend="setuptools.build_meta"
22 changes: 19 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from collections import defaultdict
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
import sys
import numpy
import os
import os.path as path
from pathlib import Path

force = False
profile = False
Expand Down Expand Up @@ -33,12 +35,22 @@
if profile:
cython_directives["profile"] = True

# Include demos in a separate directory in the distribution as data_files.
demo_parent_path = Path("share/cherab/demos/imas")
data_files = defaultdict(list)
demos_source = Path("demos")
for item in demos_source.rglob("*"):
if item.is_file():
install_dir = demo_parent_path / item.parent.relative_to(demos_source)
data_files[str(install_dir)].append(str(item))
data_files = list(data_files.items())

with open("README.md") as f:
long_description = f.read()

setup(
name="cherab-imas",
version="0.1.0",
version="0.1.1",
namespace_packages=['cherab'],
description="Cherab spectroscopy framework: IMAS submodule",
classifiers=[
Expand All @@ -59,7 +71,11 @@
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
include_package_data=True,
install_requires=["raysect==0.8.1", "cherab==1.5.0.dev1"],
package_data={"": [
"**/*.pyx", "**/*.pxd", # Needed to build Cython extensions.
],
},
data_files=data_files,
install_requires=["raysect==0.8.1.*", "cherab==1.5.*"],
ext_modules=cythonize(extensions, force=force, compiler_directives=cython_directives),
)