Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.9 #222

Merged
merged 29 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4402499
DOC: Update changelog
enrico-lattuada Mar 29, 2024
cb839d8
DOC: Add keyword to project
enrico-lattuada Mar 29, 2024
25a4445
FIX: Manually specify python version to build
enrico-lattuada Mar 29, 2024
0f8038e
DEV: Add trigger on request
enrico-lattuada Mar 29, 2024
45227be
Merge pull request #223 from somexlab/bug/windows-wheels
enrico-lattuada Mar 29, 2024
f8bbb6f
FIX: Add missing array indices for python-version matrix
enrico-lattuada Mar 29, 2024
0981647
Merge pull request #224 from somexlab/bug/windows-wheels
enrico-lattuada Mar 29, 2024
14e6dd1
DEV: Add verbosity to the output
enrico-lattuada Mar 29, 2024
e8b5d07
Merge pull request #225 from somexlab/bug/windows-wheels
enrico-lattuada Mar 29, 2024
2076b44
FIX: Explicitly setup python
enrico-lattuada Apr 3, 2024
a251029
Merge pull request #226 from somexlab/bug/windows-wheels
enrico-lattuada Apr 3, 2024
56f92a0
FIX: Explicitly setup Python only on Windows runners
enrico-lattuada Apr 3, 2024
38b0fcd
Merge pull request #227 from somexlab/bug/windows-wheels
enrico-lattuada Apr 3, 2024
1aef548
FIX: Use single quotes
enrico-lattuada Apr 3, 2024
f398037
Merge pull request #228 from somexlab/bug/windows-wheels
enrico-lattuada Apr 3, 2024
47e97e4
MNT: Cleanup action
enrico-lattuada Apr 3, 2024
de57050
MNT: Decrease macosx deployment target version
enrico-lattuada Apr 3, 2024
1ee9ee0
Merge pull request #229 from somexlab/bug/windows-wheels
enrico-lattuada Apr 3, 2024
1859fed
MNT: Update minimal example notebook
enrico-lattuada Apr 3, 2024
0124d6d
DOC: Update changelog
enrico-lattuada Apr 3, 2024
67878a5
DOC: Add pip install instructions
enrico-lattuada Apr 3, 2024
49132f5
FIX: Complete command
enrico-lattuada Apr 3, 2024
31f90d4
DOC: Add installation instruction for Google Colab
enrico-lattuada Apr 3, 2024
2463cf5
DOC: Update pip and colab sdist installation
enrico-lattuada Apr 3, 2024
15f4742
Merge pull request #232 from somexlab/feature/update-example-notebook
enrico-lattuada Apr 4, 2024
45c5941
Merge pull request #234 from somexlab/docs/colab-pip-install
enrico-lattuada Apr 4, 2024
ea69541
DOC: Update changelog
enrico-lattuada Apr 4, 2024
5c5d59b
DOC: Update changelog
enrico-lattuada Apr 4, 2024
5efe7ff
DEV: Update version
enrico-lattuada Apr 4, 2024
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
20 changes: 17 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
branches:
- main

# trigger on request
workflow_dispatch:

jobs:
build_sdist:
name: Build source distribution
Expand All @@ -37,7 +40,7 @@ jobs:
if-no-files-found: error

