Skip to content

Commit

Permalink
Merge pull request #8 from Ghini/ghini-1.0-dev
Browse files Browse the repository at this point in the history
Ghini 1.0 dev
  • Loading branch information
mfrasca committed Jul 2, 2017
2 parents d198171 + 1ad4f9b commit de024f8
Show file tree
Hide file tree
Showing 56 changed files with 8,104 additions and 70,741 deletions.
20 changes: 13 additions & 7 deletions doc/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,14 @@ Locate the test script and choose the class where to put the extra unit tests.

https://coveralls.io/builds/3741152/source?filename=bauble%2Fplugins%2Fplants%2Ftest.py#L273

.. note:: The ``FamilyTests`` class contains a skipped test, implementing it
will be quite a bit of work because we need rewrite the
FamilyEditorPresenter, separate it from the FamilyEditorView and
reconsider what to do with the FamilyEditor class, which I think
should be removed and replaced with a single function.
.. admonition:: what about skipped tests
:class: note

The ``FamilyTests`` class contains a skipped test, implementing
it will be quite a bit of work because we need rewrite the
FamilyEditorPresenter, separate it from the FamilyEditorView and
reconsider what to do with the FamilyEditor class, which I think
should be removed and replaced with a single function.

writing the tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -266,8 +269,11 @@ When writing tests, I generally follow the pattern:
* action,
* T₁ (testing the result of the action given the initial conditions)

.. note:: There's a reason why unit tests are called unit tests. Please
never test two actions in one test.
.. admonition:: what's in a name — unit tests
:class: note

There's a reason why unit tests are called unit tests. Please
never test two actions in one test.

So let's describe T₀ for the first test, a database holding a family without
genera::
Expand Down
58 changes: 39 additions & 19 deletions doc/editing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,36 +126,55 @@ species and open a new blank species editor.
Accessions
----------

The Accession editor allows us to add an accession to a species. In
Ghini an accession represents a group of plants or clones. The
accession would refer maybe a group of seed or cuttings from a
species. A plant would be an individual from that accesssion, i.e. a
specific plant in a specific location.
The Accession editor allows us to add an accession to a species. In Ghini
an accession represents a group of plants or clones that are of the same
taxon, are of the same propagule type (or treatment), were received from the
same source, were received at the same time.

Choose the Taxon name, add one if you forgot to do that in advance.

You may note uncertainty in identification by adding an identification
qualifier, at the proper rank, so you can for example have a plant initially
identified as *Iris* cf. *florentina* by choosing *Iris florentina* in the
taxon name, identification qualifier 'cf.', qualified rank 'species'.

Type the Accession ID, preferably also the Quantity received.


Accession Source
^^^^^^^^^^^^^^^^
The source of the accessions lets you add more information about where
this accession came from. At the moment the type of the source can be
either a Collection or a Donation.
""""""""""""""""

The source of the accessions lets you add more information about where this
accession came from. Select a Contact from the drop-down list, or choose
"Garden Propagation", which is placed as a default first item in the list of
contacts.

Collection
""""""""""
A Collection.
A Garden Propagation is the result of successful Propagation.

When accessing material from a Garden Propagation, you would initially leave
the first tab alone (General) and start from the second tab (Source).
Select as Contact "Garden Propagation", indicate which plant is the parent
plant and choose among the still not completely accessed propagations the
one you intend to add as an accession in your database.

Once you select a propagation, the software will set several fields in the
General tab, which you can now review. The Taxon (maybe you managed to
obtain something slightly different than the parent plant). The Initial
quantity (in case not all plants go in the same accession). The Type of
Material, inferred from the propagation type.

Donation
""""""""
A Donation.

.. _editing-plant:

Plant
-----
The Plant editor.

A ``Plant`` in the Ghini database describes an individual plant in your
collection. A plant belongs to an accession, and it has a specific location.

Creating multiple plants
^^^^^^^^^^^^^^^^^^^^^^^^
"""""""""""""""""""""""""

You can create multiple Plants by using ranges in the code entry.
This is only allowed when creating new plants and it is not possible
when editing existing Plants in the database.
Expand All @@ -171,7 +190,7 @@ plants that are created.
.. _plant-pictures:

Pictures
^^^^^^^^
""""""""""""

Just as almost all objects in the Ghini database can have *Notes*
associated to them, Plants can have *Pictures*: next to the tab for Notes,
Expand Down Expand Up @@ -199,10 +218,11 @@ plants in the highlighted accession are displayed in the pictures pane.

Locations
---------

The Location editor

danger zone
^^^^^^^^^^^
""""""""""""""""""""

The location editor contains an initially hidden section named *danger
zone*. The widgets contained in this section allow the user to merge the
Expand Down
59 changes: 34 additions & 25 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Installation
ghini.desktop is a cross-platform program and it will run on unix machines
like GNU/Linux and MacOSX, as well as on Windows.

.. admonition:: one-liner for hurried Linux users.
:class: note

Download and run `the installation script <https://raw.githubusercontent.com/Ghini/ghini.desktop/ghini-1.0/scripts/devinstall.sh>`_.
You may read the documentation later.

Ghini is maintained by very few people, who focus on enhancing its
functional parts, more than on writing fancy installers. Instead of several
native installers we offer a single cross-platform installation procedure.
Expand All @@ -12,7 +18,7 @@ This has a few big advantages which you will learn to appreciate as we go.
The installation is based on running a script.

* The GNU/Linux script takes care of everything, from dependecies to
installation for all users.
installation for users in the ``ghini`` group.
* The Windows script needs you to first install a couple things.
* On MacOSX we use the same script as on GNU/Linux. Since OSX has no default
package manager, we install one and we use it before we start the script.
Expand All @@ -32,31 +38,9 @@ Installing on GNU/Linux

Open a shell terminal window, and follow these instructions.

.. topic:: technical note

You can study the script to see what steps if runs for you. In
short it will install dependencies which can't be satisfied in a
virtual environment, then it will create a virtual environment
named ``ghide``, use git to download the sources to a directory
named ``~/Local/github/Ghini/ghini.desktop``, and connect this
git checkout to the ``ghini-1.0`` branch (this you can consider a
production line), it then builds ghini, downloading all remaining
dependencies in the virtual environment, and finally it creates a
startup script. If you have ``sudo`` permissions, it will be
placed in ``/usr/local/bin``, otherwise in your ``~/bin``
folder. Again if you

.. topic:: beginner's note

To run a script, first make sure you note down the name of the
directory to which you have downloaded the script, then you open
a terminal window and in that window you type `bash` followed by
a space and the complete name of the script including directory
name, and hit on the enter key.

#. Download the `devinstall.sh` script and run it::

https://raw.githubusercontent.com/Ghini/ghini.desktop/master/scripts/devinstall.sh
https://raw.githubusercontent.com/Ghini/ghini.desktop/ghini-1.0-dev/scripts/devinstall.sh

Please note that the script will not help you install any extra database
connector. This is not strictly necessary and you can do it at any later moment.
Expand Down Expand Up @@ -90,6 +74,30 @@ Open a shell terminal window, and follow these instructions.
You might need solve dependencies. How to do so, depends on which GNU/Linux
flavour you are using. Check with your distribution documentation.

.. admonition:: beginner's note
:class: note

To run a script, first make sure you note down the name of the
directory to which you have downloaded the script, then you open
a terminal window and in that window you type `bash` followed by
a space and the complete name of the script including directory
name, and hit on the enter key.

.. admonition:: technical note
:class: note

You can study the script to see what steps if runs for you. In
short it will install dependencies which can't be satisfied in a
virtual environment, then it will create a virtual environment
named ``ghide``, use git to download the sources to a directory
named ``~/Local/github/Ghini/ghini.desktop``, and connect this
git checkout to the ``ghini-1.0`` branch (this you can consider a
production line), it then builds ghini, downloading all remaining
dependencies in the virtual environment, and finally it creates a
startup script. If you have ``sudo`` permissions, it will be
placed in ``/usr/local/bin``, otherwise in your ``~/bin``
folder. Again if you

.. rubric:: Next...

:ref:`connecting`.
Expand Down Expand Up @@ -128,7 +136,8 @@ then install the remaining dependencies::

follow all instructions on how to activate what you have installed.

.. topic:: Mac running OSX 10.12 —Sierra—
.. admonition:: Mac running OSX 10.12 —Sierra—
:class: note

