Skip to content

Commit 8f1e4da

Browse files
authored
Merge pull request #452 from raysect/development
V0.9.0 Release
2 parents 20f5725 + e371445 commit 8f1e4da

File tree

502 files changed

+4972
-2042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

502 files changed

+4972
-2042
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
numpy-version: ["oldest-supported-numpy", "numpy"]
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
14+
numpy-version: ["numpy"]
15+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Install Python dependencies
24-
run: python -m pip install --prefer-binary setuptools "cython>=0.28,<3.0" "matplotlib>=3,<4" ${{ matrix.numpy-version }}
24+
run: python -m pip install --prefer-binary meson-python meson ninja setuptools setuptools-scm "cython>=3.1" "matplotlib>=3,<4" ${{ matrix.numpy-version }}
2525
- name: Build and install Raysect
26-
run: dev/build.sh
26+
run: dev/install_editable.sh
2727
- name: Run tests
2828
run: dev/test.sh

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ __pycache__/
66
# C extensions
77
*.so
88
*.c
9+
910
# Distribution / packaging
11+
/build/
1012
.Python
1113
env/
12-
build/
14+
venv/
1315
develop-eggs/
1416
dist/
1517
downloads/
@@ -58,4 +60,5 @@ docs/build/
5860
# PyBuilder
5961
target/
6062

61-
63+
# setuptools-scm
64+
raysect/_version.py

CHANGELOG.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
Raysect Changelog
22
=================
33

4+
Release 0.9.0 (TBD)
5+
-------------------
6+
7+
Build changes:
8+
* The legacy setuptools build system has been replaced with meson-python.
9+
- The dev/build.sh and dev/clean.sh scripts have been updated to work with the new build system.
10+
- A meson.build generator script is provided to automate the discovery of pyx, pxd,py and data files. Please see dev/generate_meson_files.py.
11+
- When installed in editable mode, any modified pyx files will automatically trigger a rebuild when python attempts to import from the package. Please be aware that (as with the previous build system) changes to pxd files will require a clean rebuild of the project.
12+
- A dev/install_editable.sh script is provided to simplify the installation of the package in editable mode with verbose build output enabled.
13+
- Meson-python performs the build out of the project folder, so the project source folders will no longer be polluted with build artefacts.
14+
- Cython build annotations are now always enabled, the annotation files can be found in the build folder under the build artefacts folder associated with each so file (*.so.p folder).
15+
* The codebase has been migrated to Cython 3.
16+
- This migration was made possible due to the contributions of Koyo Munechika (@munechika-koyo).
17+
18+
Python support:
19+
* Raysect now requires Python v3.9 and above.
20+
- From version v0.9.0 Raysect is dropping support for Python versions older than v3.9.
21+
- Users of older versions of Python should remain using Raysect v0.8.1 and plan for a migration to v0.9.0+.
22+
23+
API changes:
24+
* Corrected spelling of all classes, methods and functions where "targeted" was incorrectly spelt "targetted".
25+
26+
New:
27+
* Added a torus primitive (contribute by Koyo Munechika).
28+
29+
430
Release 0.8.1 (12 Feb 2023)
531
---------------------------
632

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2021, Dr Alex Meakins, Raysect Project
1+
Copyright (c) 2014-2025, Dr Alex Meakins, Raysect Project
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

MANIFEST.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1341346.svg)](https://doi.org/10.5281/zenodo.1341346)
2-
[![Build Status](https://travis-ci.com/raysect/source.svg?branch=master)](https://travis-ci.com/raysect/source)
32

43
<a name="logo"/>
54
<a href="https://www.raysect.org/" target="_blank">

demos/materials/modifiers/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def emission_function(self, point, direction, spectrum, world, ray, primitive, t
1818
wvl_range = spectrum.min_wavelength - spectrum.max_wavelength
1919
shift = 2 * (spectrum.wavelengths - wvl_centre) / wvl_range
2020
radius = sqrt(point.x**2 + point.y**2)
21-
spectrum.samples += cos((shift + 5) * radius)**4
21+
spectrum.samples[:] += cos((shift + 5) * radius)**4
2222
return spectrum
2323

2424

demos/materials/volume.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def emission_function(self, point, direction, spectrum, world, ray, primitive, t
2020
wvl_range = spectrum.min_wavelength - spectrum.max_wavelength
2121
shift = 2 * (spectrum.wavelengths - wvl_centre) / wvl_range
2222
radius = sqrt(point.x**2 + point.y**2)
23-
spectrum.samples += cos((shift + 5) * radius)**4
23+
spectrum.samples[:] += cos((shift + 5) * radius)**4
2424
return spectrum
2525

2626

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import matplotlib.pyplot as plt
33
from math import atan2, sqrt, degrees
44

5-
from raysect.core.math import Point3D, TargettedHemisphereSampler, TargettedSphereSampler
5+
from raysect.core.math import Point3D, TargetedHemisphereSampler, TargetedSphereSampler
66

77

88
def display_samples(samples, title):
@@ -34,8 +34,8 @@ def display_samples(samples, title):
3434
observation_point = Point3D(0, 0, 0)
3535

3636
# generate samplers
37-
hemisphere = TargettedHemisphereSampler(targets)
38-
sphere = TargettedSphereSampler(targets)
37+
hemisphere = TargetedHemisphereSampler(targets)
38+
sphere = TargetedSphereSampler(targets)
3939

4040
# sample for origin point and point at (0, 0, -10)
4141
h_samples = hemisphere(observation_point, samples=samples)

demos/observers/cornell_box_cooke_triplet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from raysect.optical import World, Node, translate, rotate, Point3D
55
from raysect.optical.material import Lambert, UniformSurfaceEmitter, AbsorbingSurface, Checkerboard
66
from raysect.optical.library import *
7-
from raysect.optical.observer import TargettedCCDArray
7+
from raysect.optical.observer import TargetedCCDArray
88
from raysect.optical.observer import RGBPipeline2D, BayerPipeline2D, PowerPipeline2D
99
from raysect.optical.observer import RGBAdaptiveSampler2D
1010
from raysect.core.math import mm
@@ -184,9 +184,9 @@
184184
rgb = RGBPipeline2D(display_unsaturated_fraction=0.96, name="sRGB")
185185
sampler = RGBAdaptiveSampler2D(rgb, ratio=10, fraction=0.2, min_samples=1000, cutoff=0.01)
186186

187-
# CCD targetting all rays at last lens element for speed
188-
ccd = TargettedCCDArray(
189-
targetted_path_prob=1.0, targets=[l3],
187+
# CCD targeting all rays at last lens element for speed
188+
ccd = TargetedCCDArray(
189+
targeted_path_prob=1.0, targets=[l3],
190190
width=mm(35), pixels=(512, 512),
191191
parent=image_plane, transform=translate(0, 0, 0)*rotate(0, 0, 180),
192192
pipelines=[rgb]

0 commit comments

Comments
 (0)