build_wheels:
name: Build wheel for ${{ matrix.os }}, Python ${{ matrix.python-version }}
name: Build wheel for ${{ matrix.os }}, Python ${{ matrix.python-version[1] }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -48,6 +51,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
if: runner.os == 'Windows'

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
env:
Expand All @@ -64,10 +73,15 @@ jobs:
CIBW_ARCHS_WINDOWS: auto64

# Configure environment variables
MACOSX_DEPLOYMENT_TARGET: "10.14"
MACOSX_DEPLOYMENT_TARGET: "10.9"

# verbosity
CIBW_BUILD_VERBOSITY: 1

# Test the wheels
# TBD
#CIBW_TEST_REQUIRES: "pytest pytest-regtest"
#CIBW_TEST_COMMAND: "pytest -v {project}/tests"
#CIBW_TEST_SKIP:

- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ Change Log
v0.3
----

v0.3.9 (2024-04-04)
^^^^^^^^^^^^^^^^^^^

*Added*

* Instructions for installation via PyPI and on Google Colab

*Changed*

* Updated minimal example notebook

*Fixed*

* Windows' PyPI wheels

.. *Deprecated*
.. *Removed*

v0.3.8 (2024-03-28)
^^^^^^^^^^^^^^^^^^^

Expand Down
100 changes: 100 additions & 0 deletions docs/source/colab.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. Copyright (c) 2023-2023 University of Vienna, Enrico Lattuada, Fabian Krautgasser, and Roberto Cerbino.
.. Part of FastDDM, released under the GNU GPL-3.0 License.

Installing in Google Colab
==========================

**FastDDM** can be installed in `Google Colab <https://colab.research.google.com/>`_, also with GPU
support. This allows to test the library without the need to install it locally on workstations.

.. tip::

To better understand what the different options imply, see :ref:`build` and
:ref:`install_sdist`.

Open a new notebook.
If you wish to use the GPU provided by the host server, change the ``runtime type``.
To do so, select from the toolbar ``Runtime > Change runtime type`` and select a GPU available from
the ``Hardware accelerator`` list.
As of today (3 April 2024), with the free plan, you should have access to the T4 GPU.
Save and go back to your notebook.

To check that the GPU is working, run the following command in a cell

.. code-block:: python

!nvidia-smi

From pip source distribution
----------------------------

To install the source distribution via ``pip``, run the command below

.. code-block:: python

!pip3 install --no-binary fastddm fastddm

From GitHub repository source code
----------------------------------

This is the preferred mode if you want to run the unit tests.
Clone the source code from the GitHub repository

.. code-block:: python

!git clone --depth 1 --branch <version_name> https://github.com/somexlab/fastddm.git

For example, to clone the version ``v0.3.8``, run

.. code-block:: python

!git clone --depth 1 --branch v0.3.8 https://github.com/somexlab/fastddm.git

Change directory to the source code one

.. code-block:: python

%cd fastddm

If you want to install the library with C++ support, run the following command in a cell

.. code-block:: python

%env ENABLE_CPP=ON

If you want to install the library with GPU (CUDA) support, run the following command in a cell

.. code-block:: python

%env ENABLE_CUDA=ON

(This also enables the C++ support.)

.. warning::

Due to the small amount of available RAM memory, we also warmly recommend to enable the single
precision calculation option::

%env SINGLE_PRECISION=ON

Finally, install **FastDDM**

.. code-block:: python

!python3 -m pip install .

.. tip::

To run unit tests, you need some additional libraries. Run::

!python3 -m pip install pytest pytest-regtest

Then, run the tests with::

!pytest -v

Now you can go back to your home directory and work with **FastDDM**!

.. code-block:: python

%cd ..
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
year = datetime.date.today().year
copyright = f"2023-{year}, Enrico Lattuada, Fabian Krautgasser, Roberto Cerbino"
author = "Enrico Lattuada, Fabian Krautgasser, Roberto Cerbino"
version = "0.3.2"
version = "0.3.9"
release = version

pygments_style = "friendly"
Expand Down
1 change: 1 addition & 0 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Getting started
build
conda
pypi
colab
20 changes: 19 additions & 1 deletion docs/source/pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
Installing from PyPI
====================

Install precompiled wheels
--------------------------

Precompiled wheels are available through `PyPI <https://pypi.org/project/fastddm/>`_ with C++
support for most OSs and Python versions.
The command below will install **FastDDM**

.. code-block:: bash

$ pip3 install fastddm

.. warning::

If wheels are not available for your system, ``pip`` will fall back to the installation of the
source distribution. Refer to the :ref:`build` section for more information.

.. _install_sdist:

Install source distribution
---------------------------

Expand All @@ -14,4 +32,4 @@ Run the following line in your terminal:

.. code-block:: bash

$ pip3 install --no-binary fastddm
$ pip3 install --no-binary fastddm fastddm
91 changes: 52 additions & 39 deletions examples/fastddm_examples.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dynamic = [ "license", "version" ]
keywords = [
"cuda",
"differential-dynamic-microscopy",
"digital-fourier-microscopy",
"gpu",
"image-analysis",
"microscopy",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def build_extension(self, ext):
setup(
name="fastddm",
use_scm_version={
"fallback_version": "0.3.2",
"fallback_version": "0.3.9",
},
packages=find_packages(),
setup_requires=[
Expand Down
2 changes: 1 addition & 1 deletion src/python/make_install_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name="fastddm",
use_scm_version={
"root": "${CMAKE_SOURCE_DIR}",
"fallback_version": "0.3.2",
"fallback_version": "0.3.9",
},
setup_requires=["setuptools_scm"],
packages=["fastddm"],
Expand Down