Skip to content
Snippets Groups Projects
Commit 81ffdb74 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

bumped version to 1.6.4, updated README.rst

parent 19ea9d1d
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,55 @@ Tags
tag.get_samples()
tag.delete()
Vocabualry and VocabularyTerms
------------------------------
Vocabulary consists of many VocabularyTerms. They are used to control
the Terms in a Property field. So for example, you want to add a
property called **Animal** to a Sample and you want to control which
terms are used in this Property. For this you need to do a couple of
steps:
1. create a new vocabulary *AnimalVocabulary*
2. add terms to that vocabulary: *Cat, Dog, Mouse*
3. create a new PropertyType (e.g. *Animal*) of DataType
*CONTROLLEDVOCABULARY* and assign the *AnimalVocabulary* to it
4. create a new SampleType (e.g. *Pet*) and *assign* the created
PropertyType to that Sample type.
5. If you now create a new Sample of type *Pet* you will be able to add
a property *Animal* to it which only accepts the terms *Cat, Dog* or
*Mouse*.
**create new Vocabulary with three VocabularyTerms**
::
voc = o.new_vocabulary(
code = 'BBB',
description = 'description of vocabulary aaa',
urlTemplate = 'https://ethz.ch',
terms = [
{ "code": 'term_code1', "label": "term_label1", "description": "term_description1"},
{ "code": 'term_code2', "label": "term_label2", "description": "term_description2"},
{ "code": 'term_code3', "label": "term_label3", "description": "term_description3"}
]
)
voc.save()
**create additional VocabularyTerms**
::
term = o.new_term(
code='TERM_CODE_XXX',
vocabularyCode='BBB',
label='here comes a label',
description='here is a meandingful description'
)
term.save()
**fetching Vocabulary and VocabularyTerms**
Requirements and organization
=============================
......
......@@ -9,7 +9,7 @@ from setuptools import setup
setup(
name='PyBIS',
version= '1.6.3',
version= '1.6.4',
description='openBIS connection and interaction, optimized for using with Jupyter',
url='https://sissource.ethz.ch/sispub/pybis/',
author='Swen Vermeul | ID SIS | ETH Zürich',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment