Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Oct 15, 2024
1 parent 8f02c3d commit c5f7b20
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 17 deletions.
2 changes: 2 additions & 0 deletions demo/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ android {

chaquopy {
defaultConfig {
version = "3.8"

// Android UI demo
pip {
install("Pygments==2.13.0") // Also used in Java API demo
Expand Down
26 changes: 14 additions & 12 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Download the `demo` artifact from GitHub Actions, and unpack the APK from it.
Install the APK and run the Java and Python unit tests on all ABIs, with at least one
device being each of the following:

* minSdk
* A physical device (on all ABIs if possible)
* minSdk (on all ABIs if possible)
* targetSdk
* A clean install
* An upgrade from the previous public release, with the tests already run
Expand All @@ -55,31 +56,32 @@ Open the pkgtest app in Android Studio, and temporarily edit the top-level build
file to use the local Chaquopy version.

Temporarily edit the app/build.gradle file to set `PACKAGES` to the top 40 recipes,
ordered by number of PyPI downloads:
ordered by number of PyPI downloads, excluding TensorFlow (#1209):

* Get the PyPI statistics as described in server/pypi/README-internal.md.
* `cd server/pypi/packages`
* `cat pypi-downloads.csv | cut -d, -f1 | while read name; do if [ -e $name ]; then echo $name; fi; done | head -n40 | tr '\n' ' '`
* `cat pypi-downloads.csv | cut -d, -f1 | while read name; do if [ -e $name ] && [ $name != tensorflow ]; then echo $name; fi; done | head -n40 | tr '\n' ' '`

As of 2023-12, this is:

numpy cryptography cffi pandas aiohttp yarl greenlet frozenlist grpcio lxml psutil multidict pillow scipy bcrypt matplotlib pynacl scikit-learn kiwisolver regex ruamel-yaml-clib google-crc32c pycryptodomex contourpy pyzmq pycryptodome zope-interface tensorflow h5py tokenizers torch shapely numba llvmlite xgboost scikit-image statsmodels sentencepiece opencv-python torchvision
numpy cryptography cffi pandas aiohttp yarl greenlet frozenlist grpcio lxml psutil multidict pillow scipy bcrypt matplotlib pynacl scikit-learn kiwisolver regex ruamel-yaml-clib google-crc32c pycryptodomex contourpy pyzmq pycryptodome zope-interface h5py tokenizers torch shapely numba llvmlite xgboost scikit-image statsmodels sentencepiece opencv-python torchvision brotli

Search the package test scripts for the word "Android", and consider adding any packages
which test Chaquopy in a way that isn't covered by the unit tests.
which test Chaquopy (as opposed to the package itself) in a way that isn't covered by
Chaquopy's own unit tests.

Set `abiFilters` to each of the following values (this tests the single-ABI case), and
test on a corresponding device:
Set `abiFilters` to each of `armeabi-v7a` and `arm64-v8a` (this tests the single-ABI
case), and test on those ABIs, with at least one device being each of the following:

* armeabi-v7a (use a 32-bit device)
* arm64-v8a
* A physical device (on all ABIs if possible)
* minSdk (on all ABIs if possible)
* targetSdk
* A clean install

Set `abiFilters` to `"x86", "x86_64"` (this tests the multi-ABI case), and test on those
ABIs, with at least one device being each of the following:

* minSdk
* targetSdk
* A clean install
* minSdk (on all ABIs if possible)


## Public release
Expand Down
15 changes: 11 additions & 4 deletions release/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Use the pkgtest app as follows (process for older versions varied as noted in the
table):

* Chaquopy release build
* Chaquopy release build – temporarily edit the top-level build.gradle file to set the
version.
* App debug build
* scipy and matplotlib
* abiFilters set to arm64-v8a and x86_64
Expand All @@ -17,8 +18,8 @@ Times are in seconds, best of 3:
* "Test" is the time reported by the tests themselves.

Sizes are as reported in Settings:
* "App MB" includes not only the APK, but also extracted native libraries, and probably
AOT-compiled Java code.
* "App MB" includes not only the APK, but also native libraries if they're extracted
from the APK, and probably AOT-compiled Java code.
* "Data MB" is difficult to pin down on the Pixel 7, maybe for reasons connected to the
WebView mentioned below:
* It's usually a few MB larger than the size of the /data/data subdirectory, except
Expand Down Expand Up @@ -64,4 +65,10 @@ Nexus 4
Pixel 7
14.0.2 0.64 1.51 0.62 0.89 78.7 67.7
15.0.1 0.61 1.54 0.55 0.93 78.7 68.0
```
* Re-testing 15.0.1 now shows an App size of 84.4 MB, and even the APK is bigger than 80,
so most of the increase here is probably caused by new versions of the AGP or the
app's Java dependencies.
16.0.0 0.63 1.50 0.60 0.91 84.9 68.3
```
3 changes: 2 additions & 1 deletion server/pypi/README-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ directory. Then run build-wheel for all other ABIs.
Restore `abiFilters` to include all ABIs, and test them all, with at least one device
being each of the following:

* minSdk
* A physical device (on all ABIs if possible)
* minSdk (on all ABIs if possible)
* targetSdk
* A clean install

Expand Down
2 changes: 2 additions & 0 deletions target/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Check if any modules can be removed from `BOOTSTRAP_NATIVE_STDLIB` in PythonTask

Update `DEFAULT_PYTHON_VERSION` in Common.java.

Update the Python version in all apps in the repository.

Update the pythonX.Y scripts in integration/data/BuildPython.

See the note about the default Python micro version in
Expand Down

0 comments on commit c5f7b20

Please sign in to comment.