1.3. 从头开始创建新多维数据集

让我们从创建我们将在其中开发的多维数据集环境开始:

cd ~/myproject
# use cubicweb-ctl to generate a template for the cube
# will ask some questions, most with nice default
cubicweb-ctl newcube mycube
# makes the cube source code managed by mercurial
cd cubicweb-mycube
hg init
hg add .
hg ci

如果一切顺利,您应该看到刚才在返回的列表中创建的多维数据集 cubicweb-ctl list可用多维数据集 第节。如果没有,请参阅 ConfigurationEnv .

若要重用现有多维数据集,请将其添加到名为 __depends_cubes__ 其定义见 __pkginfo__.py .此变量用于实例打包(依赖项由系统实用工具(如APT)处理),并在创建实例的数据库时查找已使用的多维数据集。