Skip to content

Commit

Permalink
Merge pull request #57 from harripd/master
Browse files Browse the repository at this point in the history
Combined updates
  • Loading branch information
harripd authored May 20, 2024
2 parents 7ed3981 + e155699 commit f989846
Show file tree
Hide file tree
Showing 25 changed files with 126 additions and 2,483 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

27 changes: 15 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
activate-environment: test
- name: Apple Silicon oddities
if: matrix.os == 'macos-14'
shell: bash -l {0}
run: |
brew install c-blosc hdf5
export HDF5_DIR=/opt/homebrew/opt/hdf5
Expand All @@ -56,17 +57,17 @@ jobs:
# # conda init --all
# # conda create -n test python=${{matrix.python-version}}
# # conda activate test
- name: Test conda instalation
shell: bash -l {0}
run: conda info
- name: Install Dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python -m pip install setuptools build
# python -m pip install numpy tables matplotlib pandas
conda install numpy cython pytest
conda install numpy cython pytest pyyaml jupyter
conda install pytables matplotlib pandas numba
- name: Old Python dependencies
if: matrix.python-version <= 3.9
shell: bash -l {0}
run: pip install importlib_resources
- name: build phconvert
shell: bash -l {0}
run: |
Expand All @@ -80,26 +81,24 @@ jobs:
wget https://ndownloader.figshare.com/files/3350669 -O dsdna_d7d17_50_50_1.spc
wget https://ndownloader.figshare.com/files/3350672 -O Pre.ht3
wget https://ndownloader.figshare.com/files/3350663 -O 0023uLRpitc_NTP_20dT_0.5GndCl.sm
wget https://github.com/Photon-HDF5/phconvert/files/231343/Cy3.Cy5_diff_PIE-FRET.ptu.zip
unzip Cy3.Cy5_diff_PIE-FRET.ptu.zip
wget https://ndownloader.figshare.com/files/6955091 -O 161128_DM1_50pM_pH74.ptu
wget https://ndownloader.figshare.com/files/14828594 -O 20161027_DM1_1nM_pH7_20MHz1.ptu
wget https://ndownloader.figshare.com/files/13675271 -O TestFile_2.ptu
wget https://ndownloader.figshare.com/files/14850533 -O trace_T2_300s_1_coincidence.ptu
wget https://ndownloader.figshare.com/files/14890535 -O nanodiamant_histo.phu
wget https://github.com/dwaithe/FCS_point_correlator/raw/master/focuspoint/topfluorPE_2_1_1_1.pt3
wget https://github.com/Photon-HDF5/phconvert/files/231343/Cy3.Cy5_diff_PIE-FRET.ptu.zip
unzip Cy3.Cy5_diff_PIE-FRET.ptu.zip
wget https://github.com/Photon-HDF5/phconvert/files/1380341/DNA_FRET_0.5nM.pt3.zip
unzip DNA_FRET_0.5nM.pt3.zip
wget https://github.com/Photon-HDF5/phconvert/files/1336330/data.zip
unzip data.zip
cd ../..
- name: Downlid files Windows
- name: Download files Windows
shell: bash -l {0}
if: runner.os == 'Windows'
run: |
cd notebooks/data
curl.exe -L --output Cy3.Cy5_diff_PIE-FRET.ptu.zip --url https://github.com/Photon-HDF5/phconvert/files/231343/Cy3.Cy5_diff_PIE-FRET.ptu.zip
7z e Cy3.Cy5_diff_PIE-FRET.ptu.zip
curl.exe -L --output dsdna_d7d17_50_50_1.set --url https://ndownloader.figshare.com/files/3350666
curl.exe -L --output dsdna_d7d17_50_50_1.spc --url https://ndownloader.figshare.com/files/3350669
curl.exe -L --output Pre.ht3 --url https://ndownloader.figshare.com/files/3350672
Expand All @@ -110,14 +109,18 @@ jobs:
curl.exe -L --output trace_T2_300s_1_coincidence.ptu --url https://ndownloader.figshare.com/files/14850533
curl.exe -L --output nanodiamant_histo.phu --url https://ndownloader.figshare.com/files/14890535
curl.exe -L --output topfluorPE_2_1_1_1.pt3 --url https://github.com/dwaithe/FCS_point_correlator/raw/master/focuspoint/topfluorPE_2_1_1_1.pt3
curl.exe -L --output Cy3.Cy5_diff_PIE-FRET.ptu.zip --url https://github.com/Photon-HDF5/phconvert/files/231343/Cy3.Cy5_diff_PIE-FRET.ptu.zip
7z e Cy3.Cy5_diff_PIE-FRET.ptu.zip
curl.exe -L --output DNA_FRET_0.5nM.pt3.zip --url https://github.com/Photon-HDF5/phconvert/files/1380341/DNA_FRET_0.5nM.pt3.zip
7z e DNA_FRET_0.5nM.pt3.zip
curl.exe -L --output data.zip --url https://github.com/Photon-HDF5/phconvert/files/1336330/data.zip
7z e data.zip
cd ..
cd ..
- name: Test project
shell: bash -l {0}
run: |
pytest
# pip install pyyaml
# python -m tests/nbrun.py /notebooks/*
cd notebooks
python ../tests/nbrun.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ notebooks/*-out.ipynb
*.ht3
*.ptu
*.set
phconvert/_version.py
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include versioneer.py
include phconvert/_version.py
include LICENSE.txt
include README.md
include phconvert/specs/*.json
include phconvert/v04/specs/*.json
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import phconvert
version = phconvert._version.get_versions()['version']
version = phconvert.__version__
if on_rtd:
# RTD modifies conf.py so the git repo becomes dirty
# We strip the '-dirty' that would generate a wrong verion string
Expand Down
15 changes: 9 additions & 6 deletions notebooks/Convert us-ALEX SM files to Photon-HDF5 - YAML.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"outputs": [],
"source": [
"with open(str(meta_filename)) as f:\n",
" metadata = yaml.load(f)\n",
" metadata = yaml.load(f, Loader=yaml.Loader)\n",
"metadata"
]
},
Expand Down Expand Up @@ -262,7 +262,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"source": [
"# Create Photon-HDF5"
Expand Down Expand Up @@ -291,9 +294,9 @@
"anaconda-cloud": {},
"hide_input": false,
"kernelspec": {
"display_name": "py36",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "py36"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -305,7 +308,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.0"
"version": "3.12.3"
},
"nav_menu": {},
"toc": {
Expand Down Expand Up @@ -341,5 +344,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
5 changes: 2 additions & 3 deletions packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ python setup.py sdist
Build universal wheel:

```
python setup.py bdist_wheel --universal
python -m build
```

Upload distributions:
Expand All @@ -31,7 +31,6 @@ twine upload dist/*
Form phconvert source folder:

```
conda build conda.recipe --python=2.7
conda build conda.recipe --python=3.4
conda build conda.recipe --python=3.9
```

37 changes: 3 additions & 34 deletions phconvert/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,6 @@
#
# Copyright (C) 2015 Antonino Ingargiola <[email protected]>
#
from phconvert._version import get_versions
__version__ = get_versions()['version']
del get_versions

import sys

if sys.version_info < (3,):
raise ImportError(
"""You are running phconvert %s on Python 2
phconvert 0.9 and above are no longer compatible with Python 2, and you still
ended up with this version installed. That's unfortunate; sorry about that.
It should not have happened. Make sure you have pip >= 9.0 to avoid this kind
of issue, as well as setuptools >= 24.2:
$ pip install pip setuptools --upgrade
Your choices:
- Upgrade to Python 3.
- Install an older version of phconvert:
$ pip install 'phconvert<0.9'
It would be great if you can figure out how this version ended up being
installed, and try to check how to prevent that for future users.
Feel free to report the issue to:
https://github.com/Photon-HDF5/phconvert/issues
""" % __version__)

import phconvert.loader
import phconvert.hdf5
import phconvert.v04
Expand All @@ -49,3 +15,6 @@
if has_matplotlib:
import phconvert.plotter
del matplotlib


from phconvert._version import version as __version__
Loading

0 comments on commit f989846

Please sign in to comment.