ݺߣ

ݺߣShare a Scribd company logo
Invoke
y como poner en marcha
un entorno de trabajo.fonts
Pythonic task execution
$ pip install invoke
DOC:
http://docs.pyinvoke.org/
$ tasks/___init__.py
from invoke import run, task
@task
def hello(name='Raimon'):
'''It's an invoke demo'''
print Hello %s % name
$ invoke hola
https://bitbucket.org/trytonspain/
Trytontasks
Mtodos hg (mercurial)
? hg_clone
?
$ pip install hg+https://bitbucket.org/trytonspain/trytontasks-scm
trytontasks-scm
Tareas de mdulos
? config - Clone/Update config repo
? clone - Clone trytond modules
? increase_module_version - Increase version of module
? branches - Show info module branches
$ pip install hg+https://bitbucket.org/trytonspain/trytontasks-modules
trytontasks-modules
Tareas para GAL (data demo). Requiere proteus.
? create - Create new Gal Database (PostgreSQL)
? install - Install modules and create data
? dump - Dump PSQL Database to SQL file
? restore - Create PSQL Database and restore SQL file
? Dropdb - Drop PSQL Database
$ pip install hg+https://bitbucket.org/trytonspain/trytontasks-gal
trytontasks-gal
Tareas para SAO
? install - Install SAO
? grunt C Grunt SAO
? open C Open SAO in browser
$ pip install hg+https://bitbucket.org/trytonspain/trytontasks-sao
trytontasks-sao
Tareas para GAL (data demo). Requiere proteus.
? install - Install User DOC
? make - Make User DOC
? build - Build User DOC (html, singlehtml...)
? open - Open User DOC in browser
$ pip install hg+https://bitbucket.org/trytonspain/trytontasks-userdoc
Proyecto de documentacin:
https://bitbucket.org/trytonspain/trytond-doc
trytontasks-userdoc
from invoke import Collection
# import here your tryton tasks projects
import trytontasks_modules
import trytontasks_sao
import trytontasks_userdoc
ns = Collection()
ns.add_collection(Collection.from_module(trytontasks_modules, name='modules'))
ns.add_collection(Collection.from_module(trytontasks_sao, name='sao'))
ns.add_collection(Collection.from_module(trytontasks_userdoc, name='doc'))
Tasks
$ invoke modules.config -r https://bitbucket.org/nantic/tryton-config
$ invoke modules.clone Cconfig=base.cfg # importante! Crea los directorios base
$ invoke modules.clone --config=trytonspain.cfg
$ invoke modules.clone
$ invoke modules.branches
Crear un entorno
http://www.NaN-tic.com
Raimon Esteve Cusin
raimon@nan-tic.com
@raimonesteve
Invoke y como poner en marcha un entorno de trabajo

More Related Content

Invoke y como poner en marcha un entorno de trabajo

  • 1. Invoke y como poner en marcha un entorno de trabajo.fonts
  • 2. Pythonic task execution $ pip install invoke DOC: http://docs.pyinvoke.org/
  • 3. $ tasks/___init__.py from invoke import run, task @task def hello(name='Raimon'): '''It's an invoke demo''' print Hello %s % name $ invoke hola
  • 5. Mtodos hg (mercurial) ? hg_clone ? $ pip install hg+https://bitbucket.org/trytonspain/trytontasks-scm trytontasks-scm
  • 6. Tareas de mdulos ? config - Clone/Update config repo ? clone - Clone trytond modules ? increase_module_version - Increase version of module ? branches - Show info module branches $ pip install hg+https://bitbucket.org/trytonspain/trytontasks-modules trytontasks-modules
  • 7. Tareas para GAL (data demo). Requiere proteus. ? create - Create new Gal Database (PostgreSQL) ? install - Install modules and create data ? dump - Dump PSQL Database to SQL file ? restore - Create PSQL Database and restore SQL file ? Dropdb - Drop PSQL Database $ pip install hg+https://bitbucket.org/trytonspain/trytontasks-gal trytontasks-gal
  • 8. Tareas para SAO ? install - Install SAO ? grunt C Grunt SAO ? open C Open SAO in browser $ pip install hg+https://bitbucket.org/trytonspain/trytontasks-sao trytontasks-sao
  • 9. Tareas para GAL (data demo). Requiere proteus. ? install - Install User DOC ? make - Make User DOC ? build - Build User DOC (html, singlehtml...) ? open - Open User DOC in browser $ pip install hg+https://bitbucket.org/trytonspain/trytontasks-userdoc Proyecto de documentacin: https://bitbucket.org/trytonspain/trytond-doc trytontasks-userdoc
  • 10. from invoke import Collection # import here your tryton tasks projects import trytontasks_modules import trytontasks_sao import trytontasks_userdoc ns = Collection() ns.add_collection(Collection.from_module(trytontasks_modules, name='modules')) ns.add_collection(Collection.from_module(trytontasks_sao, name='sao')) ns.add_collection(Collection.from_module(trytontasks_userdoc, name='doc')) Tasks
  • 11. $ invoke modules.config -r https://bitbucket.org/nantic/tryton-config $ invoke modules.clone Cconfig=base.cfg # importante! Crea los directorios base $ invoke modules.clone --config=trytonspain.cfg $ invoke modules.clone $ invoke modules.branches Crear un entorno