add standard files & requirement
tested and built exe file in SG
This commit is contained in:
parent
744e51d63d
commit
caca377f4a
122
.gitignore
vendored
Normal file
122
.gitignore
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
devenv
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
.idea
|
||||
.vscode
|
||||
.DS_Store
|
||||
venus/*
|
||||
*.deb
|
||||
*.deb.tar
|
||||
@ -185,7 +185,7 @@ class ModbusConfigChanger:
|
||||
|
||||
print(f" {param_name}: Current = {current_value:.1f}, Target = {target_value:.1f}")
|
||||
|
||||
if abs(current_value - target_value) > 0.1: # Allow small tolerance
|
||||
if abs(current_value - target_value) > 0.01: # Allow small tolerance
|
||||
print(f"> Updating {param_name} from {current_value:.1f} to {target_value:.1f}")
|
||||
if self.write_float_register(address, target_value):
|
||||
# Read back to verify
|
||||
2426
poetry.lock
generated
Normal file
2426
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
50
pyproject.toml
Normal file
50
pyproject.toml
Normal file
@ -0,0 +1,50 @@
|
||||
[tool.poetry]
|
||||
name = "xnergy-example"
|
||||
version = "0.2.0"
|
||||
description = "An example for Xnergy charger"
|
||||
authors = ["longqi <longqi90@gmail.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.14"
|
||||
minimalmodbus = "^2.1.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.requires-plugins]
|
||||
poetry-plugin-export = ">=1.8"
|
||||
poetry-plugin-shell = ">=1.0.1"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
nuitka = "^2.7.2"
|
||||
poetry = "^2.1.3"
|
||||
ipython = "^8.11.0"
|
||||
flake8 = "^7.2.0"
|
||||
yapf = "^0.43.0"
|
||||
pyinstaller = "^6.13.0"
|
||||
|
||||
|
||||
[[tool.poetry.source]]
|
||||
name = "default"
|
||||
url = "https://pypi.python.org/simple/"
|
||||
priority = "primary"
|
||||
|
||||
[[tool.poetry.source]]
|
||||
name = "aliyun"
|
||||
url = "https://mirrors.aliyun.com/pypi/simple/"
|
||||
priority = "supplemental"
|
||||
|
||||
[[tool.poetry.source]]
|
||||
name = "tsinghua"
|
||||
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
|
||||
priority = "supplemental"
|
||||
|
||||
[tool.yapf]
|
||||
use_tabs = true
|
||||
column_limit = 120
|
||||
continuation_align_style = "valign-right"
|
||||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@ -0,0 +1,4 @@
|
||||
--index-url https://pypi.python.org/simple
|
||||
|
||||
minimalmodbus==2.1.1 ; python_version >= "3.9" and python_version < "3.14"
|
||||
pyserial==3.5 ; python_version >= "3.9" and python_version < "3.14"
|
||||
BIN
xnergy_favicon.ico
Normal file
BIN
xnergy_favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Loading…
x
Reference in New Issue
Block a user