On OSX 10.12, ``brew`` reports that ``gettext`` is already
installed, but then it won't let us find it. A solution is to run
Expand Down
47 changes: 47 additions & 0 deletions doc/not_to_be_translated.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
^``Family``$
^``Genus``$
^``Species``$
^``Geography``$
^``Accession``$
^``Plant``$
^``Location``$
^``Contact``$
^``Collection``$
^``Tag``$
^:ref:`[a-z]*`.$
^accession, acc$
^planting, plant$
^geography, geo$
^location, loc$
^code, name$
^code$
^code \*\*×\*\*$
^contact, person, org, source$
^collection, col, coll$
^locale$
^tag, tags$
^vernacular, common, vern$
^epithet ([a-z]*).*$
^species, sp$
^genus, gen$
^family, fam$
^Mako$
^SQLite$
^MySQL$
^PostgreSQL$
^Desktop 1.[01]$
^Documentation 1.[01]$
^ghini.desktop$
^ghini.desktop-docs.i18n$
^ghini-1.[01]-dev$
^Web 1.2$
^ghini.web$
^master$
^https://coveralls.io/builds/[0-9]*/source[^ ]*$
^GTK_RESPONSE_[A-Z]*, -[0-9]$
^http://initd.org/psycopg/docs/install.html$
^https://pypi.python.org/pypi/lxml/3.4.4$
^http://code.google.com/p/gdata-python-client/downloads/list$
^https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging$
^https://raw.githubusercontent.com/Ghini/ghini.desktop/master/scripts/devinstall.bat$
^https://raw.githubusercontent.com/Ghini/ghini.desktop/master/scripts/ghini-update.bat$
14 changes: 7 additions & 7 deletions doc/runme.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

# configure languages
LANGUAGES='ar cs da de es fr hi it pl pt_BR ru sv uk zh jp'
LANGUAGES='ar cs da de es fr hi it pl pt ru sv uk zh jp'

# configure locations, don't incude the final slash
SOURCEDOCDIR=~/Local/github/Ghini/ghini.desktop/doc
CHECKOUTDIR=~/Local/github/Ghini/ghini.desktop-docs.i18n
SOURCEDOCDIR=$HOME/Local/github/Ghini/ghini.desktop/doc
CHECKOUTDIR=$HOME/Local/github/Ghini/ghini.desktop-docs.i18n
ALLPODIR=$CHECKOUTDIR/po

# "all remaining actions must be run from the doc dir"
Expand All @@ -20,14 +20,14 @@ echo "done copying/updating files from documentation"
echo '--------------------------------------------------------------------------'
echo
echo '=========================================================================='
echo "update the centralised doc.pot (two steps, first all pot, then merge them)"
echo "update the centralised doc.pot (prepare all pot, merge them, filter)"
echo '--------------------------------------------------------------------------'
echo "update the centralised doc.pot --- step one"
echo '--------------------------------------------------------------------------'
make gettext
echo "update the centralised doc.pot --- step two"
echo "update the centralised doc.pot --- step two and three"
echo '--------------------------------------------------------------------------'
msgcat -o _build/locale-merged/doc.pot _build/locale/*.pot
msgcat _build/locale/*.pot | msggrep --msgid --file not_to_be_translated.txt --invert-match -o _build/locale-merged/doc.pot
echo "done updating centralised doc.pot"
echo '--------------------------------------------------------------------------'
echo
Expand All @@ -46,7 +46,7 @@ do
do
ln -s doc.po $(basename $i .rst).po 2>/dev/null
done
cd $PODIR
cd $ALLPODIR
ln -s ../locale/$l/LC_MESSAGES/doc.po $l.po 2>/dev/null
done

Expand Down
22 changes: 11 additions & 11 deletions doc/searching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ search domain overview
------------------------------------------------------------------
name and shorthands field result type
============================= ===================== ============
family, fam epithet (family) Family
genus, gen epithet (genus) Genus
species, sp epithet (sp) **×** Species
vernacular, common, vern name Species
geography, geo name Geography
accession, acc code Accession
planting, plant code **×** Plant
location, loc code, name Location
contact, person, org, source name Contact
collection, col, coll locale Collection
tag, tags name Tag
family, fam epithet (family) ``Family``
genus, gen epithet (genus) ``Genus``
species, sp epithet (sp) **×** ``Species``
vernacular, common, vern name ``Species``
geography, geo name ``Geography``
accession, acc code ``Accession``
planting, plant code **×** ``Plant``
location, loc code, name ``Location``
contact, person, org, source name ``Contact``
collection, col, coll locale ``Collection``
tag, tags name ``Tag``
============================= ===================== ============

Examples of searching by value would be: Maxillaria, Acanth,
Expand Down

0 comments on commit de024f8

Please sign in to comment.