通用气动测量数据简化工具
aiolos-tools的Python项目详细描述
python库,用于实验或计算气动数据的简化和分析
使用
代码_仪表.计时器在
add the following to any function or scope in a program and the execution time will be logged (must use logging library and add the “aiolos_code_instrumentation.timer” logger)
>>> from code_instrumentation.timer import timer >>> _ = timer.Timer()to display the execution time, add the timer logger and set the logging lever to TIMER
>>> import logging >>> from aiolos_code_instrumentation.add_logging_level import TIMER >>> log = logging.getLogger("aiolos_code_instrumentation.timer") >>> log.setLevel(TIMER)to output to terminal:
>>> streamhandler = logging.StreamHandler() >>> streamhandler.setLevel(TIMER) >>> log.addHandler(streamhandler)this can all be achieved using a log.conf file as well.
调试_工具.单位在
the unit conversions are to be used when importing data to convert the data to base SI units. e.g.:
>>> import commissoning_tools.units as units >>> p = read(data_file_pressures_psi) * units.psi # Yeilds a pressure value in Pascals >>> t = read(data_file_temperatre_C) + units.celsius # Yeilds a temperature value in Kelvin
- base units are:
- length –> meter, m
- time –> second, s
- mass –> kilogram, kg
- temperature –> Kelvin
derived units use only the base. i.e. velocity is m/s, pressure is Pa (N/m^2)
机组维护
要帮助开发包,请首先在本地克隆存储库并创建一个开发分支:
在$ git clone https://github.com/csooriyakumaran/aiolos-tools
$ git branch <branch name>
$ git branch dev-cfd-tools (e.g.)
创建一个本地环境(使用venv或virtualenv)并激活
在$ python3 -m venv <virtual environment name>
$ python3 -m venv venv (e.g. will create venv\ directory)
$ venv\Scripts\activate.bat (windows)
$ source venv/bin/activate (linux)
安装要求
在$ python3 -m pip install –upgrade pip
$ python3 -m pip install -r requirements.txt
测试功能时,请确保在虚拟环境中安装了包的本地版本
在$ python3 -m pip install -e <path to local copy of aiolos-tools>
$ python3 -m pip install -e C:\users\christopher\aiolos-tools (e.g.)
合并分支
正在上载更改
冻结开发依赖项(删除对aiolos工具包的引用(如果存在的话)
在$ python3 -m pip uninstall aiolos-tools
$ python3 -m pip freeze > requirements.txt
提交对git的更改:
在$ git add .
$ git commit -m “commit message”
增量版本:
在$ bumpversion <major | minor | patch>
$ bumpversion minor (e.g.)
推送至github:
在$ git push <remote_name> <branch_name>
$ git push origin master (e.g.)
创建分发档案(只能与主分支机构一起创建)
在$ python3 -m pip install –upgrade setuptools wheel
$ python3 setup.py sdist bdist_wheel
上载到PyPI(只应与主分支一起完成)
在$ python3 -m twine upload dist/*
安装
供使用
在$ python3 -m pip install aiolos-tools
为了发展
在$ git clone https://github.com/csooriyakumaran/aiolos-tools $ python3 -m pip install -e <path to local copy of aiolos tools> $ python3 -m pip install -e c:\users\christopher\aiolos-tools
要求
- “numpy”
- “matplotlib”
- “scipy”
- “pandas”
版本
当前版本:0.2.4
更改:
0.0.0 : initial release based on aiolos-commissioning-tools 0.2.8
0.2.4 : added boundary layer and aspg procedural functions and some plotting features but removed @np.vectorize decorators in some places
兼容性
许可证
- 项目
标签: