Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Introduction to atelier
¶
(1) To finish the installation of your Lino developer environment, you
must configure the atelier
package. This atelier
package is a
minimalistic project management tool. As a Lino developer you are going to use
it everyday without even noticing. It is a Python package and was installed into
your virtualenv (because you said --devtools
when you ran
getlino configure
as instructed here).
The pp
command¶
(2) Atelier brings the pp
command into your developer
environment.
- pp¶
Loop over all your repositories and run the given shell command on each of them.
(3) Before you can use this command, you must configure atelier.
Configure atelier¶
(4) To configure atelier, you must simply create your
~/.atelier/config.py
file…
$ mkdir ~/.atelier
$ nano ~/.atelier/config.py
… and then paste the following content into your file:
from pathlib import Path
for root in ["~/lino/lino_local", "~/lino/env/repositories"]:
for p in Path(root).expanduser().iterdir():
if p.is_dir() and (p / "tasks.py").exists():
add_project(str(p))
(5) To exit the nano
editor, hit Ctrl-X and then answer
y when nano
asks you whether you want to save your modifications.
(6) Test whether it worked:
$ pp -l
========= ========= ==========================================
Project Status URL
--------- --------- ------------------------------------------
lino master! http://www.lino-framework.org
xl master http://www.lino-framework.org
noi master http://noi.lino-framework.org
cosi master http://cosi.lino-framework.org
avanti master http://avanti.lino-framework.org/
vilma master http://vilma.lino-framework.org
care master http://care.lino-framework.org
tera master http://tera.lino-framework.org
book master! http://www.lino-framework.org
voga master http://voga.lino-framework.org
welfare master https://welfare.lino-framework.org
amici master http://amici.lino-framework.org
========= ========= ==========================================
(7) pp
is a shell alias for per_project
, which came to
your computer with atelier
. Click on per_project
to read the gory
details.
About atelier projects¶
(8) The ~/.atelier/config.py
file defines the list of your
“atelier projects”. A “project”, for atelier, is any directory containing at
least a file tasks.py
.
(9) Every Lino source repository on your computer is an atelier project.
(10) You “activate” a project by opening a terminal and changing to its directory. That’s all. Almost all. Read on.
An atelier project usually corresponds to a public code repository (using Git or Mercurial). But you can have unpublished projects that have no repo at all.
One atelier project can contain one or more demo projects.
An atelier project usually corresponds to a given Python package to be published on PyPI.
An atelier project can have a number of Sphinx document trees (default is one tree named
docs
).
(11) Your atelier projects don’t need to be under a single base
directory. You will have different project base directories. One of them is
~/lino/lino_local
, but another one is ~/lino/env/repositories
:
- ~/lino/env/repositories¶
The base directory for every repository you cloned from GitLab.
Usage examples¶
(12) Download the latest version for all your cloned repositories:
$ pp git pull
(13) It happens that I type the following before leaving my computer for getting a cup of coffee:
$ pp inv prep test bd
Which is: in each Lino repository, run inv prep
followed by inv
test
followed by inv bd
.