Skip to content

Conversation

@forfudan
Copy link
Collaborator

@forfudan forfudan commented Mar 8, 2025

Merge the commit on hotfix from main to pre-0.7

This pull request includes several changes to the `mojoproject.toml`
file and the `numojo` package, focusing on improving the build process,
testing, and formatting functionalities. Additionally, there are updates
to the handling of print options in the `numojo` package.

### Improvements to build and testing process:
*
[`mojoproject.toml`](diffhunk://#diff-1b0ef62120bccf4c05a76e60e13fe686f33eb92d5897b3f05e0c3f8d737fc5c0L19-R27):
Updated the `package` task to include copying the package to the tests
folder and modified the `test` task to test the built package.
*
[`mojoproject.toml`](diffhunk://#diff-1b0ef62120bccf4c05a76e60e13fe686f33eb92d5897b3f05e0c3f8d737fc5c0L43-R44):
Simplified the `final` task to run format and test commands, and updated
the `f` alias to run the `final` task.

### Dependency updates:
*
[`mojoproject.toml`](diffhunk://#diff-1b0ef62120bccf4c05a76e60e13fe686f33eb92d5897b3f05e0c3f8d737fc5c0L53-R53):
Updated the `max` dependency version to `25.1.1`.

### Codebase simplification:
* `numojo/__init__.mojo`, `numojo/core/complex/complex_ndarray.mojo`,
`numojo/routines/io/__init__.mojo`: Removed the unused `printoptions`
import.
[[1]](diffhunk://#diff-c866aa2a9b7b267a54550b85f8f3bd958d31806072b3f8449cfeb3e1b04fb954L65-R65)
[[2]](diffhunk://#diff-50999070ae6817e2537de378c19bc32ee0ee691681f0c39492d8e9fc0d540a35L37)
[[3]](diffhunk://#diff-44cb945c42164cf66f26636ae61d288b6b52ed68e756a3e09b81725c27a97b96L9-L10)
*
[`numojo/routines/io/formatting.mojo`](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL23-R23):
Replaced `GLOBAL_PRINT_OPTIONS` with a local `default_print_options`
instance in several functions and methods, and added new parameters to
the `format_floating_scientific` and `format_floating_precision`
functions for better control over formatting behavior.
[[1]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL23-R23)
[[2]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL149-R132)
[[3]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL166-R153)
[[4]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL195-R180)
[[5]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL207-R199)
[[6]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aR213-R217)
[[7]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL238-L241)
[[8]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL293-R291)
[[9]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aR300)
[[10]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL319)
[[11]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL352-R362)
[[12]](diffhunk://#diff-ebe0524c71023004d26ae3e618bbaabd5177b5261be63254bf3d483f16af991aL366-L368)

---------

Co-authored-by: MadAlex1997 <[email protected]>
@forfudan forfudan requested a review from MadAlex1997 March 8, 2025 00:14
@shivasankarka shivasankarka merged commit 2791299 into pre-0.7 Mar 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants