Subject: Re: [Ufl] [Branch ~ufl-core/ufl/main] Rev 1126: Add script ufl-version that just prints the version number. Useful for

From: Kristian Ølgaard <[email-masked]>
Date: Tue, 14 Jun 2011 16:23:55 +0200

Isn't it easier to just import __version__ from ufl when documenting the module?

Kristian

On 14 June 2011 16:20,  <[email-masked]> wrote:
> ------------------------------------------------------------
> revno: 1126
> committer: Anders Logg <[email-masked]>
> branch nick: work
> timestamp: Tue 2011-06-14 16:18:31 +0200
> message:
>  Add script ufl-version that just prints the version number. Useful for
>  among other things the documentation extraction system.
> added:
>  scripts/ufl-version
> modified:
>  ChangeLog
>  setup.py
>
>
> --
> lp:ufl
> https://code.launchpad.net/~ufl-core/ufl/main
>
> Your team UFL Core Team is subscribed to branch lp:ufl.
> To unsubscribe from this branch go to https://code.launchpad.net/~ufl-core/ufl/main/+edit-subscription
>
> === modified file 'ChangeLog'
> --- ChangeLog   2011-06-08 10:12:16 +0000
> +++ ChangeLog   2011-06-14 14:18:31 +0000
> @@ -1,4 +1,5 @@
>  0.9.? [?]
> + - Add script ufl-version
>  - Added syntax for associating an arbitrary domain data object with a measure:
>        dss = ds[boundaries]; M = f*dss(1) + g*dss(2)
>  - Added new operators elem_mult, elem_div, elem_pow and elem_op for
>
> === added file 'scripts/ufl-version'
> --- scripts/ufl-version 1970-01-01 00:00:00 +0000
> +++ scripts/ufl-version 2011-06-14 14:18:31 +0000
> @@ -0,0 +1,26 @@
> +#!/usr/bin/env python
> +
> +# Copyright (C) 2011 Anders Logg.
> +#
> +# This file is part of UFL.
> +#
> +# UFL is free software: you can redistribute it and/or modify
> +# it under the terms of the GNU Lesser General Public License as published by
> +# the Free Software Foundation, either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# UFL is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU Lesser General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public License
> +# along with UFL. If not, see <http://www.gnu.org/licenses/>.
> +#
> +# First added:  2011-06-14
> +# Last changed: 2011-06-14
> +
> +# This is a simple script that just prints the UFL version number.
> +
> +from ufl import __version__
> +print __version__
>
> === modified file 'setup.py'
> --- setup.py    2011-06-09 13:35:39 +0000
> +++ setup.py    2011-06-14 14:18:31 +0000
> @@ -13,6 +13,7 @@
>
>  scripts = [pjoin("scripts", "ufl-analyse"),
>            pjoin("scripts", "ufl-convert"),
> +           pjoin("scripts", "ufl-version"),
>            pjoin("scripts", "ufl2py"),
>            pjoin("scripts", "form2ufl")]
>
>
>
>

---

From: Anders Logg <[email-masked]>
Date: Tue, 14 Jun 2011 16:31:24 +0200

It's a shell script and I find a ufl-version script useful in other
cases too.

--
Anders

On Tue, Jun 14, 2011 at 04:23:55PM +0200, Kristian Ølgaard wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp

---

From: Anders Logg <[email-masked]>
Date: Tue, 14 Jun 2011 16:41:09 +0200

> It's a shell script and I find a ufl-version script useful in other

I mean the shell script (import_docs) that I'm working on to import
the API docs from all projects into the web repository. I know I can
get it easily by calling Python from the shell but we already have
dolfin-version so having an ufl-version is both convenient and natural.

--
Anders

---

From: Kristian Ølgaard <[email-masked]>
Date: Tue, 14 Jun 2011 16:42:30 +0200

> dolfin-version so having an ufl-version is both convenient and natural.

OK, now it makes more sense.

Kristian