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
97 changes: 66 additions & 31 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
os: [macos-latest, ubuntu-latest, windows-latest]
env:
# Display must be available globally for linux to know where xvfb is
Expand All @@ -27,11 +27,32 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# building on macos results in a long run due to having to build the font cache
- name: Cache Matplotlib font cache
uses: actions/cache@v3
with:
path: ~/.cache/matplotlib
key: ${{ runner.os }}-matplotlib-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-matplotlib-
- name: Setup xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libegl1-mesa
sudo apt-get install -y \
xvfb \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xinput0 \
libxcb-xfixes0 \
libegl1 \
libegl-mesa0 \
libgl1-mesa-dri
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Install dependencies
Expand All @@ -44,37 +65,51 @@ jobs:
pip install -e .
# show installed packages
pip freeze
# - name: Install large dependencies (Linux)
# if: runner.os == 'Linux'
# run: |
# pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython
# pip install .[GUI]
# - name: Install large dependencies (macOS)
# if: runner.os == 'macOS'
# run: |
# pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython
# pip install --prefer-binary matplotlib
# pip install .[GUI]
# - name: Install large dependencies (Windows)
# if: runner.os == 'windows'
# run: |
# pip install .[GUI]
- name: Test
run: |
coverage run --source=pycorrfit -m pytest tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Create app and check if it runs (macOS)
if: runner.os == 'macOS'
working-directory: ./build-recipes
run: |
bash ./macos_build_app.sh PyCorrFit $(python -m pycorrfit --version)
- name: Upload build artifacts
if: (runner.os == 'macOS')
uses: actions/upload-artifact@v3
with:
name: PyCorrFit_macosx
path: |
./build-recipes/dist/*.dmg

- name: Create app and check if it runs (Win)
if: runner.os == 'windows'
working-directory: ./build-recipes
run: |
pip install -r win_build_requirements.txt
pyinstaller -y --log-level=WARN win_PyCorrFit.spec
.\dist\PyCorrFit\PyCorrFit.exe --version
python win_make_iss.py
iscc /Q win_bmicro.iss
- name: Upload build artifacts
if: (runner.os == 'windows')
uses: actions/upload-artifact@v3
with:
name: PyCorrFit
path: |
./build-recipes/Output/*.exe
# - name: Create app and check if it runs (macOS)
# if: runner.os == 'macOS'
# working-directory: ./build-recipes
# run: |
# bash ./macos_build_app.sh PyCorrFit $(python -m pycorrfit --version)
# - name: Upload build artifacts
# if: (runner.os == 'macOS')
# uses: actions/upload-artifact@v4
# with:
# name: PyCorrFit_macosx
# path: |
# ./build-recipes/dist/*.dmg
# - name: Create app and check if it runs (Win)
# if: runner.os == 'windows'
# working-directory: ./build-recipes
# run: |
# pip install -r win_build_requirements.txt
# pyinstaller -y --log-level=WARN win_PyCorrFit.spec
# .\dist\PyCorrFit\PyCorrFit.exe --version
# python win_make_iss.py
# iscc /Q win_bmicro.iss
# - name: Upload build artifacts
# if: (runner.os == 'windows')
# uses: actions/upload-artifact@v4
# with:
# name: PyCorrFit
# path: |
# ./build-recipes/Output/*.exe
4 changes: 2 additions & 2 deletions .github/workflows/deploy_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ nosetests.xml
tests/data

.cache
__pycache__
.eggs
.env

Expand All @@ -86,3 +87,6 @@ docs/_build

# pycharm
.idea

_version.py
*.swp
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[unreleased]
- enh: add support for PicoQuant ptu file format
- setup: drop support for Python <3.11 (due to ptufile)
- tests: set up tox for all supported python version
- tests: add placeholder ruff/ty/codespell configuration for gradual improvements
- enh: deprecate cython
1.2.1
- fix: compatibility with newer versions of scipy (#211)
1.2.0
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Quickstart

```
uv build
```

Running tests:

```
uv tool install tox --with tox-uv
uvx tox
```
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ recursive-include examples *.txt *.pcfs
recursive-include doc *.tex *.bib *.pdf *.md *.png *.svg
recursive-include docs *.py *.md *.txt *.rst *.bib *.gif *.jpg *.png
recursive-include tests *.py *.md
recursive-include pycorrfit LICENCE README
recursive-include pycorrfit LICENSE README
prune docs/_build
exclude docs/_version_save.py
1 change: 1 addition & 0 deletions build-recipes/win_build_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller
18 changes: 12 additions & 6 deletions pycorrfit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
PyCorrFit is a tool to fit fluorescence correlation spectroscopy
data on a logarithmic scale.
"""
from . import meta
from . import models
from . import openfile
from . import readfiles

from importlib.metadata import PackageNotFoundError, version

from . import meta, models, openfile, readfiles
from .correlation import Correlation
from .fit import Fit
from .trace import Trace
from ._version import version as __version__

__author__ = u"Paul Müller"
try:
__version__ = version("pycorrfit")
except PackageNotFoundError:
# package is not installed
__version__ = "unknown"


__author__ = "Paul Müller"
__license__ = "GPL v2"
__all__ = ["meta", "models", "openfile", "readfiles", "Fit", "Trace", "Correlation"]
Loading