rfserver 1.0.0__tar.gz → 1.0.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.
Files changed (29) hide show
  1. {rfserver-1.0.0 → rfserver-1.0.2}/PKG-INFO +31 -27
  2. {rfserver-1.0.0 → rfserver-1.0.2}/README.rst +22 -20
  3. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/contents/development.rst +1 -1
  4. {rfserver-1.0.0 → rfserver-1.0.2}/pyproject.toml +85 -37
  5. rfserver-1.0.2/src/rfserver/__init__.py +7 -0
  6. rfserver-1.0.2/src/rfserver/__version__.py +10 -0
  7. rfserver-1.0.2/src/rfserver/_help.py +77 -0
  8. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/db/create_database.py +1 -1
  9. rfserver-1.0.2/src/rfserver/main.py +117 -0
  10. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/rest_api/rest.py +2 -2
  11. rfserver-1.0.0/src/rfserver/__init__.py +0 -19
  12. rfserver-1.0.0/src/rfserver/main.py +0 -18
  13. {rfserver-1.0.0 → rfserver-1.0.2}/AUTHORS.md +0 -0
  14. {rfserver-1.0.0 → rfserver-1.0.2}/CHANGELOG.rst +0 -0
  15. {rfserver-1.0.0 → rfserver-1.0.2}/LICENSE +0 -0
  16. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/api/rfserver/db.rst +0 -0
  17. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/api/rfserver/rest_api.rst +0 -0
  18. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/api/rfserver.rst +0 -0
  19. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/contents/about.rst +0 -0
  20. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/contents/changelog.rst +0 -0
  21. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/contents/codeofconduct.rst +0 -0
  22. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/contents/usage.rst +0 -0
  23. {rfserver-1.0.0 → rfserver-1.0.2}/docs/source/index.rst +0 -0
  24. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/__main__.py +0 -0
  25. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/db/__init__.py +0 -0
  26. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/db/database.py +0 -0
  27. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/db/detail.db +0 -0
  28. {rfserver-1.0.0 → rfserver-1.0.2}/src/rfserver/rest_api/__init__.py +0 -0
  29. {rfserver-1.0.0 → rfserver-1.0.2}/tests/test_database.py +0 -0
@@ -1,8 +1,10 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: rfserver
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: RF Analysis Engine
5
- License: AGPL-3.0-only
5
+ License-Expression: AGPL-3.0-only
6
+ License-File: AUTHORS.md
7
+ License-File: LICENSE
6
8
  Keywords: Radio Frequency,RF,Node
7
9
  Author: Iso
8
10
  Maintainer: Iso
