跳转到主要内容

DevAssistant帮助您轻松启动项目。

项目描述

https://badge.fury.io/py/devassistant.png https://travis-ci.org/devassistant/devassistant.png?branch=master https://pypip.in/d/devassistant/badge.png

DevAssistant - 轻松开始开发

DevAssistant (http://devassistant.org)可以帮助您在各种语言中创建和设置基本项目,安装依赖项,设置环境等。

它基于为每种语言/框架/…创建的“助手”(插件)的分层结构思想。

注意:在版本0.10.0之前,DevAssistant附带了一套默认的助手,只能在Fedora上使用。我们决定删除这个默认集合,创建DAPI(DevAssistant包索引), https://dapi.devassistant.org/ ——一个类似于PyPI/Rubygems的已包装助手的上游仓库。DAPI的主要目标是围绕DevAssistant建立一个社区,并为客户提供各种平台的良好支持——这是DevAssistant核心团队无法独立完成大量助手的任务。

这意味着如果您从上游仓库或PyPI获取DevAssistant,您将默认没有安装助手。要获取助手,通过网页浏览器搜索DAPI或运行 da pkg search <term> da pkg install <assistant package> 。这将安装一个或多个DAP(DevAssistant包)并附带所需的助手。

如果您想创建自己的助手并将它们上传到DAPI,请参阅http://docs.devassistant.org/en/latest/developer_documentation/create_assistant.htmlhttp://docs.devassistant.org/en/latest/developer_documentation/create_assistant/packaging_and_distributing.html

DevAssistant有四种主要的执行模式。以下解释旨在更好地说明每个模式应该做什么

create

创建新项目 - 搭建源代码、安装依赖项、初始化SCM仓库……

tweak

处理现有项目 - 添加源文件、导入到IDE中、推送到GitHub、……

prepare

为使用现有上游项目准备环境 - 安装依赖项、设置服务、……

extras

与特定项目无关的任务,例如启用服务、设置IDE、……

以下是一些您可以做的例子

# search for assistants that have "Django" in their description
$ da pkg search django
python - Python assistants (library, Django, Flask, GTK3)

# install the found "python" DAP, assuming it supports your OS/distro (and,
# if you want to install sevaral assistants, just separate them by a space)
$ da pkg install python

# find out if the installed package has documentation
$ da doc python
INFO: DAP "python" has these docs:
...
INFO: usage.txt
...
# show help
$ da doc python usage.txt

# if the documentation doesn't say it specifically, find out if there is a "create"
#  assistant in the installed "python" DAP
$ da create -h
...
{..., python, ...}
...

# there is, so let's find out if it has any subassistants
$ da create python -h
...
{..., django, ...}
...

# we found out that there is "django" subassistant, let's find out how to use it
$ da create python django -h
<help text with commandline options>

# help text tells us that django assistant doesn't have subassistants and is runnable, let's do it
$ da create python django -n ~/myproject # sets up Django project named "myproject" inside your home dir

# using the same approach with "pkg search", "pkg install" and "da tweak -h",
#  we find, install and read help for "tweak" assistant that imports projects to eclipse
$ da tweak eclipse -p ~/myproject # run in project dir or use -p to specify path

# using the same approach, we find, install and read help for assistant
#  that tries to prepare environment for a custom upstream project, possibly utilizing
#  its ".devassistant" file
$ da prepare custom -u scm_url -p directory_to_save_to

# sometimes, DevAssistant can really do a very special thing for you ...
$ da extras make-coffee

有关完整文档,请参阅http://doc.devassistant.org/

如果您有任何问题,请随时在Freenode频道#devassistant或在我们的邮件列表(https://lists.fedoraproject.org/mailman/listinfo/devassistant)上询问我们。您还可以加入我们的G+社区(https://plus.google.com/u/0/communities/112692240128429771916)或关注我们的Twitter(https://twitter.com/dev_assistant)。

如果您想了解DevAssistant的开发方向,并希望影响它,发送您的建议和评论,您应该真正加入我们的邮件列表:https://lists.fedoraproject.org/mailman/listinfo/devassistant

要开始开发,请执行以下操作

git clone https://github.com/devassistant/devassistant

并从requirements-devel.txt安装依赖项

pip install --user -r requirements-devel.txt
pip install --user -r requirements-py2.txt # Only on Python 2

除了git之外,DevAssistant还假定您的机器上已安装polkit(提供pkexec二进制文件)。如果您想使用GUI,您还需要pygobject3。

或者,假设您已安装“devassistant”DAP[待办事项:链接],您只需要执行

da prepare devassistant

DevAssistant适用于Python 2.6、2.7和>= 3.3。

整个项目采用GPLv2+许可,有关详细信息,请参阅LICENSE文件。

此项目的贡献者列表可在CONTRIBUTORS文件中找到。

支持者