Skip to content

Commit db8078a

Browse files
authored
Merge pull request #1 from Fluorescence-Tools/development
Development
2 parents e1e8bf9 + e8b1fa0 commit db8078a

21 files changed

+2013
-86
lines changed

.github/workflows/conda-build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Conda Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- development
8+
release:
9+
types: ['released', 'prereleased']
10+
schedule:
11+
# Every Monday at 11PM UTC
12+
- cron: "0 11 * * 1"
13+
14+
jobs:
15+
build-linux:
16+
name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }})
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
22+
python-version: ["3.10"]
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v2
26+
27+
- name: "Set SDK on MacOS (if needed)"
28+
if: startsWith(matrix.os, 'macos')
29+
run: tools/install_macos_sdk.sh
30+
31+
- name: Set up Conda
32+
uses: conda-incubator/setup-miniconda@v3
33+
with:
34+
auto-update-conda: true
35+
python-version: ${{ matrix.python-version }}
36+
mamba-version: "*"
37+
channels: conda-forge,defaults
38+
channel-priority: true
39+
40+
- name: Display Conda Settings
41+
shell: bash -el {0}
42+
run: |
43+
conda info
44+
conda list
45+
conda config --show-sources
46+
conda config --show
47+
printenv | sort
48+
49+
- name: Build Conda Package
50+
uses: aganders3/headless-gui@v1
51+
with:
52+
shell: bash -el {0}
53+
run: |
54+
conda config --add channels tpeulen
55+
mamba install conda-build boa
56+
cd conda-recipe
57+
# curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml
58+
curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml
59+
conda mambabuild .

.github/workflows/conda-release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
name: Build and Upload Conda Packages
3+
4+
on:
5+
workflow_dispatch:
6+
release:
7+
types: ['released', 'prereleased']
8+
schedule:
9+
# At 11:00 AM, every 3 months
10+
- cron: "0 11 * */3 *"
11+
12+
jobs:
13+
build:
14+
name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }})
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
20+
python-version: ["3.10"]
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v2
24+
25+
- name: "Set SDK on MacOS (if needed)"
26+
if: startsWith(matrix.os, 'macos')
27+
run: tools/install_macos_sdk.sh
28+
29+
- name: Set up Conda
30+
uses: conda-incubator/setup-miniconda@v3
31+
with:
32+
auto-update-conda: true
33+
python-version: ${{ matrix.python-version }}
34+
mamba-version: "*"
35+
channels: conda-forge,defaults
36+
channel-priority: true
37+
38+
- name: Display Conda Settings
39+
shell: bash -el {0}
40+
run: |
41+
conda info
42+
conda list
43+
conda config --show-sources
44+
conda config --show
45+
printenv | sort
46+
47+
- name: Build and Upload Conda Package
48+
uses: aganders3/headless-gui@v1
49+
with:
50+
shell: bash -el {0}
51+
run: |
52+
mamba install conda-build boa anaconda-client
53+
cd conda-recipe
54+
curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml
55+
conda mambabuild . --output-folder conda-bld -c tpeulen
56+
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u tpeulen --force conda-bld/**/*.tar.bz2

.github/workflows/gitlab-sync.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: GitlabSync
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
name: Git Repo Sync
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: wangchucheng/git-repo-sync@v0.1.0
16+
with:
17+
# Such as https://github.com/wangchucheng/git-repo-sync.git
18+
target-url: ${{ secrets.TARGET_URL }}
19+
# Such as wangchucheng
20+
target-username: ${{ secrets.TARGET_USERNAME }}
21+
# You can store token in your project's 'Setting > Secrets' and reference the name here. Such as ${{ secrets.ACCESS\_TOKEN }}
22+
target-token: ${{ secrets.TARGET_TOKEN }}

.gitlab-ci.yml

Lines changed: 87 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,92 @@
1-
{% set data = load_setup_py_data(setup_file='../setup.py', from_recipe_dir=True) %}
1+
stages:
2+
- build
3+
- test
4+
- deploy
25

3-
package:
4-
name: {{ data.get('name')|lower }}
5-
version: {{ data.get('version')|lower }}
6+
build:linux:
7+
stage: build
8+
tags:
9+
- linux
10+
image: condaforge/mambaforge:latest
11+
before_script:
12+
- apt update -yq && apt -yq install build-essential
13+
- git submodule update --init --recursive --remote
14+
- cd tools && git pull --force && cd ..
15+
script:
16+
- ./tools/build.sh
17+
artifacts:
18+
paths:
19+
- bld-dir/
620

7-
source:
8-
path: ..
21+
build:windows:
22+
image: mambaforge:vs16
23+
tags:
24+
- win
25+
stage: build
26+
before_script:
27+
- cd tools && git pull --force && cd ..
28+
- git submodule update --init --recursive --remote
29+
script:
30+
- cmd.exe
31+
- conda activate base
32+
- git submodule update --init --recursive --remote
33+
- .\tools\build.bat
34+
artifacts:
35+
paths:
36+
- bld-dir/
937