@@ -36,24 +38,28 @@ Requires-Dist: sphinx-inline-tabs (==2023.4.21) ; (python_version >= "3.8" and p
36
38
  Requires-Dist: sphinx-rtd-theme (<=3.0.2) ; (python_version >= "3.8" and python_version <= "3.14") and (extra == "docs")
37
39
  Requires-Dist: sphinxcontrib-mermaid (<=1.0.0) ; (python_version >= "3.8" and python_version <= "3.14") and (extra == "docs")
38
40
  Requires-Dist: sphinxcontrib-spelling (<=8.0.1) ; (python_version >= "3.10" and python_version <= "3.14") and (extra == "docs")
39
- Project-URL: Bug Tracker, https://github.com/alanmehio/rf-analysis-engine/issues
40
- Project-URL: CI: Github Actions, https://github.com/alanmehio/rf-analysis-engine/actions
41
- Project-URL: Changelog, https://github.com/alanmehio/rf-analysis-engine/blob/master/CHANGELOG.rst
41
+ Project-URL: Bug Tracker, https://github.com/alan-techdev/rf-analysis-engine/issues
42
+ Project-URL: CI: Github Actions, https://github.com/alan-techdev/rf-analysis-engine/actions
43
+ Project-URL: Changelog, https://github.com/alan-techdev/rf-analysis-engine/blob/master/CHANGELOG.rst
42
44
  Project-URL: Documentation, https://rf-analysis-engine.readthedocs.io/
43
- Project-URL: Source Code, https://github.com/alanmehio/rf-analysis-engine
45
+ Project-URL: Source Code, https://github.com/alan-techdev/rf-analysis-engine
44
46
  Description-Content-Type: text/x-rst
45
47
 
46
48
  RF Analysis Engine
47
49
  ==================
48
50
 
51
+ All data collected from the **RF Surveillance Central(rfcentral)** is being mined by different AI ML ( machine learning) models to extract useful data for the
52
+ radio frequency.
53
+
49
54
  =================
50
55
  COMMUNITY VERSION
51
56
  =================
52
57
 
58
+
53
59
  .. start-badges see https://shields.io/badges and collection see https://github.com/inttter/md-badges
54
60
 
55
61
  | |build| |release_version| |wheel|
56
- | |docs| |pylint| |supported_versions|
62
+ | |docs| |supported_versions| |contributors|
57
63
  | |ruff| |gh-lic| |commits_since_specific_tag_on_main|
58
64
 
59
65
 
@@ -64,12 +70,12 @@ COMMUNITY VERSION
64
70
  ==========
65
71
  Change Log
66
72
  ==========
67
- | `Change Log <https://github.com/alanmehio/rf-analysis-engine/blob/main/CHANGELOG.rst>`_.
73
+ | `Change Log <https://github.com/alan-techdev/rf-analysis-engine/blob/main/CHANGELOG.rst>`_.
68
74
 
69
75
  ==========
70
76
  Quickstart
71
77
  ==========
72
- | `Usage <https://github.com/alanmehio/rf-analysis-engine/blob/main/docs/source/contents/usage.rst>`_.
78
+ | `Usage <https://github.com/alan-techdev/rf-analysis-engine/blob/main/docs/source/contents/usage.rst>`_.
73
79
 
74
80
  =======
75
81
  License
@@ -81,7 +87,7 @@ License
81
87
 
82
88
  .. LINKS
83
89
 
84
- .. _GNU Affero General Public License v3.0: https://github.com/alanmehio/rf-analysis-engine/blob/main/LICENSE
90
+ .. _GNU Affero General Public License v3.0: https://github.com/alan-techdev/rf-analysis-engine/blob/main/LICENSE
85
91
 
86
92
 
87
93
 
@@ -90,9 +96,9 @@ License
90
96
  .. Build Status
91
97
  .. Github Actions: Test Workflow Status for specific branch <branch>
92
98
 
93
- .. |build| image:: https://img.shields.io/github/workflow/status/alanmehio/rf-analysis-engine/Test%20Python%20Package/main?label=build&logo=github-actions&logoColor=%233392FF
99
+ .. |build| image:: https://img.shields.io/github/workflow/status/alan-techdev/rf-analysis-engine/actions/workflows/ci_cd.yaml/badge.svg
94
100
  :alt: GitHub Workflow Status (branch)
95
- :target: https://github.com/alanmehio/rf-analysis-engine/actions/workflows/test.yaml?query=branch%3Amain
101
+ :target: https://github.com/alan-techdev/rf-analysis-engine/actions
96
102
 
97
103
 
98
104
  .. Documentation
@@ -101,37 +107,35 @@ License
101
107
  :alt: Read the Docs (version)
102
108
  :target: https://rf-analysis-engine.readthedocs.io/en/latest/
103
109
 
104
- .. |pylint| image:: https://img.shields.io/badge/linting-pylint-yellowgreen
105
- :target: https://github.com/pylint-dev/pylint
110
+ .. |contributors| image:: https://img.shields.io/github/contributors/alan-techdev/rf-analysis-engine?color=blue&logo=github
111
+ :alt: GitHub contributors
112
+ :target: https://github.com/alan-techdev/rf-analysis-engine/graphs/contributors
106
113
 
107
114
  .. PyPI
108
115
 
109
- .. |release_version| image:: https://img.shields.io/pypi/v/rf-analysis-engine
116
+ .. |release_version| image:: https://img.shields.io/pypi/v/rfserver
110
117
  :alt: Production Version
111
- :target: https://pypi.org/project/rf-analysis-engine/
118
+ :target: https://pypi.org/project/rfserver/
112
119
 
113
- .. |wheel| image:: https://img.shields.io/pypi/wheel/rf-analysis-engine?color=green&label=wheel
120
+ .. |wheel| image:: https://img.shields.io/pypi/wheel/rfserver?color=green&label=wheel
114
121
  :alt: PyPI - Wheel
115
- :target: https://pypi.org/project/rf-analysis-engine
122
+ :target: https://pypi.org/project/rfserver
116
123
 
117
- .. |supported_versions| image:: https://img.shields.io/pypi/pyversions/rf-analysis-engine?color=blue&label=python&logo=python&logoColor=%23ccccff
124
+ .. |supported_versions| image:: https://img.shields.io/pypi/pyversions/rfserver?color=blue&label=python&logo=python&logoColor=%23ccccff
118
125
  :alt: Supported Python versions
119
- :target: https://pypi.org/project/rf-analysis-engine
126
+ :target: https://pypi.org/project/rfserver
120
127
  .. Github Releases & Tags
121
128
 
122
- .. |commits_since_specific_tag_on_main| image:: https://img.shields.io/github/commits-since/alanmehio/rf-analysis-engine/1.0.0/main?color=blue&logo=github
129
+ .. |commits_since_specific_tag_on_main| image:: https://img.shields.io/github/commits-since/alan-techdev/rf-analysis-engine/release-1.0.0/main?color=blue&logo=github
123
130
  :alt: GitHub commits since tagged version (branch)
124
- :target: https://github.com/alanmehio/rf-analysis-engine/compare/1.0.0..main
125
-
126
- .. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/alanmehio/rf-analysis-engine/latest?color=blue&logo=semver&sort=semver
127
- :alt: GitHub commits since latest release (by SemVer)
131
+ :target: https://github.com/alan-techdev/rf-analysis-engine/compare/release-1.0.0..main
128
132
 
129
133
  .. LICENSE (eg AGPL, MIT)
130
134
  .. Github License
131
135
 
132
136
  .. |gh-lic| image:: https://img.shields.io/badge/license-GNU_Affero-orange
133
137
  :alt: GitHub
134
- :target: https://github.com/alanmehio/rf-analysis-engine/blob/main/LICENSE
138
+ :target: https://github.com/alan-techdev/rf-analysis-engine/blob/main/LICENSE
135
139
 
136
140
 
137
141
  .. Ruff linter for Fast Python Linting
@@ -1,14 +1,18 @@
1
1
  RF Analysis Engine
2
2
  ==================
3
3
 
4
+ All data collected from the **RF Surveillance Central(rfcentral)** is being mined by different AI ML ( machine learning) models to extract useful data for the
5
+ radio frequency.
6
+
4
7
  =================
5
8
  COMMUNITY VERSION
6
9
  =================
7
10
 
11
+
8
12
  .. start-badges see https://shields.io/badges and collection see https://github.com/inttter/md-badges
9
13
 
10
14
  | |build| |release_version| |wheel|
11
- | |docs| |pylint| |supported_versions|
15
+ | |docs| |supported_versions| |contributors|
12
16
  | |ruff| |gh-lic| |commits_since_specific_tag_on_main|
13
17
 
14
18
 
@@ -19,12 +23,12 @@ COMMUNITY VERSION
19
23
  ==========
20
24
  Change Log
21
25
  ==========
22
- | `Change Log <https://github.com/alanmehio/rf-analysis-engine/blob/main/CHANGELOG.rst>`_.
26
+ | `Change Log <https://github.com/alan-techdev/rf-analysis-engine/blob/main/CHANGELOG.rst>`_.
23
27
 
24
28
  ==========
25
29
  Quickstart
26
30
  ==========
27
- | `Usage <https://github.com/alanmehio/rf-analysis-engine/blob/main/docs/source/contents/usage.rst>`_.
31
+ | `Usage <https://github.com/alan-techdev/rf-analysis-engine/blob/main/docs/source/contents/usage.rst>`_.
28
32
 
29
33
  =======
30
34
  License
@@ -36,7 +40,7 @@ License
36
40
 
37
41
  .. LINKS
38
42
 
39
- .. _GNU Affero General Public License v3.0: https://github.com/alanmehio/rf-analysis-engine/blob/main/LICENSE
43
+ .. _GNU Affero General Public License v3.0: https://github.com/alan-techdev/rf-analysis-engine/blob/main/LICENSE
40
44
 
41
45
 
42
46
 
@@ -45,9 +49,9 @@ License
45
49
  .. Build Status
46
50
  .. Github Actions: Test Workflow Status for specific branch <branch>
47
51
 
48
- .. |build| image:: https://img.shields.io/github/workflow/status/alanmehio/rf-analysis-engine/Test%20Python%20Package/main?label=build&logo=github-actions&logoColor=%233392FF
52
+ .. |build| image:: https://img.shields.io/github/workflow/status/alan-techdev/rf-analysis-engine/actions/workflows/ci_cd.yaml/badge.svg
49
53
  :alt: GitHub Workflow Status (branch)
50
- :target: https://github.com/alanmehio/rf-analysis-engine/actions/workflows/test.yaml?query=branch%3Amain
54
+ :target: https://github.com/alan-techdev/rf-analysis-engine/actions
51
55
 
52
56
 
53
57
  .. Documentation
@@ -56,37 +60,35 @@ License
56
60
  :alt: Read the Docs (version)
57
61
  :target: https://rf-analysis-engine.readthedocs.io/en/latest/
58
62
 
59
- .. |pylint| image:: https://img.shields.io/badge/linting-pylint-yellowgreen
60
- :target: https://github.com/pylint-dev/pylint
63
+ .. |contributors| image:: https://img.shields.io/github/contributors/alan-techdev/rf-analysis-engine?color=blue&logo=github
64
+ :alt: GitHub contributors
65
+ :target: https://github.com/alan-techdev/rf-analysis-engine/graphs/contributors
61
66
 
62
67
  .. PyPI
63
68
 
64
- .. |release_version| image:: https://img.shields.io/pypi/v/rf-analysis-engine
69
+ .. |release_version| image:: https://img.shields.io/pypi/v/rfserver
65
70
  :alt: Production Version
66
- :target: https://pypi.org/project/rf-analysis-engine/
71
+ :target: https://pypi.org/project/rfserver/
67
72
 
68
- .. |wheel| image:: https://img.shields.io/pypi/wheel/rf-analysis-engine?color=green&label=wheel
73
+ .. |wheel| image:: https://img.shields.io/pypi/wheel/rfserver?color=green&label=wheel
69
74
  :alt: PyPI - Wheel
70
- :target: https://pypi.org/project/rf-analysis-engine
75
+ :target: https://pypi.org/project/rfserver
71
76
 
72
- .. |supported_versions| image:: https://img.shields.io/pypi/pyversions/rf-analysis-engine?color=blue&label=python&logo=python&logoColor=%23ccccff
77
+ .. |supported_versions| image:: https://img.shields.io/pypi/pyversions/rfserver?color=blue&label=python&logo=python&logoColor=%23ccccff
73
78
  :alt: Supported Python versions
74
- :target: https://pypi.org/project/rf-analysis-engine
79
+ :target: https://pypi.org/project/rfserver
75
80
  .. Github Releases & Tags
76
81
 
77
- .. |commits_since_specific_tag_on_main| image:: https://img.shields.io/github/commits-since/alanmehio/rf-analysis-engine/1.0.0/main?color=blue&logo=github
82
+ .. |commits_since_specific_tag_on_main| image:: https://img.shields.io/github/commits-since/alan-techdev/rf-analysis-engine/release-1.0.0/main?color=blue&logo=github
78
83
  :alt: GitHub commits since tagged version (branch)
79
- :target: https://github.com/alanmehio/rf-analysis-engine/compare/1.0.0..main
80
-
81
- .. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/alanmehio/rf-analysis-engine/latest?color=blue&logo=semver&sort=semver
82
- :alt: GitHub commits since latest release (by SemVer)
84
+ :target: https://github.com/alan-techdev/rf-analysis-engine/compare/release-1.0.0..main
83
85
 
84
86
  .. LICENSE (eg AGPL, MIT)
85
87
  .. Github License
86
88
 
87
89
  .. |gh-lic| image:: https://img.shields.io/badge/license-GNU_Affero-orange
88
90
  :alt: GitHub
89
- :target: https://github.com/alanmehio/rf-analysis-engine/blob/main/LICENSE
91
+ :target: https://github.com/alan-techdev/rf-analysis-engine/blob/main/LICENSE
90
92
 
91
93
 
92
94
  .. Ruff linter for Fast Python Linting
@@ -12,7 +12,7 @@ Development
12
12
 
13
13
  .. code-block:: shell
14
14
 
15
- git clone git@github.com:alanmehio/rf-analysis-engine.git
15
+ git clone git@github.com:alan-techdev/rf-analysis-engine.git
16
16
  cd rf-analysis-engine
17
17
 
18
18
  | Make the project in edit mode
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [project]
8
8
  name = "rfserver" # package name same as project name
9
- version = "1.0.0"
9
+ version = "1.0.2"
10
10
  description = "RF Analysis Engine"
11
11
  authors = [
12
12
  {name="Iso"},
@@ -16,8 +16,8 @@ maintainers = [{name="Iso"}, {name="Alan"}] # must be an object
16
16
  license = "AGPL-3.0-only"
17
17
  readme = {file = "README.rst", content-type = "text/x-rst"}
18
18
 
19
- homepage = "https://github.com/alanmehio/rf-analysis-engine"
20
- repository = "https://github.com/alanmehio/rf-analysis-engine"
19
+ homepage = "https://github.com/alan-techdev/rf-analysis-engine"
20
+ repository = "https://github.com/alan-techdev/rf-analysis-engine"
21
21
  documentation = "https://rf-analysis-engine.readthedocs.io/"
22
22
 
23
23
  keywords = [
@@ -48,11 +48,11 @@ classifiers = [
48
48
 
49
49
 
50
50
  # PyPi url links, that appear in 'Project Links' section
51
- urls."Bug Tracker" = "https://github.com/alanmehio/rf-analysis-engine/issues"
52
- urls."CI: Github Actions" = "https://github.com/alanmehio/rf-analysis-engine/actions"
51
+ urls."Bug Tracker" = "https://github.com/alan-techdev/rf-analysis-engine/issues"
52
+ urls."CI: Github Actions" = "https://github.com/alan-techdev/rf-analysis-engine/actions"
53
53
  urls.Documentation = "https://rf-analysis-engine.readthedocs.io/"
54
- urls."Source Code" = "https://github.com/alanmehio/rf-analysis-engine"
55
- urls.Changelog = "https://github.com/alanmehio/rf-analysis-engine/blob/master/CHANGELOG.rst"
54
+ urls."Source Code" = "https://github.com/alan-techdev/rf-analysis-engine"
55
+ urls.Changelog = "https://github.com/alan-techdev/rf-analysis-engine/blob/master/CHANGELOG.rst"
56
56
 
57
57
 
58
58
 
@@ -65,7 +65,7 @@ dependencies = [
65
65
 
66
66
  ## optional dependency for test or other purpose
67
67
  ## Install in edit mode with the test dependencies
68
- ## $ pip install -e . rfserver[test]
68
+ ## $ pip install -e . [test]
69
69
  [project.optional-dependencies]
70
70
  test = [
71
71
  "pytest (>=8.4.0); python_version >='3.9' and python_version <='3.14'",
@@ -131,32 +131,16 @@ rfserver = 'rfserver.main:main'
131
131
  # CONFIG PLACE
132
132
  ##############
133
133
 
134
- # see https://black.readthedocs.io/en/stable/ code format with max line 95
135
- [tool.black]
136
- line-length = 95
137
- include = '\.pyi?$'
138
- extend-exclude = '''
139
- '''
140
-
141
- # see https://pycqa.github.io/isort/index.html arrange the import in right order
142
- [tool.isort]
143
- profile = 'black'
144
-
145
- # see https://bandit.readthedocs.io/en/latest/ check for security volubility
146
- # Issue: [B311:blacklist] Standard pseudo-random generators are not suitable for security/cryptographic purposes.
147
- # Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
148
- [tool.bandit]
149
- tests = []
150
- skips = [
151
- "B101", # This plugin test checks for the use of the Python assert keyword. https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
152
- "B311" # https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html
153
- ]
134
+ # RUFF is a fast Python linter, written in Rust.
135
+ # It can be used as a replacement for Flake8, Pyflakes, pycodestyle, and other linters.
136
+ # It also includes some additional checks and features that are not available in those tools.
137
+ # https://docs.astral.sh/ruff/configuration/
138
+ # $ ruff check
154
139
 
155
- # RUFF covers the above so repeat is done again in one place
156
- # Linting and formatting with Ruff
157
- # see https://docs.astral.sh/ruff/configuration/
158
140
  [tool.ruff]
159
- #target-version = "py312"
141
+ target-version = "py310"
142
+ src = ["src/rfserver", "tests"]
143
+ exclude = ["docs/", "scripts"]
160
144
 
161
145
  [tool.ruff.lint]
162
146
  select = [
@@ -174,13 +158,77 @@ ignore = [
174
158
  "B008", # do not perform function calls in argument defaults
175
159
  "W191", # indentation contains tabs
176
160
  "B904", # Allow raising exceptions without from e, for HTTPException
177
- "W291", # Trailing whitespace
178
161
  "E101", # Indentation contains mixed spaces and tabs
179
162
  "W293", # Blank line contains whitespace
180
163
  ]
181
164
 
165
+ [tool.ruff.lint.isort]
166
+ known-first-party = ["rfnode"]
167
+
168
+ [tool.ruff.format]
169
+ # Use black-compatible formatting
170
+ quote-style = "double"
171
+ indent-style = "space"
172
+
173
+ [tool.ruff.lint.pydocstyle]
174
+ convention = "google"
175
+
176
+
177
+ #*********************************************************************
178
+ # mypy configuration moved from mypy.ini to pyproject.toml
179
+ # config file doc:https://mypy.readthedocs.io/en/stable/config_file.html
180
+ # $ mypy ./src/rfnode
181
+ #**********************************************************************
182
+ [tool.mypy]
183
+ # Global options:
184
+ warn_return_any = true
185
+ warn_unused_configs = true
186
+
187
+ # mypy per-module options:
188
+ [[tool.mypy.overrides]]
189
+ module = "rfnode.*"
190
+ disallow_untyped_defs = true
191
+
192
+
193
+ #*********************************************************************
194
+ # Pytest configuration moved from pytest.ini to pyproject.toml
195
+ # config file doc:https://docs.pytest.org/en/stable/reference/customize.html
196
+ # $ pytest
197
+ #**********************************************************************
198
+ [tool.pytest]
199
+ minversion = "9.0"
200
+ addopts = ["--strict-markers"]
201
+ pythonpath=["src"]
202
+ testpaths = ["tests"]
203
+
204
+
205
+ #*********************************************************************
206
+ # Test Coverage configuration moved from .coveragerc to pyproject.toml
207
+ # config file doc:https://coverage.readthedocs.io/en/7.15.4/config.html
208
+ #**********************************************************************
209
+ # $ coverage run -m pytest
210
+ [tool.coverage.run]
211
+ source = ["src/rfnode"]
212
+ parallel = true
213
+ # branch is the if else statement
214
+ branch = true
215
+
216
+ [tool.coverage.report]
217
+ fail_under=30 # threshold for test coverage, if below this number the test will fail
218
+ skip_covered = false
219
+ show_missing = true
220
+ precision = 2
221
+ omit = [
222
+ "tests/*",
223
+ "*/__init__.py"
224
+ ]
225
+
226
+ exclude_lines = [
227
+ "raise NotImplementedError",
228
+ "raise NotImplemented"
229
+ ]
230
+ ignore_errors = false
231
+
182
232
 
183
- # see scripts/parse_version.py
184
- # we need to update in toml file above and below also
185
- [tool.software-release]
186
- version_variable = "src/rfserver/__init__.py:__version__"
233
+ [tool.coverage.html]
234
+ directory = "coverage_html_report"
@@ -0,0 +1,7 @@
1
+
2
+ from .__version__ import __author__ as __author__
3
+ from .__version__ import __description__ as __description__
4
+ from .__version__ import __license__ as __license__
5
+ from .__version__ import __title__ as __title__
6
+ from .__version__ import __url__ as __url__
7
+ from .__version__ import __version__ as __version__
@@ -0,0 +1,10 @@
1
+ """
2
+ Application version
3
+ Application Summary
4
+ """
5
+ __title__ = "RFC Server"
6
+ __description__ = "Radio Frequency Surveillance Server"
7
+ __url__ = "https://rf-analysis-engine.readthedocs.io/en/latest/"
8
+ __version__ = "1.0.2"
9
+ __author__ = "Alan M - Iso H"
10
+ __license__ = "AGPL-3.0-only"
@@ -0,0 +1,77 @@
1
+ """Module containing bug report helper(s)."""
2
+
3
+ import json
4
+ import platform
5
+ import sys
6
+ from typing import Any
7
+
8
+ from . import __version__ as rfserver_version
9
+
10
+
11
+ def _implementation() -> Any:
12
+ """Return a dict with the Python implementation and version.
13
+
14
+ Provide both the name and the version of the Python implementation
15
+ currently running. For example, on CPython 3.10.3 it will return
16
+ {'name': 'CPython', 'version': '3.10.3'}.
17
+
18
+ This function works best on CPython and PyPy: in particular, it probably
19
+ doesn't work for Jython or IronPython. Future investigation should be done
20
+ to work out the correct shape of the code for those platforms.
21
+ """
22
+ implementation = platform.python_implementation()
23
+
24
+ if implementation == "CPython":
25
+ implementation_version = platform.python_version()
26
+ elif implementation == "PyPy":
27
+ pypy = sys.pypy_version_info # type: ignore[attr-defined]
28
+ implementation_version = f"{pypy.major}.{pypy.minor}.{pypy.micro}" # pyright: ignore[reportUnknownMemberType]
29
+ if sys.pypy_version_info.releaselevel != "final": # type: ignore[attr-defined]
30
+ implementation_version = "".join(
31
+ [implementation_version, sys.pypy_version_info.releaselevel] # type: ignore[attr-defined]
32
+ )
33
+ elif implementation == "Jython":
34
+ implementation_version = platform.python_version() # Complete Guess
35
+ elif implementation == "IronPython":
36
+ implementation_version = platform.python_version() # Complete Guess
37
+ else:
38
+ implementation_version = "Unknown"
39
+
40
+ return {"name": implementation, "version": implementation_version}
41
+
42
+
43
+ def info() -> dict[str, Any]:
44
+ """Generate information for a bug report."""
45
+ try:
46
+ platform_info = {
47
+ "system": platform.system(),
48
+ "release": platform.release(),
49
+ }
50
+ except OSError:
51
+ platform_info = {
52
+ "system": "Unknown",
53
+ "release": "Unknown",
54
+ }
55
+
56
+ implementation_info = _implementation()
57
+ rfserver_info = {"version": rfserver_version}
58
+
59
+
60
+
61
+
62
+ return {
63
+ "platform": platform_info,
64
+ "implementation": implementation_info,
65
+ "rfserver": {
66
+ "version": rfserver_info,
67
+ },
68
+ }
69
+
70
+
71
+ def bug_reporting() -> None:
72
+ """Pretty-print the bug information as JSON."""
73
+ print(json.dumps(info(), sort_keys=True, indent=2))
74
+
75
+
76
+ if __name__ == "__main__":
77
+ bug_reporting()
@@ -1,7 +1,7 @@
1
1
  """
2
2
  Database creator.
3
3
 
4
- This script creates the database on the user's local machine at its (script's) location.
4
+ This script creates the database on the user's local machine at its (script's) location.
5
5
  It checks if the database exists before creating a new one.
6
6
 
7
7
  Also, populates the database with dummy data that were captured from a real device.
@@ -0,0 +1,117 @@
1
+ from argparse import ArgumentParser, Namespace
2
+
3
+ from rfserver import (
4
+ __author__, # type:ignore
5
+ __description__, # type:ignore
6
+ __license__, # type:ignore
7
+ __title__, # type:ignore
8
+ __url__, # type:ignore
9
+ __version__, # type:ignore
10
+ )
11
+ from rfserver._help import bug_reporting
12
+ from rfserver.rest_api import rest
13
+
14
+ """
15
+ A- Make the project in edit mode
16
+ $ pwd
17
+ /home/alan/workspace-python/RTL-SDR/rf-surveillance
18
+ $ pip install -e .
19
+ $ rfnode setting.json -vvv -ld /home/alan/tmp
20
+
21
+ //////////////////////////////////////////
22
+
23
+ B- Using PYTHONPATH (Not recommended)
24
+ Linux:
25
+ =====
26
+ $ export PYTHONPATH=/home/alan/workspace-python/RTL-SDR/rf-surveillance/src
27
+ $ pwd
28
+ /home/alan/workspace-python/RTL-SDR/rf-surveillance/src
29
+ $ python rfnode setting.json -vvv -ld /home/alan/tmp
30
+
31
+ Windows:
32
+ ========
33
+ set PYTHONPATH=/home/alan/workspace-python/RTL-SDR/rf-surveillance/src
34
+ echo %PYTHONPATH%
35
+ python rfnode setting.json -vvv -ld /home/alan/tmp
36
+ Note: Check the devicemanager from the control panel for the port name
37
+ """
38
+
39
+
40
+ def main() -> None:
41
+ """
42
+ The main function is called only when the script is executed directly,
43
+ Execute data acquisition system using RTL-SDR devices.
44
+ It initializes a logging manager and configures it based on command-line arguments, responsible
45
+ for managing data flow between different components of the system.
46
+
47
+
48
+ """
49
+ # https://docs.python.org/3/howto/argparse.html
50
+ parser = ArgumentParser(
51
+ prog = "rfserver",
52
+ usage="rfserver [-h] [-ld dir] [-v] [--version] [--author] [--report-bug] [--description] [--license] [--title] [--url]",
53
+ description=" The server for Radio Frequency Scanner which capture given power threshold"
54
+ )
55
+
56
+ parser.add_argument(
57
+ "-ld",
58
+ "--log_directory",
59
+ help="store output log in a directory",
60
+ type=str,
61
+ metavar="dir",
62
+ )
63
+ parser.add_argument("-v",
64
+ "--verbose", help="increase output verbosity.Default to Error if not supplied, 40 is Debug", type=int, metavar="", default=0)
65
+
66
+ parser.add_argument("--version", action="store_true", help="Display current library version")
67
+ parser.add_argument("--author", action="store_true", help="Display author information")
68
+ parser.add_argument("--report-bug", action="store_true", help="Library detail information to report a bug")
69
+ parser.add_argument("--description", action="store_true", help="Display description of the package")
70
+ parser.add_argument("--license", action="store_true", help="Display license information")
71
+ parser.add_argument("--title", action="store_true", help="Display title of the package")
72
+ parser.add_argument("--url", action="store_true", help="Display read the docs url of the package")
73
+
74
+ args: Namespace = parser.parse_args()
75
+
76
+ if args.version:
77
+ print(f"Version: {__version__}")
78
+ return
79
+
80
+ if args.author:
81
+ print(f"Author: {__author__}")
82
+ return
83
+
84
+ if args.report_bug:
85
+ bug_reporting()
86
+ return
87
+
88
+ if args.description:
89
+ print(f"Description: {__description__}")
90
+ return
91
+
92
+ if args.license:
93
+ print(f"License: {__license__}")
94
+ return
95
+
96
+ if args.title:
97
+ print(f"Title: {__title__}")
98
+ return
99
+
100
+ if args.url:
101
+ print(f"URL: {__url__}")
102
+ return
103
+
104
+ rest.app.run()
105
+
106
+
107
+ if __name__ == "__main__":
108
+ main()
109
+
110
+ """
111
+ Steps:
112
+ >>> pwd
113
+ >>> python -m venv .venv
114
+ >>> source ./venv/bin/activate
115
+ >>> pip install -e .
116
+ >>> rfserver
117
+ """
@@ -18,7 +18,7 @@ app = Flask(__name__)
18
18
  methods=["GET"],
19
19
  )
20
20
  def search(
21
- min_power, max_power, min_frequency, max_frequency
21
+ min_power: float, max_power: float, min_frequency: float, max_frequency: float
22
22
  ) -> list[tuple[int, float, float, str]]:
23
23
  """Search API endpoint.
24
24
 
@@ -49,7 +49,7 @@ def search(
49
49
  (91, 104.3, 20.18, '06-06-2025 12:16:18')
50
50
  ]
51
51
  """
52
- result = DetailDataBaseManager.search_power_frequency(
52
+ result:list[tuple[int, float, float, str]] = DetailDataBaseManager.search_power_frequency(
53
53
  min_power, max_power, min_frequency, max_frequency
54
54
  )
55
55
  return result
@@ -1,19 +0,0 @@
1
- #"""RF Analysis Engine
2
- #
3
- #This application is the server for the RF-Metadata-Displayer application.
4
- #It contains a simple search api endpoint that the displayer app uses to query the database and get the results.
5
- #
6
- #Subpackages:
7
- # rest_api (rfserver.rest_api): Rest API endpoints and utilities.
8
- # db (rfserver.db): Database modules and connections.
9
- #
10
- #Attributes:
11
- # __version__ (str): Current version of the application.
12
- #"""
13
-
14
- __version__ = "1.0.0"
15
-
16
- __all__ = (
17
- "__version__",
18
- "main",
19
- )
@@ -1,18 +0,0 @@
1
- from rfserver.rest_api import rest
2
-
3
-
4
- def main() -> None:
5
- rest.app.run()
6
-
7
-
8
- if __name__ == "__main__":
9
- main()
10
-
11
- """
12
- Steps:
13
- >>> pwd
14
- >>> python -m venv .venv
15
- >>> source ./venv/bin/activate
16
- >>> pip install -e .
17
- >>> rfserver
18
- """
File without changes
File without changes
File without changes
File without changes