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
58 changes: 23 additions & 35 deletions recipes/numojo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![logo](./image.jpeg)

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![Mojo](https://img.shields.io/badge/mojo-%3E%3D1.0.0-orange.svg)](https://www.modular.com/mojo)
[![Mojo](https://img.shields.io/badge/mojo-1.1.0-orange.svg)](https://www.modular.com/mojo)

NuMojo is a library for numerical computing in Mojo 🔥, similar to NumPy in Python.

Expand Down Expand Up @@ -55,6 +55,7 @@ Routines and objects:
- Array creation routines (`numojo.creation`)
- Array manipulation routines (`numojo.manipulation`)
- Input and output (`numojo.io`)
- Bitwise operations (`numojo.bitwise`)
- Linear algebra (`numojo.linalg`)
- Logic functions (`numojo.logic`)
- Mathematical functions (`numojo.math`)
Expand All @@ -65,6 +66,7 @@ Routines and objects:
- Random sampling (`numojo.random`)
- Sorting and searching (`numojo.sorting`, `numojo.searching`)
- Statistics (`numojo.statistics`)
- Set operations (`numojo.setops`)
- etc...

Please find all the available functions and objects [here](docs/user-guide/features.md). A living roadmap is maintained in [docs/user-guide/roadmap.md](docs/user-guide/roadmap.md).
Expand Down Expand Up @@ -160,46 +162,26 @@ Add the following to your existing `pixi.toml`:

```toml
[workspace]
channels = [
"https://conda.modular.com/max",
"conda-forge",
"https://repo.prefix.dev/modular-community",
]
platforms = ["osx-arm64", "linux-64"]
preview = ["pixi-build"]

[package]
name = "your_project_name"
version = "0.1.0"

[package.build]
backend = {name = "pixi-build-mojo", version = "0.*"}

[package.build.config.pkg]
name = "your_package_name"

[package.host-dependencies]
mojo = "==1.0.0"
max-core = "==26.5.0"

[package.build-dependencies]
mojo = "==1.0.0"
max-core = "==26.5.0"
numojo = { git = "https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo", branch = "main"}

[package.run-dependencies]
mojo = "==1.0.0"
max-core = "==26.5.0"
numojo = { git = "https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo", branch = "main"}

[dependencies]
mojo = ">=1.0.0, <1.1.0"
max-core = ">=26.5.0,<27"
numojo = { git = "https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo", branch = "main"}
numojo = { git = "https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo", tag = "v0.11.0" }
```

Then run:
```bash
pixi install
```

**Branch Selection:**
- **`main` branch**: Provides the latest stable release. Currently NuMojo v0.10.0, compatible with Mojo >=1.0.0, <1.1.0. For earlier NuMojo versions, use Method 2.
- **`pre-x.y` branches**: Active development branch for the next release. Note that this branch receives frequent updates and may have breaking changes in features and syntax.
`numojo` brings its compatible `mojo` and `max-core` versions into the environment through its package runtime dependencies. The MAX and conda-forge channels are still required so Pixi can resolve those transitive packages.

For development snapshots, replace `tag = "v0.11.0"` with `branch = "main"` or the appropriate `pre-x.y` branch.

The package will be automatically available in your Pixi environment, and VSCode LSP will provide intelligent code hints.

Expand All @@ -211,10 +193,15 @@ Add the following to your `pixi.toml` file:

```toml
[workspace]
channels = ["https://repo.prefix.dev/modular-community"]
channels = [
"https://conda.modular.com/max",
"conda-forge",
"https://repo.prefix.dev/modular-community",
]
platforms = ["osx-arm64", "linux-64"]

[dependencies]
numojo = "=0.10.0"
numojo = "=0.11.0"
```

Then run:
Expand All @@ -226,6 +213,7 @@ pixi install

| NuMojo Version | Required Mojo Version |
| -------------- | --------------------- |
| v0.11.0 | ==1.1.0 |
| v0.10.0 | ==1.0.0 |
| v0.9.0 | ==26.2 |
| v0.8.0 | ==25.7 |
Expand All @@ -235,7 +223,7 @@ pixi install

### Method 3: Build Standalone Package

This method creates a portable `numojo.mojopkg` file that you can use across multiple projects, perfect for offline development or hermetic builds.
This method creates a portable `numojo.mojoc` package that you can use across multiple projects, perfect for offline development or hermetic builds.

1. Clone the repository:
```bash
Expand All @@ -248,7 +236,7 @@ This method creates a portable `numojo.mojopkg` file that you can use across mul
pixi run package
```

3. Copy `numojo.mojopkg` to your project directory or add its parent directory to your include paths.
3. Copy `numojo.mojoc` to your project directory or add its parent directory to your include paths.

### Method 4: Direct Source Integration

Expand Down
13 changes: 9 additions & 4 deletions recipes/numojo/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
context:
version: "0.10.0"
mojo_version: ">=1.0.0,<1.1.0"
max_core_version: ">=26.5.0,<26.6"
version: "0.11.0"
mojo_version: ">=1.1.0,<1.2.0"
max_core_version: ">=26.6.0,<26.7"

package:
name: "numojo"
version: ${{ version }}

source:
- git: https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo.git
rev: 515fb2856f0ecf3d2740a34d958fe168183e1129
rev: 26b48742c57cba745415c8482e00176fc99aaa62

build:
number: 0
Expand Down Expand Up @@ -40,6 +40,11 @@ extra:
- shivasankarka
- MadAlex1997
- forFudan
- mmenendezg
- josiahls
- birgerbr
- carolinefrasca
- soraros
- sandstromviktor
- durnwalder
- sauterp
Loading