没有项目描述
rye的Python项目详细描述
简介
rye是一个python任务自动化工具。它是oneofalonglist其他项目。现在的问题应该是,为什么? 答案是我有一个工作流程,但是不能完全得到 其他的工具。
- 从一个简单的配置文件中读取
- 为每个环境维护一组virtualenv
- 在pyproject.toml或poetry.lock文件更改时更新这些环境。
- 并行运行我的所有任务
- 让任务共享有意义的环境(lint和typing?)
- 与诗歌合作
- 允许分别安装依赖项和包(用于dockerfile缓存)
我试着在没有考虑太多的情况下建立这个,并且一直在和 毒素是默认的。我看了nox和invoke-nox需要更多 然后编程tox,仍然有一堆默认值,我必须想办法 重写。invoke会从头开始工作。
我真正想要的是makefile-list任务,指定这些任务的依赖关系, 当依赖关系改变时重建它们。要运行的实际命令应该 完全可配置。我知道用一个makefile来设置它-但那会 要有相当数量的自定义代码。如果我能让它看起来像毒物,但表现得像 做什么?
# pyproject.toml[tool.rye]default_tasks=["test", "lint", "format", "typing"][tool.rye."task.pytest"]target_environments=["poetry.py37", "poetry.py36"][tool.rye."poetry.py36"."task.pytest"]commands=[["pytest", "tests", "--no-cov"]][tool.rye."task.lint"]target_environments=["poetry.py37"]commands=[["pylint", "src/rye", "tests"]][tool.rye."task.format"]target_environments=["poetry.py37"]commands=[["black",".","--check"],["isort","-rc","-tc","--check-only","src","tests"],][tool.rye."task.typing"]target_environments=["poetry.py37"]commands=[["mypy","src/rye","--ignore-missing-imports"],]
$ rye Running tasks- ['poetry.py37', 'TASK poetry.py37#lint', 'TASK poetry.py37#format', 'TASK poetry.py37#typing'] ENV poetry.py37 > Preparing Env ENV poetry.py37 > Already using interpreter /home/pbecotte/venvs/rye/bin/python3.7 ENV poetry.py37 > Using base prefix '/usr' ENV poetry.py37 > New python executable in /home/pbecotte/PycharmProjects/rye/.rye/py37/bin/python3.7 ENV poetry.py37 > Also creating executable in /home/pbecotte/PycharmProjects/rye/.rye/py37/bin/python ENV poetry.py37 > Installing setuptools, pip, wheel...
阅读https://rye.readthedocs.io/en/latest/上的完整文档 或者在https://gitlab.com/pjbecotte/rye
安装
您可以从pypi安装rye-
pip install rye