pyobs-flipro 1.1.5__tar.gz → 2.0.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyobs_flipro-2.0.0.dev1/.github/workflows/pypi.yml +26 -0
- pyobs_flipro-2.0.0.dev1/.pre-commit-config.yaml +15 -0
- pyobs_flipro-2.0.0.dev1/.readthedocs.yml +14 -0
- pyobs_flipro-2.0.0.dev1/CMakeLists.txt +72 -0
- pyobs_flipro-2.0.0.dev1/PKG-INFO +14 -0
- pyobs_flipro-2.0.0.dev1/README.md +30 -0
- pyobs_flipro-2.0.0.dev1/get-poetry.py +958 -0
- pyobs_flipro-2.0.0.dev1/poetry.lock +2257 -0
- pyobs_flipro-2.0.0.dev1/pyobs_flipro/__init__.py +1 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/pyobs_flipro/fliprocamera.py +117 -143
- pyobs_flipro-2.0.0.dev1/pyobs_flipro/gui.py +155 -0
- pyobs_flipro-2.0.0.dev1/pyproject.toml +53 -0
- pyobs_flipro-2.0.0.dev1/uv.lock +2412 -0
- pyobs_flipro-1.1.5/PKG-INFO +0 -16
- pyobs_flipro-1.1.5/build.py +0 -45
- pyobs_flipro-1.1.5/pyobs_flipro/__init__.py +0 -1
- pyobs_flipro-1.1.5/pyproject.toml +0 -32
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/LICENSE +0 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/lib/libflipro.h +0 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/lib/liblibflialgo.so +0 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/lib/liblibflipro.so +0 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/pyobs_flipro/fliprodriver.pyx +0 -0
- {pyobs_flipro-1.1.5 → pyobs_flipro-2.0.0.dev1}/pyobs_flipro/libflipro.pxd +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish package to PyPI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v*'
|
|
6
|
+
jobs:
|
|
7
|
+
build-n-publish:
|
|
8
|
+
name: Build and publish package to PyPI
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
uses: actions/setup-python@v1
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.11"
|
|
16
|
+
- name: Install poetry
|
|
17
|
+
run: |
|
|
18
|
+
curl -fsS -o get-poetry.py https://install.python-poetry.org
|
|
19
|
+
python get-poetry.py -y
|
|
20
|
+
- name: Publish
|
|
21
|
+
env:
|
|
22
|
+
PYPI_TOKEN: ${{ secrets.pypi_password }}
|
|
23
|
+
run: |
|
|
24
|
+
$HOME/.local/bin/poetry config pypi-token.pypi $PYPI_TOKEN
|
|
25
|
+
$HOME/.local/bin/poetry build -f sdist
|
|
26
|
+
$HOME/.local/bin/poetry publish
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
|
|
3
|
+
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
4
|
+
rev: 25.1.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: black
|
|
7
|
+
# It is recommended to specify the latest version of Python
|
|
8
|
+
# supported by your project here, or alternatively use
|
|
9
|
+
# pre-commit's default_language_version, see
|
|
10
|
+
# https://pre-commit.com/#top_level-default_language_version
|
|
11
|
+
language_version: python3.11
|
|
12
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
+
rev: v0.9.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: ruff
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.21)
|
|
2
|
+
project(pyobs_flipro LANGUAGES C)
|
|
3
|
+
|
|
4
|
+
# --- Ensure we use the build environment Python ---
|
|
5
|
+
set(Python3_FIND_VIRTUALENV ONLY)
|
|
6
|
+
set(Python3_FIND_STRATEGY LOCATION)
|
|
7
|
+
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
8
|
+
|
|
9
|
+
# --- Paths ---
|
|
10
|
+
set(PYX_FILE "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_flipro/fliprodriver.pyx")
|
|
11
|
+
set(C_FILE "${CMAKE_CURRENT_BINARY_DIR}/fliprodriver.c")
|
|
12
|
+
|
|
13
|
+
# --- Get NumPy include dir ---
|
|
14
|
+
execute_process(
|
|
15
|
+
COMMAND "${Python3_EXECUTABLE}" -c "import numpy; print(numpy.get_include())"
|
|
16
|
+
OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
|
|
17
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
# --- Run Cython ---
|
|
21
|
+
add_custom_command(
|
|
22
|
+
OUTPUT ${C_FILE}
|
|
23
|
+
COMMAND "${Python3_EXECUTABLE}" -m cython
|
|
24
|
+
${PYX_FILE}
|
|
25
|
+
--output-file ${C_FILE}
|
|
26
|
+
-I "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_flipro"
|
|
27
|
+
DEPENDS ${PYX_FILE} "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_flipro/libflipro.pxd"
|
|
28
|
+
COMMENT "Running Cython on fliprodriver.pyx"
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# --- Build extension module ---
|
|
32
|
+
add_library(fliprodriver MODULE ${C_FILE})
|
|
33
|
+
target_include_directories(fliprodriver PRIVATE
|
|
34
|
+
${Python3_INCLUDE_DIRS}
|
|
35
|
+
${NUMPY_INCLUDE_DIR}
|
|
36
|
+
${CMAKE_CURRENT_SOURCE_DIR}/lib/
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# --- Correct Python module naming ---
|
|
40
|
+
execute_process(
|
|
41
|
+
COMMAND "${Python3_EXECUTABLE}" -c
|
|
42
|
+
"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"
|
|
43
|
+
OUTPUT_VARIABLE PY_EXT_SUFFIX
|
|
44
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
45
|
+
)
|
|
46
|
+
set_target_properties(fliprodriver PROPERTIES
|
|
47
|
+
PREFIX ""
|
|
48
|
+
OUTPUT_NAME "fliprodriver"
|
|
49
|
+
SUFFIX "${PY_EXT_SUFFIX}"
|
|
50
|
+
POSITION_INDEPENDENT_CODE ON
|
|
51
|
+
INSTALL_RPATH "$ORIGIN"
|
|
52
|
+
BUILD_WITH_INSTALL_RPATH ON
|
|
53
|
+
)
|
|
54
|
+
message(STATUS "ext: ${PY_EXT_SUFFIX}")
|
|
55
|
+
|
|
56
|
+
# --- Bundled FLIPRO libraries (pre-compiled, shipped in lib/) ---
|
|
57
|
+
set(FLIPRO_LIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/liblibflipro.so")
|
|
58
|
+
set(FLIALGO_LIB "${CMAKE_CURRENT_SOURCE_DIR}/lib/liblibflialgo.so")
|
|
59
|
+
target_link_libraries(fliprodriver PRIVATE ${FLIPRO_LIB} ${FLIALGO_LIB})
|
|
60
|
+
|
|
61
|
+
# --- System libraries ---
|
|
62
|
+
find_library(CFITSIO_LIB cfitsio REQUIRED)
|
|
63
|
+
find_library(USB_LIB usb-1.0 REQUIRED)
|
|
64
|
+
target_link_libraries(fliprodriver PRIVATE ${CFITSIO_LIB} ${USB_LIB})
|
|
65
|
+
|
|
66
|
+
# --- Install extension and bundled .so files into package ---
|
|
67
|
+
install(TARGETS fliprodriver
|
|
68
|
+
LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME}
|
|
69
|
+
)
|
|
70
|
+
install(FILES ${FLIPRO_LIB} ${FLIALGO_LIB}
|
|
71
|
+
DESTINATION ${SKBUILD_PROJECT_NAME}
|
|
72
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyobs-flipro
|
|
3
|
+
Version: 2.0.0.dev1
|
|
4
|
+
Summary: pyobs module for FLIPRO cameras
|
|
5
|
+
Author-Email: Tim-Oliver Husser <thusser@uni-goettingen.de>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: astropy<8,>=7.0.1
|
|
9
|
+
Requires-Dist: numpy<3,>=2.2.5
|
|
10
|
+
Requires-Dist: pyobs-core<3,>=2.0.0.dev6
|
|
11
|
+
Provides-Extra: gui
|
|
12
|
+
Requires-Dist: PySide6>=6.7; extra == "gui"
|
|
13
|
+
Requires-Dist: qasync>=0.27; extra == "gui"
|
|
14
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
FLIPRO module for *pyobs*
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
Install *pyobs-fli*
|
|
5
|
+
-------------------
|
|
6
|
+
Use pip
|
|
7
|
+
|
|
8
|
+
pip install pyobs-flipro
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Configuration
|
|
12
|
+
-------------
|
|
13
|
+
The *FliProCamera* class is derived from *BaseCamera* (see *pyobs* documentation) and adds a single new parameter:
|
|
14
|
+
|
|
15
|
+
setpoint:
|
|
16
|
+
The initial setpoint in degrees Celsius for the cooling of the camera.
|
|
17
|
+
|
|
18
|
+
The class works fine with its default parameters, so a basic module configuration would look like this:
|
|
19
|
+
|
|
20
|
+
module:
|
|
21
|
+
class: pyobs_flipro.FliProCamera
|
|
22
|
+
name: FLIPRO camera
|
|
23
|
+
|
|
24
|
+
Dependencies
|
|
25
|
+
------------
|
|
26
|
+
* **pyobs** for the core funcionality. It is not included in the *requirements.txt*, so needs to be installed
|
|
27
|
+
separately.
|
|
28
|
+
* [Cython](https://cython.org/) for wrapping the SBIG Universal Driver.
|
|
29
|
+
* [Astropy](http://www.astropy.org/) for FITS file handling.
|
|
30
|
+
* [NumPy](http://www.numpy.org/) for array handling.
|