bivital 0.1.2__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.
bivital-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Kevin Penner, Felix Wittenfeld, Noah Greis, University Bielefeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
bivital-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: bivital
3
+ Version: 0.1.2
4
+ Summary: BiVital Library
5
+ Author-email: University Bielefeld <ks-bivital-support@techfak.uni-bielefeld.de>
6
+ License: MIT
7
+ Project-URL: Homepage, https://bivital.eu/
8
+ Project-URL: Repository, https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital.git
9
+ Project-URL: Issues, https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital/-/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: pandas<3.0,>=2.2
21
+ Requires-Dist: pyserial<4.0,>=3.5
22
+ Requires-Dist: matplotlib<4.0,>=3.10
23
+ Provides-Extra: notebook
24
+ Requires-Dist: jupyterlab<5,>=4; extra == "notebook"
25
+ Requires-Dist: ipykernel>=6; extra == "notebook"
26
+ Dynamic: license-file
27
+
28
+ # py_bivital
29
+
30
+ **py_bivital** is the official Python library for the BiVital data workflow.
31
+ It helps you organize, preprocess and manage measurement projects, series, and raw data collected via BiVital systems.
32
+
33
+ ---
34
+
35
+ ## 🚀 Features
36
+
37
+ - Project structure setup
38
+ - Series and data import
39
+ - Label management
40
+ - CLI tool (`bvtool`) for fast interaction
41
+ - Ready for Jupyter workflows and pipeline processing
42
+
43
+ ---
44
+
45
+ ## 📦 Installation
46
+
47
+ > ✅ **Recommended Python version: 3.11/3.12**
48
+ > Other versions (e.g. 3.13) might cause compatibility issues with some dependencies like `pyarrow`.
49
+
50
+ ### 1. Create and activate a virtual environment (recommended)
51
+
52
+ #### 🔹 Option A: Using `venv` (standard Python virtual environment)
53
+
54
+ Open a terminal and navigate to your project directory:
55
+ ```
56
+ cd path/to/your/project
57
+ ```
58
+ Then create and activate your virtual environment:
59
+ ```bash
60
+ pip install virtualenv # If virtualenv is not installed
61
+ python -m venv <env> # Make sure Python 3.11/3.12 is installed
62
+ source <env>/bin/activate # On Linux/Mac
63
+ <env>\Scripts\activate # On Windows
64
+ ```
65
+
66
+ #### 🔹 Option B: Using conda
67
+ ```bash
68
+ conda create -n <env> python=3.12
69
+ conda activate <env>
70
+ conda install pip
71
+ ```
72
+
73
+ ### 2. Install via pip
74
+ ```bash
75
+ pip install git+https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital
76
+ ```
77
+ ---
78
+
79
+ ## 🛠 Usage
80
+ ### Command-Line Interface (CLI)
81
+ ```bash
82
+ bvtool -h # Show help
83
+ bvtool project -p PATH -n NAME
84
+ bvtool series -p PATH -n NAME
85
+ bvtool data -p PATH -s pc
86
+ bvtool label -p PATH
87
+ ````
88
+ ---
89
+ ## 📂 Project Structure
90
+ Your project will be organized like this:
91
+ ```
92
+ BiVitalProject/
93
+ ├── Series1/
94
+ │ └── MAC_01/
95
+ │ └── log_01.csv
96
+ └── Series2/
97
+ └── ...
98
+ ```
@@ -0,0 +1,71 @@
1
+ # py_bivital
2
+
3
+ **py_bivital** is the official Python library for the BiVital data workflow.
4
+ It helps you organize, preprocess and manage measurement projects, series, and raw data collected via BiVital systems.
5
+
6
+ ---
7
+
8
+ ## 🚀 Features
9
+
10
+ - Project structure setup
11
+ - Series and data import
12
+ - Label management
13
+ - CLI tool (`bvtool`) for fast interaction
14
+ - Ready for Jupyter workflows and pipeline processing
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
19
+
20
+ > ✅ **Recommended Python version: 3.11/3.12**
21
+ > Other versions (e.g. 3.13) might cause compatibility issues with some dependencies like `pyarrow`.
22
+
23
+ ### 1. Create and activate a virtual environment (recommended)
24
+
25
+ #### 🔹 Option A: Using `venv` (standard Python virtual environment)
26
+
27
+ Open a terminal and navigate to your project directory:
28
+ ```
29
+ cd path/to/your/project
30
+ ```
31
+ Then create and activate your virtual environment:
32
+ ```bash
33
+ pip install virtualenv # If virtualenv is not installed
34
+ python -m venv <env> # Make sure Python 3.11/3.12 is installed
35
+ source <env>/bin/activate # On Linux/Mac
36
+ <env>\Scripts\activate # On Windows
37
+ ```
38
+
39
+ #### 🔹 Option B: Using conda
40
+ ```bash
41
+ conda create -n <env> python=3.12
42
+ conda activate <env>
43
+ conda install pip
44
+ ```
45
+
46
+ ### 2. Install via pip
47
+ ```bash
48
+ pip install git+https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital
49
+ ```
50
+ ---
51
+
52
+ ## 🛠 Usage
53
+ ### Command-Line Interface (CLI)
54
+ ```bash
55
+ bvtool -h # Show help
56
+ bvtool project -p PATH -n NAME
57
+ bvtool series -p PATH -n NAME
58
+ bvtool data -p PATH -s pc
59
+ bvtool label -p PATH
60
+ ````
61
+ ---
62
+ ## 📂 Project Structure
63
+ Your project will be organized like this:
64
+ ```
65
+ BiVitalProject/
66
+ ├── Series1/
67
+ │ └── MAC_01/
68
+ │ └── log_01.csv
69
+ └── Series2/
70
+ └── ...
71
+ ```
@@ -0,0 +1,50 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "bivital"
7
+ version = "0.1.2"
8
+ description = "BiVital Library"
9
+ authors = [{ name = "University Bielefeld", email = "ks-bivital-support@techfak.uni-bielefeld.de" }]
10
+ readme = { file = "README.md", content-type = "text/markdown" }
11
+ license = { text = "MIT" }
12
+ requires-python = ">=3.10"
13
+ dependencies = [
14
+ "pandas>=2.2,<3.0",
15
+ "pyserial>=3.5,<4.0",
16
+ "matplotlib>=3.10,<4.0"
17
+ ]
18
+ classifiers = [
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "License :: OSI Approved :: MIT License",
25
+ "Operating System :: OS Independent"
26
+ ]
27
+
28
+ [project.optional-dependencies]
29
+ notebook = [
30
+ "jupyterlab>=4,<5",
31
+ "ipykernel>=6"
32
+ ]
33
+
34
+ [project.scripts]
35
+ bvtool = "bivital.bvtool:main"
36
+
37
+ [project.urls]
38
+ Homepage = "https://bivital.eu/"
39
+ Repository = "https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital.git"
40
+ Issues = "https://gitlab.ub.uni-bielefeld.de/bi-vital-open-source/py_bivital/-/issues"
41
+
42
+ [tool.setuptools]
43
+ package-dir = { "" = "src" }
44
+ include-package-data = true
45
+
46
+ [tool.setuptools.packages.find]
47
+ where = ["src"]
48
+
49
+ [tool.setuptools.package-data]
50
+ "bivital.examples.example_project" = ["**/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,59 @@
1
+ from bivital import pipeline as bvp
2
+ import argparse
3
+ import sys
4
+
5
+ def main():
6
+
7
+ #Mainparser
8
+ parser = argparse.ArgumentParser(description="Main parser with subcommands")
9
+
10
+ #Subparsers
11
+ subparsers = parser.add_subparsers(dest="subcommand", help="sub-command help --> type <argument> -h/--help")
12
+
13
+ #Project parser
14
+ project_parser = subparsers.add_parser("project", help="Project help")
15
+ project_parser.add_argument("-p", "--path", help="type the path, Default: choose from file explorer")
16
+ project_parser.add_argument("-n", "--name", help="the name of the Project or Series")
17
+
18
+ #Series parser
19
+ series_parser = subparsers.add_parser("series", help="Series help")
20
+ series_parser.add_argument("-p", "--path", help="type the path, Default: choose from file explorer")
21
+ series_parser.add_argument("-n", "--name", help="the name of the Project or Series")
22
+
23
+ #Data parser
24
+ data_parser = subparsers.add_parser("data", help="Data help")
25
+ data_parser.add_argument("-p", "--path", help="type the path, Default: choose from file explorer")
26
+ data_parser.add_argument("-s", "--source", help="PC or BiVital as Data sources, Default: ask for source", choices=['pc', 'bivital'], type=str.casefold)
27
+
28
+ #Label parser
29
+ label_parser = subparsers.add_parser("label", help="Label help")
30
+ label_parser.add_argument("-p", "--path", help="type the path, Default: choose from file explorer")
31
+
32
+ #Example parser
33
+ example_parser = subparsers.add_parser("example", help="Example help")
34
+
35
+ #Accept upper- and lowercase
36
+ if len(sys.argv) > 1:
37
+ sys.argv[1] = sys.argv[1].casefold()
38
+
39
+ args = parser.parse_args()
40
+
41
+ if args.subcommand == "project":
42
+ #call Project function
43
+ bvp.BiVital_DataPipeline().createProject(path=args.path, name=args.name)
44
+ elif args.subcommand == "series":
45
+ #call Series function
46
+ bvp.BiVital_DataPipeline().add_measurement_series(path=args.path, name=args.name)
47
+ elif args.subcommand == "data":
48
+ #call Data function
49
+ bvp.BiVital_DataPipeline().add_data(path=args.path, source=args.source)
50
+ elif args.subcommand == "label":
51
+ #call Label function
52
+ bvp.BiVital_DataPipeline().add_label(path=args.path)
53
+ elif args.subcommand == "example":
54
+ #call example function
55
+ bvp.BiVital_DataPipeline().open_example()
56
+
57
+ if __name__ == "__main__":
58
+ main()
59
+
File without changes