Commit graph

23 commits

Author SHA1 Message Date
Zoltán Vörös
5ccfa5cdd9
Update build.sh
remove tests from nanbox
2022-09-21 20:10:18 +02:00
Jim Mussared
42f396a992
Update mp_obj_type_t definitions for latest MicroPython. (#549)
* build.sh: Fix unix executable path.

This was updated recently to no longer copy to the ports/unix directory.

Use the version in the build directory instead if available.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>

* Update to new style mp_obj_type_t definitions.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-21 19:46:39 +02:00
Zoltán Vörös
dfed7a844a
implement nonzero (#540)
* implement nonzero for Boolean arrays

* remove axtls from build script

* extend nonzero to ndarrays of arbitrary dtype, and iterable, fix float tests

* temporarily disable circuitpython tests

* add nonzero documentation

* Added test script for np.nonzero()

Co-authored-by: Tejal Ashwini Barnwal <64950661+tejalbarnwal@users.noreply.github.com>
2022-08-03 20:56:45 +02:00
Damien George
99f6fa66a1 Add single-precision float to build.sh
Signed-off-by: Damien George <damien.p.george@gmail.com>
2022-07-11 15:27:49 +10:00
308627c9aa
Fix several build errors in CircuitPython (#533)
* Properly register submodules of ulab

This is related to
 * https://github.com/adafruit/circuitpython/issues/6066

in which, after the merge of 1.18 into CircuitPython, we lost the ability
to import submodules of built-in modules.

While reconstructing the changes we had made locally to enable this,
I discovered that there was an easier way: simply register the dotted
module names via MP_REGISTER_MODULE.

* Fix finding processor count when no `python` executable is installed

debian likes to install only `python3`, and not `python` (which was,
for many decades, python2).

This was previously done for `build.sh` but not for `build-cp.sh`.

* Only use this submodule feature in CircuitPython

.. as it does not work properly in MicroPython.

Also, modules to be const. This saves a small amount of RAM

* Fix -Werror=undef diagnostic

Most CircuitPython ports build with -Werror=undef, so that use of an
undefined preprocessor flag is an error. Also, CircuitPython's micropython
version is old enough that MICROPY_VERSION is not (ever) defined.

Defensively check for this macro being defined, and use the older style
of MP_REGISTER_MODULE when it is not.

* Fix -Werror=discarded-qualifiers diagnostics

Most CircuitPython ports build with -Werror=discarded-qualifiers.
This detected a problem where string constants were passed to functions
with non-constant parameter types.

* bump version number

* Use MicroPython-compatible registration of submodules

* straggler

* Remove spurious casts

these were build errors for micropython

* Run tests for both nanbox and regular variant during CI
2022-07-07 20:17:49 +02:00
Damien George
1347694672
Fix build for MICROPY_OBJ_REPR_D configurations (#531)
* Fix use of object pointers so code builds with MICROPY_OBJ_REPR_D

Signed-off-by: Damien George <damien.p.george@gmail.com>

* Fix use of float constants so they work with MICROPY_OBJ_REPR_D

Signed-off-by: Damien George <damien.p.george@gmail.com>

* Use new float-const macros to simplify definitions of e,inf,nan,pi.

Signed-off-by: Damien George <damien.p.george@gmail.com>

* Add support for MICROPY_OBJ_REPR_C

Signed-off-by: Damien George <damien.p.george@gmail.com>

* Add unix-nanbox build to build.sh script

Building nanbox requires gcc-multilib because it forces 32-bit mode.

Signed-off-by: Damien George <damien.p.george@gmail.com>

* Bump version to 5.0.8

Signed-off-by: Damien George <damien.p.george@gmail.com>
2022-07-06 20:38:20 +02:00
Zoltán Vörös
cc14841afb fix build script 2022-02-03 21:41:49 +01:00
Zoltán Vörös
effbd3cf38 add ULAB_HASH 2022-02-03 21:23:11 +01:00
PhilJ
612d07218e Added snippet tests 2022-01-13 23:11:55 -08:00
69011c8696 Re-organize tests 2021-07-23 09:19:10 -05:00
81d78fe23f micropython build: Build & test in a selected number of dimensions 2021-07-22 14:14:08 -05:00
Zoltán Vörös
dd8b404c14 re-organise test scripts 2021-06-08 21:18:33 +02:00
vikas-udupa
f9b0e4381b corrections to solve_triangular, moved solve_triangular to scipy.linalg module 2021-05-05 11:24:05 -04:00
Zoltán Vörös
c501569dd7 add from_buffer tests 2021-03-08 07:18:55 +01:00
f383766add reduce amount of cloned stuff 2021-01-13 15:44:14 -06:00
eac578603d Get rid of nonportable nproc
.. using a Python incantation instead.  Mac doesn't have
nproc.
2021-01-13 15:31:01 -06:00
793eef4030 Add portable version of readlink -f
from https://github.com/ko1nksm/readlinkf/blob/master/readlinkf.sh
(license: CC0)

Mac readlink does not support the -f flag, which is not
in POSIX.
2021-01-13 15:30:06 -06:00
Zoltán Vörös
8442948dba unpin micropython v.1.13 2020-11-20 16:08:55 +01:00
Zoltán Vörös
b93c4b95ab split test scripts into numpy-compatible and circuitpy-compatible sets 2020-11-20 08:10:19 +01:00
9e24593e94 pin micropython 1.13 for tests 2020-11-18 15:28:06 -06:00
e6113135cc Take our own version of run-tests
This is modified to better suit our needs, and because micropython
changes in the meantime were troublesome.

Expected outputs can be generated:
./run-tests -d tests --write-exp

Remove any incorrect .exp files before running as they won't be updated
otherwise.
2020-11-18 15:07:42 -06:00
Jeff Epler
2ea9656d3f build: include debug information (may also disable optimization)
.. this makes it much more pleasant to trace down problems using gdb.
2020-02-29 16:57:09 -06:00
Jeff Epler
e370e56a15 a script to build and run tests locally 2020-02-27 10:11:34 -06:00