Merge pull request #1022 from as3ii/project-update

pull/1039/head
DJ2LS 2025-11-12 08:01:57 +01:00 committed by GitHub
commit 131ce36d20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 44 additions and 53 deletions

View File

@ -35,7 +35,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .[nuitka]
- name: Build binaries
working-directory: freedata_server

View File

@ -34,7 +34,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .[nuitka]
- uses: robinraju/release-downloader@v1.12
with:

View File

@ -62,7 +62,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .[nuitka]
- name: Add MacOS certs
if: ${{startsWith(matrix.os, 'macos')}}

View File

@ -42,7 +42,7 @@ jobs:
- name: Install python packages
shell: bash
run: |
pip3 install -r requirements.txt
pip install .[test]
- name: run config tests
shell: bash

View File

@ -24,8 +24,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
pip install .[build]
- name: Build GUI
working-directory: freedata_gui
@ -35,7 +34,7 @@ jobs:
- name: Build package
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0

4
.gitignore vendored
View File

@ -35,3 +35,7 @@ venv_3.11/
venv/
test_venv/
freedata_server/lib/codec2/codec2/
# `python -m build` artifacts
/dist/
/*.egg-info/

View File

@ -40,8 +40,7 @@ ADD https://github.com/DJ2LS/FreeDATA.git#v0.16.10-alpha ./
RUN python3 -m venv /app/FreeDATA/venv
ENV PATH="/app/FreeDATA/venv/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip wheel && \
pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --upgrade pip .
WORKDIR /app/FreeDATA/freedata_server/lib

View File

@ -132,7 +132,7 @@ def open_browser_after_delay(url, delay=2):
webbrowser.open(url, new=0, autoraise=True)
if __name__ == "__main__":
def main():
host = ctx.config_manager.config.get('NETWORK', {}).get('modemaddress') or '0.0.0.0'
port = int(ctx.config_manager.config.get('NETWORK', {}).get('modemport', 5000))
@ -150,3 +150,6 @@ if __name__ == "__main__":
threading.Thread(target=open_browser_after_delay, args=(url, 2), daemon=True).start()
uvicorn.run(app, host=host, port=port, log_config=None, log_level="info")
if __name__ == "__main__":
sys.exit(main())

View File

@ -16,7 +16,7 @@ keywords = [
"freedata",
"codec2",
]
classifier = [
classifiers = [
# See https://pypi.org/classifiers/
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
@ -42,8 +42,7 @@ dependencies = [
"chardet",
"colorama",
"ordered-set",
"nuitka<=2.8.4",
"pyinstaller",
"sqlalchemy",
"websocket-client",
"fastapi[standard]",
"uvicorn[standard]",
@ -64,14 +63,34 @@ test = [
"pytest-cov",
"pytest-rerunfailures",
"pick",
"sqlalchemy",
]
dev = [
"freedata[test]",
"autopep8",
"black",
"isort",
"pycodestyle",
]
build = [
"build",
"wheel",
]
nuitka = [
"nuitka<=2.8.4",
]
[tool.setuptools.packages.find]
where = [ "." ]
exclude = [
"tools*",
]
[tool.setuptools.package-data]
freedata_server = [ "lib/**/*" ]
freedata_gui = [ "dist/**/*" ]
[tool.setuptools.dynamic]
version = { attr = "freedata_server.constants.MODEM_VERSION"}
[tool.pytest.ini_options]
testpaths = [ "tests" ]

View File

@ -8,9 +8,8 @@ requests
chardet
colorama
ordered-set
nuitka<=2.8.4
pyinstaller
websocket-client
sqlalchemy
fastapi[standard]
uvicorn[standard]
@ -23,4 +22,8 @@ pytest
pytest-cov
pytest-rerunfailures
pick
sqlalchemy
# Build
build
wheel
nuitka<=2.8.4

View File

@ -1,36 +0,0 @@
from setuptools import setup, find_packages
import freedata_server.constants as constants
# Reading requirements.txt for dependencies
with open('requirements.txt') as f:
required = f.read().splitlines()
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='freedata',
version=constants.MODEM_VERSION,
packages=find_packages(where='.'),
package_dir={'': '.'},
install_requires=required,
python_requires='>=3.10',
author='DJ2LS',
author_email='dj2ls@proton.me',
description='INFO: THIS PACKAGE IS NOT YET WORKING - PLEASE USE THE OFFICIAL SCRIPT BASED SETUP',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/DJ2LS/FreeDATA',
license='GPL3.0',
entry_points={
'console_scripts': [
'freedata=freedata_server.server:main', # Points to the main() function in server.py
],
},
include_package_data=True, # Ensure non-python files are included if specified
package_data={
# Include all files under any directory within the 'freedata_server' package
'freedata_server': ['lib/**/*'], # Recursive include for all files in 'lib' and its subdirectories
'freedata_gui': ['dist/**/*'], # gui folder
},
)