10-
build:
11-
number: 0
12-
string: py{{ python }}
13-
entry_points:
14-
{% for entry_point_type, entry_points in data.get("entry_points", dict()).items() -%}
15-
{% for entry_point in entry_points -%}
16-
- {{ entry_point }}
17-
{% endfor %}
18-
{% endfor %}
19-
requirements:
20-
host:
21-
- python
22-
- numpy
23-
- pyyaml
24-
- setuptools
25-
build:
26-
- python
27-
- numpy
28-
- setuptools
29-
- pyyaml
30-
run:
31-
- python
32-
- numpy
33-
- pyyaml
34-
- qtpy
35-
- pyqt
36-
- pyqtgraph
37-
- tttrlib
38-
- pathlib2 # [py < 3]
38+
build:osx:
39+
stage: build
40+
tags:
41+
- osx
42+
before_script:
43+
- cd tools && git pull --force && cd ..
44+
- git submodule update --init --recursive --remote
45+
script:
46+
- ./tools/build.sh
47+
artifacts:
48+
paths:
49+
- bld-dir/
3950

40-
about:
41-
home: {{ data.get('url') }}
42-
license: {{ data.get('license') }}
43-
license_file: LICENSE
44-
summary: Converter for TTTR files
45-
description: |
46-
{{ data.get('description') }}
51+
test:linux:
52+
stage: test
53+
tags:
54+
- linux
55+
image:
56+
name: condaforge/mambaforge
57+
before_script:
58+
# Issue with OpenGL and X11 display
59+
# See: https://stackoverflow.com/questions/65675765/is-it-possible-to-run-x11-on-gitlab-ci
60+
# See: https://github.com/conda-forge/pygridgen-feedstock/issues/10
61+
# procps is used to grep the process by name to kill it when needed
62+
- apt update -yq
63+
- apt install -yq xorg-dev libglu1-mesa libgl1-mesa-dev xvfb libxinerama1 libxcursor1 libgl1-mesa-glx procps
64+
script:
65+
- source activate
66+
# Disable Numba JIT for correct coverage analysis
67+
- export NUMBA_DISABLE_JIT=1
68+
- cp tools/.condarc ~/.condarc
69+
- conda config --add channels "file://`pwd`/bld-dir"
70+
- mamba create -n test python tttrconvert
71+
- conda activate test
72+
# Run GUI with xvfb - no X11 screen
73+
- |
74+
xvfb-run -a -s "-screen 0 1400x900x24 +extension RANDR" -- tttrconvert &
75+
sleep 10
76+
pgrep -f tttrconvert | awk '{print "kill -9 " $1}' | sh
4777
48-
extra:
49-
recipe-maintainers:
50-
- tpeulen
78+
deploy:conda:
79+
tags:
80+
- linux
81+
image: condaforge/mambaforge:latest
82+
stage: deploy
83+
dependencies:
84+
- build:linux
85+
- build:windows
86+
- build:osx
87+
script:
88+
- ./tools/deploy.sh
89+
90+
#chisurf:
91+
# stage: Trigger-cross-projects
92+
# trigger: chisurf/chisurf

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# tttrconvert
22

3-
A ``tttrconvert`` is a tool to convert time-tagged time-resolved files into different formats. ``tttrconvert`` to read
3+
A ``tttrconvert`` is a very basic tool to convert time-tagged time-resolved files into different formats. ``tttrconvert`` to read
44
and write TTTR files ``tttrconvert`` uses ``tttrlib``. The tool ``tttrconvert`` can be embedded
55
in other software and is part of ChiSurf.
66

7+
Currently, the tool has only very basic functions (it is probably not
8+
what you want).
9+
710
![tttrconvert GUI][1]
811

912
## Building and installation
@@ -15,7 +18,7 @@ To install ``tttrconvert`` from the source code clone the git repository and run
1518
setup script.
1619

1720
```commandline
18-
git clone https://gitlab.peulen.xyz/tpeulen/tttrconvert
21+
git clone https://github.com/fluorescence-tools/tttrconvert
1922
cd tttrconvert
2023
python setup.py install
2124
```
@@ -26,23 +29,17 @@ tttrconvert
2629
```
2730

2831
### Conda
29-
``tttrconvert`` depends on common python packages such as ``numpy``. Additionally, ``tttrconvert`` depends on
30-
``tttrlib``. Thus, to install ``k2dist`` make sure that conda channels that provide packages for the necessary
31-
dependencies are listed in the ``.condarc`` file
32-
33-
```yaml
34-
channels:
35-
- tpeulen
36-
- tpeulen/label/nightly
37-
- conda-forge
38-
- defaults
39-
```
32+
`tttrconvert` can be installed using conda, best in a separate
33+
environment
4034

41-
To avoid potential conflicts ``tttrconvert`` can be installed in a separate environment.
35+
```bash
36+
conda create tttrconvert
37+
mamba install tttrconvert -c tpeulen
38+
```
4239

43-
```commandline
44-
conda create -n test
45-
conda install tttrconvert
40+
To us the tool activate the tttrconvert environment and start the tool
41+
from the command line.
42+
```bash
4643
conda activate tttrconvert
4744
tttrconvert
4845
```
@@ -51,11 +48,7 @@ tttrconvert
5148

5249
## Graphical user interface
5350
First, select the input file type. Next, add files to the file list by drag-and-drop. Finally,
54-
select the ouput file format and save/convert the files.
55-
56-
## Note on meta-data
57-
The different TTTR file formats contain and support different meta-data. The meta-data may need to be
58-
edited separately.
51+
select the output file format and save/convert the files.
5952

6053

6154
[1]: doc/gui.png "tttrconvert GUI"

0 commit comments

Comments
 (0)