README.md
author ymh <ymh.work@gmail.com>
Wed, 01 Aug 2018 14:43:44 +0200
changeset 29 9de311703ab9
parent 1 3b0a8a6e685e
permissions -rw-r--r--
Added tag 0.3.3 for changeset 15f63c5dfe3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
## ICONOLAB-EPSITEME 
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
### 1. Configuration and setup for development  
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
### virtualenv
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
- Install pip
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
- Create a virtualenv for the project (using virtualenvwrapper is a good idea if possible). Python version is 3.6.5
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
Example
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
virtualenv -p python3.6 ./virtualenv
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
. virtualenv/bin/activate
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
cd src/
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
pip install -r requirements/dev.txt
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
### Django project setup
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
- Install iconolab
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    pip install -e path/iconolab
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
- Copy iconolab/src/settings/dev.py.tmpl into iconolab-episteme/src/iconolab_mcc/settings/dev.py, adapt content to configuration
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
- cd into iconolab-episteme/src folder and run
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    python manage.py migrate
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
to create database tables
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
- Run
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    python manage.py createsuperuser
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
to create an admin user
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
- Collect static files
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    python manage.py collectstatic
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
- Use Docker adress for HOST in settings
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
- don't use os.path.join(BASE_DIR, 'media') in settings
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
- make JS_DEV_MODE afalse (if not, it will not connect correctly on server)
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
### Docker 
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
Migrate the file docker-compose.yml in iconolab-episteme project
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
- Create containers
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
    docker-compose up
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
- Run containers
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
    
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
    docker-compose start
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
### Elasticsearch
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
Some objects in Iconolab are indexed and searched using ElasticSearch. You need to configure the elasticsearch parameters (see dev.py.tmpl, ELASTICSEARCH_DSL) and run:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
    python manage.py search_index --rebuild
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
### 2. Python server
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
- cd into the iconolab-episteme/src folder and run
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
    python manage.py runserver
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
By default, the app is accessible through http://127.0.0.1:8000/home
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
### 3. Importing initial data from CSV
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
Make sure to have the following in the same folder:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
* All the images to import. The image names must match their respective item inventory number.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
* A csv file that contains the metadata for the items you will import
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
* A json file for initializing the collection in the database. (Optional if you want to import images in an existing collection)
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
* A json file for the metacategories that will be linked to the collection.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
* Ensure the folder settings.MEDIA_ROOT+/uploads/ exists
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
The following django manage.py command is used to import collection data and images:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
python manage.py importimages <:export-csv-path> --delimiter <:delimiter> --encoding <:encoding> --collection-json <:collection_fixture_FILENAME> (OR --collection-id <:collection_id> if collection already exists in db) --metacategories-json <:metacategories_json_FILENAME>
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
Options:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
- ```--delimiter```: the delimiter for the csv file. For special ascii characters add a # before the code. Supported special chars are 9 (tab), 29 (Group separator), 30 (Record separator), 31 (Unit separator)
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
- ```--encoding```: the encoding provided if the csv is not in utf-8. Exemple: 8859 for ISO-8859
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
- ```--collection-json```: the json file to create the collection from
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
- ```--collection-id```: the id of the collection to import into, it must already exist
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
- ```--metacategories-json```: the json file to create metacategories on the collection we're importing into
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
- ```--jpeg-quality```: the jpeg quality: default to the setting IMG_JPG_DEFAULT_QUALITY
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
- ```--no-jpg-conversion```: set to True so the command will not convert the images to jpg. Useful for pre-converted jpeg and especially when importing large image banks
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
- ```--img-filename-identifier```: the column from which the command will try to find images in the folder: use keys from the setting IMPORT_FIELDS_DICT. Default is "INV".
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
- ```--filename-regexp-prefix```: allows you to customize the way the command try to find images by specifying a regexp pattern to match *before* the identifier provided in img-filename-identifier. Defaults to .*
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
- ```--filename-regexp-suffix```: allows you to customize the way the command try to find images by specifying a regexp pattern to match *after* the identifier provided in img-filename-identifier. Defaults to [\.\-_].*
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
Notes:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
* The export csv path will be used to find everything else (images and fixtures files).
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
* If the csv file is not encoded in utf-8, you MUST provide --encoding so the csv file can be read
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
* You MUST provide either --collection-json or --collection-id, else the command doesn't know to which collection the objects will belong to.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
* To find all images for a given item, the command will try to match filenames according to the pattern build from the 3 options: filename-regexp-prefix+<value of img-filename-identifier>+filename-regexp-suffix. For instance by default, for an object with an INV of MIC.3.10, the files MIC.3.10.jpg and MIC.3.10.verso.jpg would be matched and linked to the object.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
* The command will first parse the csv, then create the objects in the database (Item and ItemMetadata), then move the images to the settings.MEDIA_ROOT+/uploads/ folder after converting them to JPEG, then create the database objects for the images. The command will ignore any csv row that lacks an image or any csv row that already has a database entry for the collection (by default INV number is used to test if a database entry exists).
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
    
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
### 4. Updating already existing data
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
Another management command allows for editing data using only a .csv file. The command will go through the csv and update the metadatas for every objects it finds in the database with the csv row content.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
python manage.py updatecollection --collection-id=<:id> --delimiter=<:delimiter> --encoding=<:encoding>
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
```
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
Options:
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
- ```--delimiter```: the delimiter for the csv file. For special ascii characters add a # before the code. Supported special chars are 9 (tab), 29 (Group separator), 30 (Record separator), 31 (Unit separator)
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
- ```--encoding```: the encoding provided if the csv is not in utf-8. Exemple: 8859 for ISO-8859
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
- ```--collection-id```: the id of the collection to import into, it must already exist
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
 * document the test import command  : `python manage.py importimages --collection-json dossierImportMontauban/montauban_collection.json --metacategories-json dossierImportMontauban/montauban_metacategories_import.json --encoding "UTF-8" --delimiter "," dossierImportMontauban/ExportMontauban.csv`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
### defining a new version
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
To define a new version, the following steps must be taken.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
* if needed, refresh the `iconolab` version number in `src/setup.py`, in the key `install_requires`.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
* check that the matching tag has been published in the `iconolab` mercurial repository.
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
* Update the version number in `src/iconolab_mcc/__init__.py`
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
* Create a mercurial tag that matches the new version number
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
* push the new commits and tag
3b0a8a6e685e * Move importcollection and importmetacategories commands to the generic project
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141