evutils 0.3.7__tar.gz → 0.3.10__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.
Files changed (120) hide show
  1. evutils-0.3.10/.github/workflows/release.yaml +143 -0
  2. {evutils-0.3.7 → evutils-0.3.10}/.github/workflows/test.yaml +1 -0
  3. {evutils-0.3.7 → evutils-0.3.10}/PKG-INFO +1 -1
  4. evutils-0.3.10/csrc/include/evutils/compat.h +55 -0
  5. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/parser.h +3 -2
  6. {evutils-0.3.7 → evutils-0.3.10}/pyproject.toml +1 -1
  7. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/.git +1 -0
  8. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/.gitignore +1 -0
  9. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/LICENSE +674 -0
  10. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/README.md +179 -0
  11. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/base/__init__.py +1 -0
  12. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/base/base_model.py +30 -0
  13. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/image_reconstructor.py +112 -0
  14. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/model/model.py +100 -0
  15. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/model/submodules.py +275 -0
  16. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/model/unet.py +178 -0
  17. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/options/inference_options.py +66 -0
  18. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/pretrained/.gitignore +0 -0
  19. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/run_reconstruction.py +112 -0
  20. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/scripts/embed_reconstructed_images_in_rosbag.py +90 -0
  21. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/scripts/extract_events_from_rosbag.py +126 -0
  22. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/scripts/image_folder_to_rosbag.py +73 -0
  23. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/scripts/resample_reconstructions.py +56 -0
  24. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/__init__.py +0 -0
  25. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/event_readers.py +88 -0
  26. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/inference_utils.py +545 -0
  27. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/loading_utils.py +31 -0
  28. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/path_utils.py +6 -0
  29. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/timers.py +57 -0
  30. evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/utils/util.py +50 -0
  31. evutils-0.3.10/tests/io/test_bin.py +0 -0
  32. evutils-0.3.10/tests/io/test_dat.py +0 -0
  33. evutils-0.3.10/tests/io/test_hdf5.py +0 -0
  34. evutils-0.3.10/tests/io/test_npz.py +0 -0
  35. evutils-0.3.7/.github/workflows/release.yaml +0 -81
  36. {evutils-0.3.7 → evutils-0.3.10}/.dockerignore +0 -0
  37. {evutils-0.3.7 → evutils-0.3.10}/.gitignore +0 -0
  38. {evutils-0.3.7 → evutils-0.3.10}/.gitmodules +0 -0
  39. {evutils-0.3.7 → evutils-0.3.10}/CMakeLists.txt +0 -0
  40. {evutils-0.3.7 → evutils-0.3.10}/LICENSE +0 -0
  41. {evutils-0.3.7 → evutils-0.3.10}/README.md +0 -0
  42. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/README.md +0 -0
  43. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/conftest.py +0 -0
  44. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/docker/Dockerfile.openeb +0 -0
  45. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/readers.py +0 -0
  46. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/test_compare.py +0 -0
  47. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/test_read.py +0 -0
  48. {evutils-0.3.7 → evutils-0.3.10}/benchmarks/test_write.py +0 -0
  49. {evutils-0.3.7 → evutils-0.3.10}/csrc/evt2.c +0 -0
  50. {evutils-0.3.7 → evutils-0.3.10}/csrc/evt21.c +0 -0
  51. {evutils-0.3.7 → evutils-0.3.10}/csrc/evt3.c +0 -0
  52. {evutils-0.3.7 → evutils-0.3.10}/csrc/evutils.c +0 -0
  53. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/evt2.h +0 -0
  54. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/evt21.h +0 -0
  55. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/evt3.h +0 -0
  56. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/evutils.h +0 -0
  57. {evutils-0.3.7 → evutils-0.3.10}/csrc/include/evutils/types.h +0 -0
  58. {evutils-0.3.7 → evutils-0.3.10}/docker/Dockerfile +0 -0
  59. {evutils-0.3.7 → evutils-0.3.10}/docs/Makefile +0 -0
  60. {evutils-0.3.7 → evutils-0.3.10}/docs/make.bat +0 -0
  61. {evutils-0.3.7 → evutils-0.3.10}/docs/source/_static/event_hexagon_broken.webp +0 -0
  62. {evutils-0.3.7 → evutils-0.3.10}/docs/source/_templates/autoapi/python/module.rst +0 -0
  63. {evutils-0.3.7 → evutils-0.3.10}/docs/source/benchmarks/README.md +0 -0
  64. {evutils-0.3.7 → evutils-0.3.10}/docs/source/conf.py +0 -0
  65. {evutils-0.3.7 → evutils-0.3.10}/docs/source/index.rst +0 -0
  66. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/__init__.py +0 -0
  67. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/augment/__init__.py +0 -0
  68. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/augment/_drop.py +0 -0
  69. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/chunking.py +0 -0
  70. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/dataset/__init__.py +0 -0
  71. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/__init__.py +0 -0
  72. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_aedat.py +0 -0
  73. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_aer.py +0 -0
  74. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_bin.py +0 -0
  75. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_csv.py +0 -0
  76. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_dat.py +0 -0
  77. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_event_reader.py +0 -0
  78. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_event_writer.py +0 -0
  79. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_evt.py +0 -0
  80. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_hdf5.py +0 -0
  81. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_native_evt.py +0 -0
  82. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_npz.py +0 -0
  83. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/_source.py +0 -0
  84. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/buffer.py +0 -0
  85. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/common.py +0 -0
  86. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/decoders.py +0 -0
  87. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/io/encoders.py +0 -0
  88. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/processing/__init__.py +0 -0
  89. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/processing/_masking.py +0 -0
  90. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/processing/_utils.py +0 -0
  91. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/random.py +0 -0
  92. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/__init__.py +0 -0
  93. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/_frame.py +0 -0
  94. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/_histogram.py +0 -0
  95. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/_timesurface.py +0 -0
  96. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/_tore.py +0 -0
  97. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/repr/_voxel.py +0 -0
  98. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/torch/__init__.py +0 -0
  99. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/types.py +0 -0
  100. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/utils/__init__.py +0 -0
  101. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/utils/_checker.py +0 -0
  102. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/__init__.py +0 -0
  103. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/open3d.py +0 -0
  104. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/plot3d.py +0 -0
  105. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/reconstructor/__init__.py +0 -0
  106. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/reconstructor/_base.py +0 -0
  107. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/reconstructor/metavision.py +0 -0
  108. {evutils-0.3.7 → evutils-0.3.10}/src/evutils/vis/reconstructor/rpg.py +0 -0
  109. /evutils-0.3.7/tests/io/test_bin.py → /evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/__init__.py +0 -0
  110. /evutils-0.3.7/tests/io/test_dat.py → /evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/data/.gitignore +0 -0
  111. /evutils-0.3.7/tests/io/test_hdf5.py → /evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/model/__init__.py +0 -0
  112. /evutils-0.3.7/tests/io/test_npz.py → /evutils-0.3.10/src/evutils/vis/reconstructor/rpg_e2vid/options/__init__.py +0 -0
  113. {evutils-0.3.7 → evutils-0.3.10}/tests/conftest.py +0 -0
  114. {evutils-0.3.7 → evutils-0.3.10}/tests/io/conftest.py +0 -0
  115. {evutils-0.3.7 → evutils-0.3.10}/tests/io/test_csv.py +0 -0
  116. {evutils-0.3.7 → evutils-0.3.10}/tests/io/test_evt.py +0 -0
  117. {evutils-0.3.7 → evutils-0.3.10}/tests/test_random.py +0 -0
  118. {evutils-0.3.7 → evutils-0.3.10}/tests/test_types.py +0 -0
  119. {evutils-0.3.7 → evutils-0.3.10}/tests/test_vis.py +0 -0
  120. {evutils-0.3.7 → evutils-0.3.10}/uv.lock +0 -0
