Skip to content

Commit 5e94b21

Browse files
authored
Update README.md
1 parent f3df92d commit 5e94b21

File tree

1 file changed

+53
-65
lines changed

1 file changed

+53
-65
lines changed

light-curve/README.md

Lines changed: 53 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,33 @@ conda install -c conda-forge light-curve-python
2020
features.
2121
We also provide `light-curve-python` package which is just an "alias" to the main `light-curve[full]` package.
2222

23-
Minimum supported Python version is 3.9.
24-
We provide binary CPython wheels via [PyPi](https://pypi.org/project/light-curve/)
25-
and [Anaconda](https://anaconda.org) for a number of platforms and architectures.
26-
We also provide binary wheels for stable CPython ABI, so the package is guaranteed to work with all future
27-
CPython3
28-
versions.
23+
The minimum supported Python version is 3.9.
24+
We provide binary CPython distributions via [PyPI](https://pypi.org/project/light-curve/)
25+
and [Anaconda](https://anaconda.org/conda-forge/light-curve-python) for various platforms and architectures.
26+
On PyPI, we provide binary wheels for the stable CPython ABI, ensuring compatibility with future
27+
CPython 3 versions.
2928

3029
### Support matrix
3130

3231
| Arch \ OS | Linux glibc 2.17+ | Linux musl 1.1+ | macOS | Windows https://github.com/light-curve/light-curve-python/issues/186 |
3332
|-------------|-------------------|--------------------------------|-----------------------|----------------------------------------------------------------------|
3433
| **x86-64** | PyPI (MKL), conda | PyPI (MKL) | PyPI macOS 13+, conda | PyPI, conda (both no Ceres, no GSL) |
3534
| **i686** | src | src || not tested |
36-
| **aarch64** | wheel | wheel | PyPI macOS 14+, conda | not tested |
35+
| **aarch64** | PyPI | PyPI | PyPI macOS 14+, conda | not tested |
3736
| **ppc64le** | src | not tested (no Rust toolchain) |||
3837

39-
- "PyPI" / "conda": binary wheel/package is available on pypi.org / anaconda.org, local building
40-
is not required for the platform, the only pre-requirement is a recent `pip` version or
41-
conda. For Linux x86-64 PyPI's wheel we provide binary wheels built with Intel MKL
42-
for better periodogram performance, which is not a default build option. For Windows x86-64
43-
we provide wheel with no Ceres and no GSL support, which is not a default build option.
44-
- "src": the package is confirmed to be built and pass unit tests locally, but testing and package
45-
building is not supported by CI. See ["Build from source"] section bellow for the details.
46-
- "not tested": building from the source code is not tested, please report us building status via
47-
issue/PR/email.
38+
- **PyPI / conda**: A binary wheel or package is available on pypi.org or anaconda.org.
39+
Local building is not required for the platform; the only prerequisite is a recent version of
40+
`pip` or `conda`. For Linux x86-64, PyPI binary wheels are built with Intel MKL
41+
for improved periodogram performance, which is not a default build option.
42+
For Windows x86-64, all distributions exclude Ceres and GSL support, which is also not a default build option.
43+
- **src**: The package has been confirmed to build and pass unit tests locally,
44+
but testing and package building are not supported by CI.
45+
See the ["Build from source"] section below for details.
46+
Please open an issue or pull request if you encounter any problems building
47+
the package or would like us to distribute it for these platforms.
48+
- **not tested**: Building from source has not been tested.
49+
Please report build status via issue, PR, or email.
4850

4951
macOS wheels require relatively new OS versions, please open an issue if you require support of older Macs,
5052
see https://github.com/light-curve/light-curve-python/issues/376 for the details.
@@ -55,8 +57,8 @@ please feel free to open an issue if you need any of them.
5557

5658
[Free-threaded Python](https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython) is supported when built from source.
5759
No pre-built distributions are provided so far, please comment on these issues if you need them: [PyPI binary wheel issue](https://github.com/light-curve/light-curve-python/issues/500), [conda-forge package issue](https://github.com/conda-forge/light-curve-python-feedstock/issues/11).
58-
Notably, for expensive features, the performance with the GIL-enabled interpreter and the `.many()` method provided by the package is on par with the free-threaded interpreter and Python threads for parallelism.
59-
However, for inexpensive computations, `.many()` still significantly reduces the overhead caused by the Rust–Python interaction and shows better performance.
60+
Notably, for expensive features, the performance with the GIL-enabled interpreter and the `.many()` method provided by the feature extractors is on par with the free-threaded interpreter and Python threads for parallelism.
61+
However, for inexpensive feature extractors, `.many()` still significantly reduces the overhead caused by the Rust–Python interaction and shows better performance.
6062

6163
See [bellow](#build-from-source) for the details on how to build the package from the source code.
6264

@@ -666,10 +668,9 @@ assert_array_equal(actual, desired)
666668

667669
### Prepare environment
668670

669-
Install Rust toolchain and Python 3.9+.
671+
Install a recent Rust toolchain and Python 3.9 or higher.
670672
It is recommended to use [`rustup`](https://rustup.rs/) to install Rust toolchain and update it with
671-
`rustup update`
672-
periodically.
673+
`rustup update` periodically.
673674

674675
Clone the code, create and activate a virtual environment.
675676

@@ -680,7 +681,7 @@ python3 -m venv venv
680681
source venv/bin/activate
681682
```
682683

683-
Install the package in editable mode (see more details about building from
684+
Install the package in the editable mode (see more details about building from
684685
source [bellow](#build-from-source)).
685686

686687
```bash
@@ -691,15 +692,13 @@ maturin develop --extras=dev
691692
```
692693

693694
Next time you can just run `source venv/bin/activate` to activate the environment and `maturin develop` to
694-
rebuild
695-
Rust code if changed.
696-
You don't need to reinstall the package if you change Python code.
697-
You also don't need to add `--extras=dev` next time, it is needed only to install development dependencies.
695+
rebuild Rust code if changed.
696+
You don't need to re-run `maturin develop` the package if you change Python code only.
697+
You also don't need to add `--extras=dev` next time, it is needed only to install the development dependencies.
698698

699699
You are also encouraged to install `pre-commit` hooks to keep the codebase clean.
700700
You can get it with `pip` (see the [documentation](https://pre-commit.com/#install) for other ways), and then
701-
install
702-
the hooks with
701+
install the hooks with
703702

704703
```bash
705704
pre-commit install
@@ -733,39 +732,32 @@ recommended to use `--no-default-features` to avoid building unnecessary depende
733732

734733
The following features are available:
735734

736-
- `abi3` (default) - enables CPython ABI3 compatibility, turn it off for other interpreters or if you believe
737-
that code
738-
would be faster without it (our benchmarks show that it is not the case).
739-
- `ceres-source` (default) - enables [Ceres solver](http://ceres-solver.org/) support, and builds it from
740-
sources. You
741-
need C++ compiler and cmake available on your system. Known to not work on Windows. It is used as an
742-
optional
743-
optimization alrotithm for `BazinFit` and `VillarFit`.
744-
- `ceres-system` - enables Ceres solver support, but links with a dynamic library. You need to have a
745-
compatible version
746-
of Ceres installed on your system.
747-
- `fftw-source` (default) - enables [FFTW](http://www.fftw.org/) support, and builds it from sources. You need
748-
C
749-
compiler available on your system. Note that at least one of `fftw-*` features must be activated.
750-
- `fftw-system` - enables FFTW support, but links with a dynamic library. You need to have a compatible
751-
version of FFTW
752-
installed on your system.
753-
- `fftw-mkl` - enables FFTW support with Intel MKL backend. Intel MKL will be downloaded automatically during
754-
the build.
755-
Highly recommended for Intel CPUs to achieve up to 2x faster "fast" periodogram calculation.
756-
- `gsl` (default) - enables [GNU scientific library](https://www.gnu.org/software/gsl/) support. You need a
757-
compatible
758-
version of GSL installed on your system. It is used as an optional optimization algorithm for `BazinFit` and
759-
`VillarFit`.
735+
- `abi3` (default) - enables CPython ABI3 compatibility. Turn it off for other interpreters or if you believe
736+
the code would be faster without it (our benchmarks show that is not the case). ABI3 is not supported
737+
by free-threaded CPython or PyPy.
738+
- `ceres-source` (default) - enables [Ceres solver](http://ceres-solver.org/) support and builds it from
739+
source. You need a C++ compiler and CMake available on your system. Known to not work on Windows.
740+
It is used as an optional optimization algorithm for `BazinFit` and `VillarFit`.
741+
- `ceres-system` - enables Ceres solver support but links with a dynamic library. You need to have a
742+
compatible version of Ceres installed on your system.
743+
- `fftw-source` (default) - enables [FFTW](http://www.fftw.org/) support and builds it from source. You need
744+
a C compiler available on your system. Note that at least one of the `fftw-*` features must be activated.
745+
- `fftw-system` - enables FFTW support but links with a dynamic library. You need to have a compatible
746+
version of FFTW installed on your system.
747+
- `fftw-mkl` - enables FFTW support with the Intel MKL backend. Intel MKL will be downloaded automatically
748+
during the build. Highly recommended for Intel CPUs to achieve up to 2× faster "fast" periodogram
749+
calculations.
750+
- `gsl` (default) - enables [GNU Scientific Library](https://www.gnu.org/software/gsl/) support. You need a
751+
compatible version of GSL installed on your system. It is used as an optional optimization algorithm
752+
for `BazinFit` and `VillarFit`.
760753
- `mimalloc` (default) - enables [mimalloc](https://github.com/microsoft/mimalloc) memory allocator support.
761-
Our
762-
benchmarks show up to 2x speedup for some simple features, but it may lead to larger memory consumption.
754+
Our benchmarks show up to a 2× speedup for some cheap features, but it may lead to larger memory usage.
763755

764756
#### Build with maturin
765757

766758
You can build the package with `maturin` (a Python package for building and publishing Rust crates as Python
767759
packages).
768-
This example shows how to build the package with minimal dependencies.
760+
This example shows how to build the package with the minimal system dependencies.
769761

770762
```bash
771763
python -mpip install maturin
@@ -780,8 +772,8 @@ to enable FFTW (builds from vendored sources), ABI3 compatibility, and mimalloc
780772

781773
#### Build with `build`
782774

783-
You can also build the package with `build` (a Python package for building and installing Python packages from
784-
source).
775+
You can also build the package with `build`, a Python package for building and installing Python packages from
776+
source.
785777

786778
```bash
787779
python -mpip install build
@@ -791,8 +783,7 @@ MATURIN_PEP517_ARGS="--locked --no-default-features --features=abi3,fftw-source,
791783
#### Build with cibuildwheel
792784

793785
`ciwbuildwheel` is a project that builds wheels for Python packages on CI servers, we use it to build wheels
794-
with
795-
GitHub Actions.
786+
with GitHub Actions.
796787
You can use it locally to build wheels on your platform (change platform identifier to one
797788
from [the list of supported](https://cibuildwheel.pypa.io/en/stable/options/#build-skip):
798789

@@ -804,13 +795,11 @@ python -m cibuildwheel --only=cp38-manylinux_x86_64
804795
Please notice that we use different Cargo feature set for different platforms, which is defined in
805796
`pyproject.toml`.
806797
You can build Windows wheels on Windows, Linux wheels on any platform with Docker installed (Qemu may be
807-
needed for
808-
cross-architecture builds), and macOS wheels on macOS.
798+
needed for cross-architecture builds), and macOS wheels on macOS.
809799
On Windows and macOS some additional dependencies will be installed automatically, please check
810800
the [cibuildwheel documentation](https://cibuildwheel.pypa.io/) and `pyproject.toml` for details.
811801
Also, macOS builds require `MACOSX_DEPLOYMENT_TARGET` to be set to the current version of macOS, because
812-
dependent
813-
libraries installed from `homebrew` are built with this target:
802+
dependent libraries installed from `homebrew` are built with this target:
814803

815804
```bash
816805
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | awk -F '.' '{print $1"."0}')
@@ -819,8 +808,7 @@ unset MACOSX_DEPLOYMENT_TARGET
819808
```
820809

821810
Since we use ABI3 compatibility, you can build wheels for a single Python version (currently 3.9+) and they
822-
will work
823-
with any later version of CPython.
811+
will work with any later version of CPython.
824812

825813
## Citation
826814

0 commit comments

Comments
 (0)