@@ -0,0 +1,143 @@
1
+ name: Release & Publish Docs
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: # manual runs to exercise the multi-OS wheel build without releasing
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write # Required for trusted PyPI publishing and GitHub Pages deployment
11
+ pages: write # Required for GitHub Pages deployment
12
+
13
+ jobs:
14
+ # Gate everything on the test suite -- no wheels/sdist/publish unless it passes.
15
+ test:
16
+ name: Tests
17
+ uses: ./.github/workflows/test.yaml
18
+
19
+ build_wheels:
20
+ name: Wheels (${{ matrix.os }})
21
+ needs: test
22
+ runs-on: ${{ matrix.os }}
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ # linux x86_64 + arm64 | windows amd64 | macOS (arm64 runner builds both
27
+ # arm64 natively and x86_64 via cross-compile -- see CIBW_ARCHS_MACOS).
28
+ os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14]
29
+ steps:
30
+ - name: Checkout repository
31
+ uses: actions/checkout@v7
32
+ with:
33
+ submodules: recursive
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: "3.12"
39
+
40
+ - name: Build wheels (cibuildwheel)
41
+ run: pipx run cibuildwheel --output-dir wheelhouse
42
+ env:
43
+ # requires-python (>=3.10) limits the CPython versions built. Skip
44
+ # musllinux, the 32-bit Windows build (win32 has no SIMD path and no
45
+ # numeric-stack wheels), and the free-threaded (cp*t) builds -> standard
46
+ # 64-bit CPython 3.10-3.14 manylinux/macos/win wheels.
47
+ CIBW_SKIP: "*musllinux* *-win32 cp3*t-*"
48
+ # Build both macOS arches on the arm64 runner (x86_64 is cross-compiled;
49
+ # its wheels can't be test-run here, which is fine -- we don't run tests
50
+ # in cibuildwheel). Ignored on Linux/Windows.
51
+ CIBW_ARCHS_MACOS: "x86_64 arm64"
52
+
53
+ - name: Upload wheels
54
+ uses: actions/upload-artifact@v4
55
+ with:
56
+ name: dist-${{ matrix.os }}
57
+ path: wheelhouse/*.whl
58
+
59
+ build_sdist:
60
+ name: Source distribution
61
+ needs: test
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ - name: Checkout repository
65
+ uses: actions/checkout@v7
66
+ with:
67
+ submodules: recursive
68
+
69
+ - name: Set up Python
70
+ uses: actions/setup-python@v6
71
+ with:
72
+ python-version: "3.12"
73
+
74
+ - name: Build sdist
75
+ run: pipx run build --sdist
76
+
77
+ - name: Upload sdist
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: dist-sdist
81
+ path: dist/*.tar.gz
82
+
83
+ publish_pypi:
84
+ name: Publish to PyPI
85
+ needs: [build_wheels, build_sdist]
86
+ runs-on: ubuntu-latest
87
+ if: github.event_name == 'release'
88
+ steps:
89
+ - name: Download all distributions
90
+ uses: actions/download-artifact@v4
91
+ with:
92
+ path: dist
93
+ pattern: dist-*
94
+ merge-multiple: true
95
+
96
+ - name: Publish to PyPI
97
+ uses: pypa/gh-action-pypi-publish@release/v1
98
+
99
+ build_and_publish_docs:
100
+ name: Build & Publish Sphinx Docs
101
+ needs: test
102
+ runs-on: ubuntu-latest
103
+ if: github.event_name == 'release'
104
+ # deploy-pages@v4 requires the deploying job to target the github-pages environment.
105
+ environment:
106
+ name: github-pages
107
+ url: ${{ steps.deployment.outputs.page_url }}
108
+ steps:
109
+ - name: Checkout repository
110
+ uses: actions/checkout@v7
111
+ with:
112
+ submodules: recursive
113
+
114
+ - name: Install uv
115
+ uses: astral-sh/setup-uv@v8.2.0
116
+ with:
117
+ enable-cache: true
118
+
119
+ - name: Set up Python
120
+ uses: actions/setup-python@v6
121
+ with:
122
+ python-version: "3.12"
123
+
124
+ - name: Install package and docs dependencies
125
+ # uv compiles the C extension locally and installs dependencies instantly
126
+ run: uv pip install --system .[docs]
127
+
128
+ - name: Build Sphinx HTML
129
+ run: |
130
+ cd docs
131
+ make html
132
+
133
+ - name: Setup GitHub Pages
134
+ uses: actions/configure-pages@v6
135
+
136
+ - name: Upload artifact
137
+ uses: actions/upload-pages-artifact@v5
138
+ with:
139
+ path: 'docs/build/html'
140
+
141
+ - name: Deploy to GitHub Pages
142
+ id: deployment
143
+ uses: actions/deploy-pages@v4
@@ -5,6 +5,7 @@ on:
5
5
  branches: [main, feature/*, fix/*]
6
6
  pull_request:
7
7
  branches: [main, feature/*, fix/*]
8
+ workflow_call: # allow other workflows (e.g. release) to gate on the tests
8
9
 
9
10
  jobs:
10
11
  test:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evutils
3
- Version: 0.3.7
3
+ Version: 0.3.10
4
4
  Summary: Utilities for event-based vision
5
5
  Keywords: events,dvs,neuromorphic,vision,event-based
6
6
  Author-Email: Jakub Mandula <jakub.mandula@pbl.ee.ethz.ch>
@@ -0,0 +1,55 @@
1
+ /* evutils — compiler/portability shims.
2
+ *
3
+ * The parsers are written with GCC/Clang extensions (the GNU builtins, the C99
4
+ * `restrict` keyword, `__attribute__`, and the `__x86_64__`/`__aarch64__` arch
5
+ * macros). MSVC (the default compiler for Windows wheels) spells these
6
+ * differently or lacks them; this header bridges the gap so the same sources
7
+ * build on Linux, macOS and Windows.
8
+ */
9
+ #ifndef EVUTILS_COMPAT_H
10
+ #define EVUTILS_COMPAT_H
11
+
12
+ #if defined(_MSC_VER)
13
+
14
+ #include <intrin.h>
15
+
16
+ /* C99 `restrict` (and GCC's `__restrict__` spelling) -> MSVC's __restrict. */
17
+ #ifndef restrict
18
+ #define restrict __restrict
19
+ #endif
20
+ #define __restrict__ __restrict
21
+
22
+ /* Branch-prediction hints: no MSVC equivalent, so compile them out. */
23
+ #define likely(x) (x)
24
+ #define unlikely(x) (x)
25
+
26
+ /* GNU builtins used by the parsers. */
27
+ #define __builtin_unreachable() __assume(0)
28
+ #define __builtin_prefetch(...) ((void)0)
29
+ #ifndef __attribute__
30
+ #define __attribute__(x) /* e.g. __attribute__((fallthrough)) */
31
+ #endif
32
+
33
+ static __forceinline int __builtin_ctz(unsigned int x) {
34
+ unsigned long index;
35
+ _BitScanForward(&index, x);
36
+ return (int)index;
37
+ }
38
+
39
+ /* MSVC uses _M_X64 / _M_ARM64 rather than __x86_64__ / __aarch64__; map them
40
+ * so the SIMD dispatch in evt3.c selects the right path. */
41
+ #if defined(_M_X64) && !defined(__x86_64__)
42
+ #define __x86_64__ 1
43
+ #endif
44
+ #if defined(_M_ARM64) && !defined(__aarch64__)
45
+ #define __aarch64__ 1
46
+ #endif
47
+
48
+ #else /* GCC / Clang */
49
+
50
+ #define likely(x) __builtin_expect(!!(x), 1)
51
+ #define unlikely(x) __builtin_expect(!!(x), 0)
52
+
53
+ #endif
54
+
55
+ #endif /* EVUTILS_COMPAT_H */
@@ -1,6 +1,7 @@
1
1
  #ifndef EVUTILS_PARSER_H
2
2
  #define EVUTILS_PARSER_H
3
3
 
4
+ #include "evutils/compat.h"
4
5
  #include "evutils/types.h"
5
6
 
6
7
  #ifdef __cplusplus
@@ -24,8 +25,8 @@ typedef struct parser_result_s {
24
25
 
25
26
 
26
27
 
27
- #define likely(x) __builtin_expect(!!(x),1)
28
- #define unlikely(x) __builtin_expect(!!(x),0)
28
+ /* likely()/unlikely() are provided by compat.h (GNU builtins on GCC/Clang,
29
+ * no-ops on MSVC). */
29
30
 
30
31
 
31
32
  #ifdef __cplusplus
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
5
5
 
6
6
  [project]
7
7
  name = "evutils"
8
- version = "0.3.7"
8
+ version = "0.3.10"
9
9
  description = "Utilities for event-based vision"
10
10
  readme = "README.md"
11
11
  license = {file = "LICENSE"}
@@ -0,0 +1 @@
1
+ gitdir: ../../../../../.git/modules/vis/rpg_e2vid