finalisation de la documentation et nettoyage

- finalisation du graphe de production
- nettoyage des codes python et refactoring pour qu'ils prennent des arguments
- ajout d'un makefile qui permet d'automatiser les operations automatisables, mais aussi de documenter la procédure

travail lié à [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3959]
This commit is contained in:
Guillaume Raffy 2024-10-15 17:20:52 +02:00
parent c1a8ff9c6c
commit a51c3b717c
9 changed files with 663 additions and 225 deletions

View File

@ -0,0 +1,85 @@
id Modele Fabricant Type
cnrs_71 macbook pro 13 (2017) apple pc portable
cnrs_79 brilliance 258B6QUEB philips écran
cnrs_89 xps 9365 dell pc portable
cnrs_90 wm126 dell souris
cnrs_210 latitude 5590 dell pc portable
cnrs_212 latitude 5590 dell pc portable
cnrs_214 latitude 7490 dell pc portable
cnrs_216 latitude 7490 dell pc portable
cnrs_275 disque dur
cnrs_313 KB216 dell clavier
cnrs_369 disque dur
cnrs_370 station d'accueil
cnrs_490 latitude 5490 dell pc portable
cnrs_491 KB216 dell clavier
cnrs_525 dell souris
cnrs_525 dell souris
cnrs_525 dell souris
cnrs_525 dell souris
cnrs_526 dell clavier
cnrs_526 dell clavier
cnrs_526 dell clavier
cnrs_526 dell clavier
cnrs_595 moniteur 27 pouces dell écran
cnrs_595 moniteur 27 pouces dell écran
cnrs_602 magic keyboard avec pavé numérique apple clavier
cnrs_623 station d'accueil
cnrs_656 optiplex 7060 dell pc fixe
cnrs_659 my passport western digital disque dur
cnrs_659 my passport western digital disque dur
cnrs_659 my passport western digital disque dur
cnrs_660 latitude 5590 dell pc portable
cnrs_777 optiplex 7060 dell pc fixe
cnrs_778 moniteur 23.8 pouces dell écran
cnrs_805 precision 3630 dell pc fixe
cnrs_828 my passport western digital disque dur
cnrs_828 my passport western digital disque dur
cnrs_828 my passport western digital disque dur
cnrs_829 moniteur 24 pouces panoramique professionnel dell écran
cnrs_1030 station d'accueil
cnrs_1148 disque dur sata/sas dell disque dur
cnrs_1170 hl-l2310d brother imprimante
cnrs_1171 canoscan lide 300 canon scanner
cnrs_1220 moniteur 27 pouces dell écran
cnrs_1268 disque dur interne disque dur
cnrs_1437 moniteur 22 pouces dell écran
cnrs_1919 disque dur hot plug 8 to dell disque dur
cnrs_1919 disque dur hot plug 8 to dell disque dur
cnrs_1919 disque dur hot plug 8 to dell disque dur
cnrs_1919 disque dur hot plug 8 to dell disque dur
cnrs_1919 disque dur hot plug 8 to dell disque dur
cnrs_1956 macbook pro 15
cnrs_2007 disque dur hot plug 8 to dell disque dur
cnrs_2007 disque dur hot plug 8 to dell disque dur
cnrs_2007 disque dur hot plug 8 to dell disque dur
cnrs_2007 disque dur hot plug 8 to dell disque dur
cnrs_2007 disque dur hot plug 8 to dell disque dur
cnrs_2260 aero 15 oled gigabyte pc portable
cnrs_2297 sandisk extreme portable sandisk disque dur
cnrs_2297 sandisk extreme portable sandisk disque dur
cnrs_2297 sandisk extreme portable sandisk disque dur
cnrs_2297 sandisk extreme portable sandisk disque dur
cnrs_2298 my passport ssd western digital disque dur
cnrs_2305 compact optimal mouse souris
cnrs_2306 b110 logitech souris
cnrs_2306 b110 logitech souris
cnrs_2324 disque dur interne disque dur
cnrs_2534 disque dur hot plug 8 to dell disque dur
cnrs_2535 latitude 7490 dell pc portable
cnrs_2536 KB216 dell clavier
cnrs_2537 Laser USB Mouse Silver & black dell souris
cnrs_2605 U3219Q dell écran
cnrs_2724 precision 7540 dell pc portable
cnrs_2726 optiplex 5070 dell pc fixe
cnrs_2745 disque dur hot plug 8 to dell disque dur
cnrs_2767 860 evo samsung disque dur
cnrs_2800 WD19TB dell station d'accueil
cnrs_2806 precision 7540 dell pc portable
cnrs_2810 WD19 dell station d'accueil
cnrs_2843 latitude 3400 dell pc portable
cnrs_2872 écran panoramique 34 pouces dell écran
cnrs_2873 latitude 5300 dell pc portable
cnrs_2897 kb216 dell clavier
cnrs_2898 dell souris
cnrs_2958 disque dur
Can't render this file because it has a wrong number of fields in line 52.

View File

@ -0,0 +1,23 @@
id Modele Fabricant Type
ur1_21 latitude 5590 dell pc portable
ur1_39 1 To disque dur
ur1_233 dell pc portable
ur1_237 latitude 3400 dell pc portable
ur1_238 optiplex 5070 dell pc fixe
ur1_292 disque dur externe disque dur
ur1_292 disque dur externe disque dur
ur1_292 disque dur externe disque dur
ur1_292 disque dur externe disque dur
ur1_321 p2719h dell écran
ur1_323 led brilliance p-line 32" philips écran
ur1_461 écran panormaique 27" dell écran
ur1_509 dell pc portable
ur1_527 latitude 7490 dell pc portable
ur1_527 u2719d dell écran
ur1_530 latitude dell pc portable
ur1_556 latitude 7400 dell pc portable
ur1_578 magic mouse 2 apple souris
ur1_583 optiplex 7070 dell pc fixe
ur1_589 moniteur 27" dell écran
ur1_592 externe 2 To disque dur
ur1_614 moniteur 27" dell écran
Can't render this file because it contains an unexpected character in line 12 and column 33.

View File

@ -4,51 +4,70 @@ digraph {
node [shape="rectangle", style="filled,rounded", penwidth=0, fillcolor="cyan"]
geslab [label="geslab\n(cnrs)"];
cnrs_all_xls [label="cnrs_all_xls\n(commandes-2019-cnrs-t002.xls)"];
cnrs_all_tsv [label="cnrs_all_tsv\n(commandes-2019-cnrs-t002.tsv)"];
cnrs_it_orders [label="cnrs_it_orders\n(commandes-it-2019-cnrs-002.tsv)"];
cnrs_it_orders_labo1p5 [label="cnrs_it_orders_labo1p5\n(it-cnrs-l1p5.tsv)"];
cnrs_all_tsv [label="cnrs_all_tsv\n(commandes-2019-cnrs-t002.tsv,\n1991 items)"];
cnrs_it_orders [label="cnrs_it_orders\n(commandes-it-2019-cnrs-002.tsv,\n224 items)"];
cnrs_it_orders_ann [label="cnrs_it_orders_ann\n(commandes-it-2019-cnrs-002-annotated.tsv,\n224 items)"];
cnrs_it_orders_labo1p5 [label="cnrs_it_orders_labo1p5\n(it-cnrs-l1p5.tsv, \n84 items)"];
cnrs_paper_orders [label="cnrs_paper_orders\n(archives papier cnrs)"]
sifac [label="sifac\n(ur1)"];
ur1_all_orders [label="ur1_all_orders\n(2019.<dept-id>.xls)"];
ur1_it_orders [label="ur1_it_orders\n(commandes-it-2019-ur1-002.tsv)"];
ur1_all_orders [label="ur1_all_orders\n(2019.<dept-id>.xls\n610 items)"];
ur1_it_orders [label="ur1_it_orders\n(commandes-it-2019-ur1-002.tsv,\n33 items))"];
ur1_it_orders_ann [label="ur1_it_orders_ann\n(commandes-it-2019-ur1-002-annotated.tsv,\n33 items)"];
ur1_it_orders_labo1p5 [label="ur1_it_orders_labo1p5\n(it-ur1-l1p5.tsv)"];
ur1_it_orders_labo1p5 [label="ur1_it_orders_labo1p5\n(it-ur1-l1p5.tsv,\n22 items)"];
ur1_paper_orders [label="ur1_paper_orders\n(archives papier ur1)"]
it_orders_labo1p5 [label="it_orders_labo1p5\n(it-l1p5.tsv)"];
it_orders_labo1p5 [label="it_orders_labo1p5\n(it-l1p5.tsv,\n106 items)"];
# actions
# operations
node [shape="rectangle", style="filled,rounded", penwidth=0, fillcolor="pink"]
extraction_cnrs [label="extraction ngiquiaux"];
cnrs_xls_to_tsv [label="export au format tsv\navec libreoffice"];
it_orders_filter [label="geslabt002_to_itorders.py"];
concat [label="concaténation"];
cnrs_manual [label="formatage manuel"];
op_extra_geslab [label="op_extra_geslab\n(extraction ngiquiaux)"];
op_cnrs_xls_to_tsv [label="op_cnrs_xls_to_tsv\n(export au format tsv\navec libreoffice)"];
op_cnrs_it_filter [label="op_cnrs_it_filter\n(geslabt002_to_itorders.py)"];
op_anno_cnrs_it [label="op_anno_cnrs_it\n(annotations manuelles)"];
op_cnrs_to_l1p5 [label="op_cnrs_to_l1p5\n(nettoyage et mise au format labo 1.5)"];
extraction_ur [label="extraction ddemorel"];
sifac_to_itorders [label="sifact002_to_itorders.py"];
op_extra_sifac [label="op_extra_sifac\n(extraction ddemorel)"];
op_ur1_it_filter [label="op_ur1_it_filter\n(sifact002_to_itorders.py)"];
op_anno_ur1_it [label="op_anno_ur1_it\n(annotations manuelles)"];
op_ur1_to_l1p5 [label="op_ur1_to_l1p5\n(nettoyage et mise au format labo 1.5)"];
op_concat [label="op_concat\n(concaténation)"];
# relations
geslab -> extraction_cnrs;
extraction_cnrs -> cnrs_all_xls;
geslab -> op_extra_geslab;
op_extra_geslab -> cnrs_all_xls;
cnrs_all_xls -> cnrs_xls_to_tsv;
cnrs_xls_to_tsv -> cnrs_all_tsv;
cnrs_all_xls -> op_cnrs_xls_to_tsv;
op_cnrs_xls_to_tsv -> cnrs_all_tsv;
cnrs_all_tsv -> it_orders_filter;
it_orders_filter -> cnrs_it_orders;
cnrs_all_tsv -> op_cnrs_it_filter;
op_cnrs_it_filter -> cnrs_it_orders;
cnrs_it_orders -> cnrs_manual;
cnrs_manual -> cnrs_it_orders_labo1p5;
cnrs_it_orders -> op_anno_cnrs_it;
cnrs_paper_orders -> op_anno_cnrs_it;
op_anno_cnrs_it -> cnrs_it_orders_ann;
sifac -> extraction_ur;
extraction_ur -> ur1_all_orders;
cnrs_it_orders_ann -> op_cnrs_to_l1p5;
op_cnrs_to_l1p5 -> cnrs_it_orders_labo1p5;
ur1_all_orders -> sifac_to_itorders;
sifac_to_itorders -> ur1_it_orders;
sifac -> op_extra_sifac;
op_extra_sifac -> ur1_all_orders;
cnrs_it_orders_labo1p5 -> concat;
ur1_it_orders_labo1p5 -> concat;
concat -> it_orders_labo1p5;
ur1_all_orders -> op_ur1_it_filter;
op_ur1_it_filter -> ur1_it_orders;
ur1_it_orders -> op_anno_ur1_it;
ur1_paper_orders -> op_anno_ur1_it;
op_anno_ur1_it -> ur1_it_orders_ann;
ur1_it_orders_ann -> op_ur1_to_l1p5;
op_ur1_to_l1p5 -> ur1_it_orders_labo1p5;
cnrs_it_orders_labo1p5 -> op_concat;
ur1_it_orders_labo1p5 -> op_concat;
op_concat -> it_orders_labo1p5;
}

View File

@ -4,213 +4,326 @@
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: %3 Pages: 1 -->
<svg width="536pt" height="778pt"
viewBox="0.00 0.00 536.00 778.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 774)">
<svg width="969pt" height="1024pt"
viewBox="0.00 0.00 969.00 1024.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1020)">
<title>%3</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-774 532,-774 532,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-1020 965,-1020 965,4 -4,4"/>
<!-- geslab -->
<g id="node1" class="node">
<title>geslab</title>
<polygon fill="cyan" stroke="black" points="161.5,-770 98.5,-770 98.5,-732 161.5,-732 161.5,-770"/>
<text text-anchor="middle" x="130" y="-754.8" font-family="Times,serif" font-size="14.00">geslab</text>
<text text-anchor="middle" x="130" y="-739.8" font-family="Times,serif" font-size="14.00">(cnrs)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M148,-1016C148,-1016 109,-1016 109,-1016 103,-1016 97,-1010 97,-1004 97,-1004 97,-990 97,-990 97,-984 103,-978 109,-978 109,-978 148,-978 148,-978 154,-978 160,-984 160,-990 160,-990 160,-1004 160,-1004 160,-1010 154,-1016 148,-1016"/>
<text text-anchor="middle" x="128.5" y="-1000.8" font-family="Times,serif" font-size="14.00">geslab</text>
<text text-anchor="middle" x="128.5" y="-985.8" font-family="Times,serif" font-size="14.00">(cnrs)</text>
</g>
<!-- extraction_cnrs -->
<g id="node11" class="node">
<title>extraction_cnrs</title>
<polygon fill="pink" stroke="black" points="212,-696 48,-696 48,-660 212,-660 212,-696"/>
<text text-anchor="middle" x="130" y="-674.3" font-family="Times,serif" font-size="14.00">extraction ngiquiaux</text>
<!-- op_extra_geslab -->
<g id="node15" class="node">
<title>op_extra_geslab</title>
<path fill="pink" stroke="black" stroke-width="0" d="M204,-942C204,-942 53,-942 53,-942 47,-942 41,-936 41,-930 41,-930 41,-916 41,-916 41,-910 47,-904 53,-904 53,-904 204,-904 204,-904 210,-904 216,-910 216,-916 216,-916 216,-930 216,-930 216,-936 210,-942 204,-942"/>
<text text-anchor="middle" x="128.5" y="-926.8" font-family="Times,serif" font-size="14.00">op_extra_geslab</text>
<text text-anchor="middle" x="128.5" y="-911.8" font-family="Times,serif" font-size="14.00">(extraction ngiquiaux)</text>
</g>
<!-- geslab&#45;&gt;extraction_cnrs -->
<!-- geslab&#45;&gt;op_extra_geslab -->
<g id="edge1" class="edge">
<title>geslab&#45;&gt;extraction_cnrs</title>
<path fill="none" stroke="black" d="M130,-731.72C130,-723.97 130,-714.79 130,-706.27"/>
<polygon fill="black" stroke="black" points="133.5,-706 130,-696 126.5,-706 133.5,-706"/>
<title>geslab&#45;&gt;op_extra_geslab</title>
<path fill="none" stroke="black" d="M128.5,-977.83C128.5,-970.13 128.5,-960.97 128.5,-952.42"/>
<polygon fill="black" stroke="black" points="132,-952.41 128.5,-942.41 125,-952.41 132,-952.41"/>
</g>
<!-- cnrs_all_xls -->
<g id="node2" class="node">
<title>cnrs_all_xls</title>
<polygon fill="cyan" stroke="black" points="255,-624 5,-624 5,-586 255,-586 255,-624"/>
<text text-anchor="middle" x="130" y="-608.8" font-family="Times,serif" font-size="14.00">cnrs_all_xls</text>
<text text-anchor="middle" x="130" y="-593.8" font-family="Times,serif" font-size="14.00">(commandes&#45;2019&#45;cnrs&#45;t002.xls)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M241.5,-868C241.5,-868 15.5,-868 15.5,-868 9.5,-868 3.5,-862 3.5,-856 3.5,-856 3.5,-842 3.5,-842 3.5,-836 9.5,-830 15.5,-830 15.5,-830 241.5,-830 241.5,-830 247.5,-830 253.5,-836 253.5,-842 253.5,-842 253.5,-856 253.5,-856 253.5,-862 247.5,-868 241.5,-868"/>
<text text-anchor="middle" x="128.5" y="-852.8" font-family="Times,serif" font-size="14.00">cnrs_all_xls</text>
<text text-anchor="middle" x="128.5" y="-837.8" font-family="Times,serif" font-size="14.00">(commandes&#45;2019&#45;cnrs&#45;t002.xls)</text>
</g>
<!-- cnrs_xls_to_tsv -->
<g id="node12" class="node">
<title>cnrs_xls_to_tsv</title>
<polygon fill="pink" stroke="black" points="212,-550 48,-550 48,-512 212,-512 212,-550"/>
<text text-anchor="middle" x="130" y="-534.8" font-family="Times,serif" font-size="14.00">export au format tsv</text>
<text text-anchor="middle" x="130" y="-519.8" font-family="Times,serif" font-size="14.00">avec libreoffice</text>
<!-- op_cnrs_xls_to_tsv -->
<g id="node16" class="node">
<title>op_cnrs_xls_to_tsv</title>
<path fill="pink" stroke="black" stroke-width="0" d="M201,-794C201,-794 56,-794 56,-794 50,-794 44,-788 44,-782 44,-782 44,-753 44,-753 44,-747 50,-741 56,-741 56,-741 201,-741 201,-741 207,-741 213,-747 213,-753 213,-753 213,-782 213,-782 213,-788 207,-794 201,-794"/>
<text text-anchor="middle" x="128.5" y="-778.8" font-family="Times,serif" font-size="14.00">op_cnrs_xls_to_tsv</text>
<text text-anchor="middle" x="128.5" y="-763.8" font-family="Times,serif" font-size="14.00">(export au format tsv</text>
<text text-anchor="middle" x="128.5" y="-748.8" font-family="Times,serif" font-size="14.00">avec libreoffice)</text>
</g>
<!-- cnrs_all_xls&#45;&gt;cnrs_xls_to_tsv -->
<!-- cnrs_all_xls&#45;&gt;op_cnrs_xls_to_tsv -->
<g id="edge3" class="edge">
<title>cnrs_all_xls&#45;&gt;cnrs_xls_to_tsv</title>
<path fill="none" stroke="black" d="M130,-585.83C130,-578.13 130,-568.97 130,-560.42"/>
<polygon fill="black" stroke="black" points="133.5,-560.41 130,-550.41 126.5,-560.41 133.5,-560.41"/>
<title>cnrs_all_xls&#45;&gt;op_cnrs_xls_to_tsv</title>
<path fill="none" stroke="black" d="M128.5,-829.96C128.5,-822.32 128.5,-813.14 128.5,-804.23"/>
<polygon fill="black" stroke="black" points="132,-804 128.5,-794 125,-804 132,-804"/>
</g>
<!-- cnrs_all_tsv -->
<g id="node3" class="node">
<title>cnrs_all_tsv</title>
<polygon fill="cyan" stroke="black" points="255.5,-476 4.5,-476 4.5,-438 255.5,-438 255.5,-476"/>
<text text-anchor="middle" x="130" y="-460.8" font-family="Times,serif" font-size="14.00">cnrs_all_tsv</text>
<text text-anchor="middle" x="130" y="-445.8" font-family="Times,serif" font-size="14.00">(commandes&#45;2019&#45;cnrs&#45;t002.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M240.5,-705C240.5,-705 16.5,-705 16.5,-705 10.5,-705 4.5,-699 4.5,-693 4.5,-693 4.5,-664 4.5,-664 4.5,-658 10.5,-652 16.5,-652 16.5,-652 240.5,-652 240.5,-652 246.5,-652 252.5,-658 252.5,-664 252.5,-664 252.5,-693 252.5,-693 252.5,-699 246.5,-705 240.5,-705"/>
<text text-anchor="middle" x="128.5" y="-689.8" font-family="Times,serif" font-size="14.00">cnrs_all_tsv</text>
<text text-anchor="middle" x="128.5" y="-674.8" font-family="Times,serif" font-size="14.00">(commandes&#45;2019&#45;cnrs&#45;t002.tsv,</text>
<text text-anchor="middle" x="128.5" y="-659.8" font-family="Times,serif" font-size="14.00">1991 items)</text>
</g>
<!-- it_orders_filter -->
<g id="node13" class="node">
<title>it_orders_filter</title>
<polygon fill="pink" stroke="black" points="231.5,-402 28.5,-402 28.5,-366 231.5,-366 231.5,-402"/>
<text text-anchor="middle" x="130" y="-380.3" font-family="Times,serif" font-size="14.00">geslabt002_to_itorders.py</text>
<!-- op_cnrs_it_filter -->
<g id="node17" class="node">
<title>op_cnrs_it_filter</title>
<path fill="pink" stroke="black" stroke-width="0" d="M223,-616C223,-616 34,-616 34,-616 28,-616 22,-610 22,-604 22,-604 22,-590 22,-590 22,-584 28,-578 34,-578 34,-578 223,-578 223,-578 229,-578 235,-584 235,-590 235,-590 235,-604 235,-604 235,-610 229,-616 223,-616"/>
<text text-anchor="middle" x="128.5" y="-600.8" font-family="Times,serif" font-size="14.00">op_cnrs_it_filter</text>
<text text-anchor="middle" x="128.5" y="-585.8" font-family="Times,serif" font-size="14.00">(geslabt002_to_itorders.py)</text>
</g>
<!-- cnrs_all_tsv&#45;&gt;it_orders_filter -->
<!-- cnrs_all_tsv&#45;&gt;op_cnrs_it_filter -->
<g id="edge5" class="edge">
<title>cnrs_all_tsv&#45;&gt;it_orders_filter</title>
<path fill="none" stroke="black" d="M130,-437.72C130,-429.97 130,-420.79 130,-412.27"/>
<polygon fill="black" stroke="black" points="133.5,-412 130,-402 126.5,-412 133.5,-412"/>
<title>cnrs_all_tsv&#45;&gt;op_cnrs_it_filter</title>
<path fill="none" stroke="black" d="M128.5,-651.91C128.5,-643.74 128.5,-634.65 128.5,-626.3"/>
<polygon fill="black" stroke="black" points="132,-626.24 128.5,-616.24 125,-626.24 132,-626.24"/>
</g>
<!-- cnrs_it_orders -->
<g id="node4" class="node">
<title>cnrs_it_orders</title>
<polygon fill="cyan" stroke="black" points="260,-330 0,-330 0,-292 260,-292 260,-330"/>
<text text-anchor="middle" x="130" y="-314.8" font-family="Times,serif" font-size="14.00">cnrs_it_orders</text>
<text text-anchor="middle" x="130" y="-299.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;cnrs&#45;002.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M245,-542C245,-542 12,-542 12,-542 6,-542 0,-536 0,-530 0,-530 0,-501 0,-501 0,-495 6,-489 12,-489 12,-489 245,-489 245,-489 251,-489 257,-495 257,-501 257,-501 257,-530 257,-530 257,-536 251,-542 245,-542"/>
<text text-anchor="middle" x="128.5" y="-526.8" font-family="Times,serif" font-size="14.00">cnrs_it_orders</text>
<text text-anchor="middle" x="128.5" y="-511.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;cnrs&#45;002.tsv,</text>
<text text-anchor="middle" x="128.5" y="-496.8" font-family="Times,serif" font-size="14.00">224 items)</text>
</g>
<!-- cnrs_manual -->
<g id="node15" class="node">
<title>cnrs_manual</title>
<polygon fill="pink" stroke="black" points="203.5,-256 56.5,-256 56.5,-220 203.5,-220 203.5,-256"/>
<text text-anchor="middle" x="130" y="-234.3" font-family="Times,serif" font-size="14.00">formatage manuel</text>
<!-- op_anno_cnrs_it -->
<g id="node18" class="node">
<title>op_anno_cnrs_it</title>
<path fill="pink" stroke="black" stroke-width="0" d="M413.5,-453C413.5,-453 249.5,-453 249.5,-453 243.5,-453 237.5,-447 237.5,-441 237.5,-441 237.5,-427 237.5,-427 237.5,-421 243.5,-415 249.5,-415 249.5,-415 413.5,-415 413.5,-415 419.5,-415 425.5,-421 425.5,-427 425.5,-427 425.5,-441 425.5,-441 425.5,-447 419.5,-453 413.5,-453"/>
<text text-anchor="middle" x="331.5" y="-437.8" font-family="Times,serif" font-size="14.00">op_anno_cnrs_it</text>
<text text-anchor="middle" x="331.5" y="-422.8" font-family="Times,serif" font-size="14.00">(annotations manuelles)</text>
</g>
<!-- cnrs_it_orders&#45;&gt;cnrs_manual -->
<!-- cnrs_it_orders&#45;&gt;op_anno_cnrs_it -->
<g id="edge7" class="edge">
<title>cnrs_it_orders&#45;&gt;cnrs_manual</title>
<path fill="none" stroke="black" d="M130,-291.72C130,-283.97 130,-274.79 130,-266.27"/>
<polygon fill="black" stroke="black" points="133.5,-266 130,-256 126.5,-266 133.5,-266"/>
<title>cnrs_it_orders&#45;&gt;op_anno_cnrs_it</title>
<path fill="none" stroke="black" d="M193.85,-488.91C220.26,-478.56 250.43,-466.75 275.78,-456.82"/>
<polygon fill="black" stroke="black" points="277.21,-460.02 285.24,-453.12 274.66,-453.5 277.21,-460.02"/>
</g>
<!-- cnrs_it_orders_ann -->
<g id="node5" class="node">
<title>cnrs_it_orders_ann</title>
<path fill="cyan" stroke="black" stroke-width="0" d="M486.5,-379C486.5,-379 176.5,-379 176.5,-379 170.5,-379 164.5,-373 164.5,-367 164.5,-367 164.5,-338 164.5,-338 164.5,-332 170.5,-326 176.5,-326 176.5,-326 486.5,-326 486.5,-326 492.5,-326 498.5,-332 498.5,-338 498.5,-338 498.5,-367 498.5,-367 498.5,-373 492.5,-379 486.5,-379"/>
<text text-anchor="middle" x="331.5" y="-363.8" font-family="Times,serif" font-size="14.00">cnrs_it_orders_ann</text>
<text text-anchor="middle" x="331.5" y="-348.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;cnrs&#45;002&#45;annotated.tsv,</text>
<text text-anchor="middle" x="331.5" y="-333.8" font-family="Times,serif" font-size="14.00">224 items)</text>
</g>
<!-- op_cnrs_to_l1p5 -->
<g id="node19" class="node">
<title>op_cnrs_to_l1p5</title>
<path fill="pink" stroke="black" stroke-width="0" d="M485,-290C485,-290 218,-290 218,-290 212,-290 206,-284 206,-278 206,-278 206,-264 206,-264 206,-258 212,-252 218,-252 218,-252 485,-252 485,-252 491,-252 497,-258 497,-264 497,-264 497,-278 497,-278 497,-284 491,-290 485,-290"/>
<text text-anchor="middle" x="351.5" y="-274.8" font-family="Times,serif" font-size="14.00">op_cnrs_to_l1p5</text>
<text text-anchor="middle" x="351.5" y="-259.8" font-family="Times,serif" font-size="14.00">(nettoyage et mise au format labo 1.5)</text>
</g>
<!-- cnrs_it_orders_ann&#45;&gt;op_cnrs_to_l1p5 -->
<g id="edge10" class="edge">
<title>cnrs_it_orders_ann&#45;&gt;op_cnrs_to_l1p5</title>
<path fill="none" stroke="black" d="M337.94,-325.91C340.02,-317.65 342.33,-308.45 344.45,-300.02"/>
<polygon fill="black" stroke="black" points="347.87,-300.79 346.91,-290.24 341.08,-299.08 347.87,-300.79"/>
</g>
<!-- cnrs_it_orders_labo1p5 -->
<g id="node5" class="node">
<g id="node6" class="node">
<title>cnrs_it_orders_labo1p5</title>
<polygon fill="cyan" stroke="black" points="221,-184 39,-184 39,-146 221,-146 221,-184"/>
<text text-anchor="middle" x="130" y="-168.8" font-family="Times,serif" font-size="14.00">cnrs_it_orders_labo1p5</text>
<text text-anchor="middle" x="130" y="-153.8" font-family="Times,serif" font-size="14.00">(it&#45;cnrs&#45;l1p5.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M486.5,-216C486.5,-216 328.5,-216 328.5,-216 322.5,-216 316.5,-210 316.5,-204 316.5,-204 316.5,-175 316.5,-175 316.5,-169 322.5,-163 328.5,-163 328.5,-163 486.5,-163 486.5,-163 492.5,-163 498.5,-169 498.5,-175 498.5,-175 498.5,-204 498.5,-204 498.5,-210 492.5,-216 486.5,-216"/>
<text text-anchor="middle" x="407.5" y="-200.8" font-family="Times,serif" font-size="14.00">cnrs_it_orders_labo1p5</text>
<text text-anchor="middle" x="407.5" y="-185.8" font-family="Times,serif" font-size="14.00">(it&#45;cnrs&#45;l1p5.tsv, </text>
<text text-anchor="middle" x="407.5" y="-170.8" font-family="Times,serif" font-size="14.00">84 items)</text>
</g>
<!-- concat -->
<g id="node14" class="node">
<title>concat</title>
<polygon fill="pink" stroke="black" points="286,-110 170,-110 170,-74 286,-74 286,-110"/>
<text text-anchor="middle" x="228" y="-88.3" font-family="Times,serif" font-size="14.00">concaténation</text>
<!-- op_concat -->
<g id="node24" class="node">
<title>op_concat</title>
<path fill="pink" stroke="black" stroke-width="0" d="M557,-127C557,-127 454,-127 454,-127 448,-127 442,-121 442,-115 442,-115 442,-101 442,-101 442,-95 448,-89 454,-89 454,-89 557,-89 557,-89 563,-89 569,-95 569,-101 569,-101 569,-115 569,-115 569,-121 563,-127 557,-127"/>
<text text-anchor="middle" x="505.5" y="-111.8" font-family="Times,serif" font-size="14.00">op_concat</text>
<text text-anchor="middle" x="505.5" y="-96.8" font-family="Times,serif" font-size="14.00">(concaténation)</text>
</g>
<!-- cnrs_it_orders_labo1p5&#45;&gt;concat -->
<g id="edge13" class="edge">
<title>cnrs_it_orders_labo1p5&#45;&gt;concat</title>
<path fill="none" stroke="black" d="M154.98,-145.9C167.45,-136.87 182.67,-125.84 195.99,-116.19"/>
<polygon fill="black" stroke="black" points="198.37,-118.79 204.41,-110.09 194.26,-113.12 198.37,-118.79"/>
<!-- cnrs_it_orders_labo1p5&#45;&gt;op_concat -->
<g id="edge21" class="edge">
<title>cnrs_it_orders_labo1p5&#45;&gt;op_concat</title>
<path fill="none" stroke="black" d="M439.05,-162.91C450.57,-153.56 463.58,-143 475.01,-133.73"/>
<polygon fill="black" stroke="black" points="477.46,-136.26 483.02,-127.24 473.05,-130.82 477.46,-136.26"/>
</g>
<!-- cnrs_paper_orders -->
<g id="node7" class="node">
<title>cnrs_paper_orders</title>
<path fill="cyan" stroke="black" stroke-width="0" d="M436,-534.5C436,-534.5 287,-534.5 287,-534.5 281,-534.5 275,-528.5 275,-522.5 275,-522.5 275,-508.5 275,-508.5 275,-502.5 281,-496.5 287,-496.5 287,-496.5 436,-496.5 436,-496.5 442,-496.5 448,-502.5 448,-508.5 448,-508.5 448,-522.5 448,-522.5 448,-528.5 442,-534.5 436,-534.5"/>
<text text-anchor="middle" x="361.5" y="-519.3" font-family="Times,serif" font-size="14.00">cnrs_paper_orders</text>
<text text-anchor="middle" x="361.5" y="-504.3" font-family="Times,serif" font-size="14.00">(archives papier cnrs)</text>
</g>
<!-- cnrs_paper_orders&#45;&gt;op_anno_cnrs_it -->
<g id="edge8" class="edge">
<title>cnrs_paper_orders&#45;&gt;op_anno_cnrs_it</title>
<path fill="none" stroke="black" d="M354.69,-496.46C350.92,-486.47 346.16,-473.84 341.92,-462.63"/>
<polygon fill="black" stroke="black" points="345.19,-461.36 338.38,-453.24 338.64,-463.84 345.19,-461.36"/>
</g>
<!-- sifac -->
<g id="node6" class="node">
<g id="node8" class="node">
<title>sifac</title>
<polygon fill="cyan" stroke="black" points="428,-770 374,-770 374,-732 428,-732 428,-770"/>
<text text-anchor="middle" x="401" y="-754.8" font-family="Times,serif" font-size="14.00">sifac</text>
<text text-anchor="middle" x="401" y="-739.8" font-family="Times,serif" font-size="14.00">(ur1)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M665.5,-868C665.5,-868 635.5,-868 635.5,-868 629.5,-868 623.5,-862 623.5,-856 623.5,-856 623.5,-842 623.5,-842 623.5,-836 629.5,-830 635.5,-830 635.5,-830 665.5,-830 665.5,-830 671.5,-830 677.5,-836 677.5,-842 677.5,-842 677.5,-856 677.5,-856 677.5,-862 671.5,-868 665.5,-868"/>
<text text-anchor="middle" x="650.5" y="-852.8" font-family="Times,serif" font-size="14.00">sifac</text>
<text text-anchor="middle" x="650.5" y="-837.8" font-family="Times,serif" font-size="14.00">(ur1)</text>
</g>
<!-- extraction_ur -->
<g id="node16" class="node">
<title>extraction_ur</title>
<polygon fill="pink" stroke="black" points="481.5,-696 320.5,-696 320.5,-660 481.5,-660 481.5,-696"/>
<text text-anchor="middle" x="401" y="-674.3" font-family="Times,serif" font-size="14.00">extraction ddemorel</text>
<!-- op_extra_sifac -->
<g id="node20" class="node">
<title>op_extra_sifac</title>
<path fill="pink" stroke="black" stroke-width="0" d="M724.5,-786.5C724.5,-786.5 576.5,-786.5 576.5,-786.5 570.5,-786.5 564.5,-780.5 564.5,-774.5 564.5,-774.5 564.5,-760.5 564.5,-760.5 564.5,-754.5 570.5,-748.5 576.5,-748.5 576.5,-748.5 724.5,-748.5 724.5,-748.5 730.5,-748.5 736.5,-754.5 736.5,-760.5 736.5,-760.5 736.5,-774.5 736.5,-774.5 736.5,-780.5 730.5,-786.5 724.5,-786.5"/>
<text text-anchor="middle" x="650.5" y="-771.3" font-family="Times,serif" font-size="14.00">op_extra_sifac</text>
<text text-anchor="middle" x="650.5" y="-756.3" font-family="Times,serif" font-size="14.00">(extraction ddemorel)</text>
</g>
<!-- sifac&#45;&gt;extraction_ur -->
<g id="edge9" class="edge">
<title>sifac&#45;&gt;extraction_ur</title>
<path fill="none" stroke="black" d="M401,-731.72C401,-723.97 401,-714.79 401,-706.27"/>
<polygon fill="black" stroke="black" points="404.5,-706 401,-696 397.5,-706 404.5,-706"/>
<!-- sifac&#45;&gt;op_extra_sifac -->
<g id="edge12" class="edge">
<title>sifac&#45;&gt;op_extra_sifac</title>
<path fill="none" stroke="black" d="M650.5,-829.96C650.5,-820.17 650.5,-807.85 650.5,-796.81"/>
<polygon fill="black" stroke="black" points="654,-796.74 650.5,-786.74 647,-796.74 654,-796.74"/>
</g>
<!-- ur1_all_orders -->
<g id="node7" class="node">
<g id="node9" class="node">
<title>ur1_all_orders</title>
<polygon fill="cyan" stroke="black" points="484.5,-624 317.5,-624 317.5,-586 484.5,-586 484.5,-624"/>
<text text-anchor="middle" x="401" y="-608.8" font-family="Times,serif" font-size="14.00">ur1_all_orders</text>
<text text-anchor="middle" x="401" y="-593.8" font-family="Times,serif" font-size="14.00">(2019.&lt;dept&#45;id&gt;.xls)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M719,-705C719,-705 582,-705 582,-705 576,-705 570,-699 570,-693 570,-693 570,-664 570,-664 570,-658 576,-652 582,-652 582,-652 719,-652 719,-652 725,-652 731,-658 731,-664 731,-664 731,-693 731,-693 731,-699 725,-705 719,-705"/>
<text text-anchor="middle" x="650.5" y="-689.8" font-family="Times,serif" font-size="14.00">ur1_all_orders</text>
<text text-anchor="middle" x="650.5" y="-674.8" font-family="Times,serif" font-size="14.00">(2019.&lt;dept&#45;id&gt;.xls</text>
<text text-anchor="middle" x="650.5" y="-659.8" font-family="Times,serif" font-size="14.00">610 items)</text>
</g>
<!-- sifac_to_itorders -->
<g id="node17" class="node">
<title>sifac_to_itorders</title>
<polygon fill="pink" stroke="black" points="495.5,-549 306.5,-549 306.5,-513 495.5,-513 495.5,-549"/>
<text text-anchor="middle" x="401" y="-527.3" font-family="Times,serif" font-size="14.00">sifact002_to_itorders.py</text>
<!-- op_ur1_it_filter -->
<g id="node21" class="node">
<title>op_ur1_it_filter</title>
<path fill="pink" stroke="black" stroke-width="0" d="M738.5,-616C738.5,-616 562.5,-616 562.5,-616 556.5,-616 550.5,-610 550.5,-604 550.5,-604 550.5,-590 550.5,-590 550.5,-584 556.5,-578 562.5,-578 562.5,-578 738.5,-578 738.5,-578 744.5,-578 750.5,-584 750.5,-590 750.5,-590 750.5,-604 750.5,-604 750.5,-610 744.5,-616 738.5,-616"/>
<text text-anchor="middle" x="650.5" y="-600.8" font-family="Times,serif" font-size="14.00">op_ur1_it_filter</text>
<text text-anchor="middle" x="650.5" y="-585.8" font-family="Times,serif" font-size="14.00">(sifact002_to_itorders.py)</text>
</g>
<!-- ur1_all_orders&#45;&gt;sifac_to_itorders -->
<g id="edge11" class="edge">
<title>ur1_all_orders&#45;&gt;sifac_to_itorders</title>
<path fill="none" stroke="black" d="M401,-585.83C401,-577.89 401,-568.41 401,-559.63"/>
<polygon fill="black" stroke="black" points="404.5,-559.42 401,-549.42 397.5,-559.42 404.5,-559.42"/>
<!-- ur1_all_orders&#45;&gt;op_ur1_it_filter -->
<g id="edge14" class="edge">
<title>ur1_all_orders&#45;&gt;op_ur1_it_filter</title>
<path fill="none" stroke="black" d="M650.5,-651.91C650.5,-643.74 650.5,-634.65 650.5,-626.3"/>
<polygon fill="black" stroke="black" points="654,-626.24 650.5,-616.24 647,-626.24 654,-626.24"/>
</g>
<!-- ur1_it_orders -->
<g id="node8" class="node">
<g id="node10" class="node">
<title>ur1_it_orders</title>
<polygon fill="cyan" stroke="black" points="528,-476 274,-476 274,-438 528,-438 528,-476"/>
<text text-anchor="middle" x="401" y="-460.8" font-family="Times,serif" font-size="14.00">ur1_it_orders</text>
<text text-anchor="middle" x="401" y="-445.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;ur1&#45;002.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M764,-542C764,-542 537,-542 537,-542 531,-542 525,-536 525,-530 525,-530 525,-501 525,-501 525,-495 531,-489 537,-489 537,-489 764,-489 764,-489 770,-489 776,-495 776,-501 776,-501 776,-530 776,-530 776,-536 770,-542 764,-542"/>
<text text-anchor="middle" x="650.5" y="-526.8" font-family="Times,serif" font-size="14.00">ur1_it_orders</text>
<text text-anchor="middle" x="650.5" y="-511.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;ur1&#45;002.tsv,</text>
<text text-anchor="middle" x="650.5" y="-496.8" font-family="Times,serif" font-size="14.00">33 items))</text>
</g>
<!-- op_anno_ur1_it -->
<g id="node22" class="node">
<title>op_anno_ur1_it</title>
<path fill="pink" stroke="black" stroke-width="0" d="M762.5,-453C762.5,-453 598.5,-453 598.5,-453 592.5,-453 586.5,-447 586.5,-441 586.5,-441 586.5,-427 586.5,-427 586.5,-421 592.5,-415 598.5,-415 598.5,-415 762.5,-415 762.5,-415 768.5,-415 774.5,-421 774.5,-427 774.5,-427 774.5,-441 774.5,-441 774.5,-447 768.5,-453 762.5,-453"/>
<text text-anchor="middle" x="680.5" y="-437.8" font-family="Times,serif" font-size="14.00">op_anno_ur1_it</text>
<text text-anchor="middle" x="680.5" y="-422.8" font-family="Times,serif" font-size="14.00">(annotations manuelles)</text>
</g>
<!-- ur1_it_orders&#45;&gt;op_anno_ur1_it -->
<g id="edge16" class="edge">
<title>ur1_it_orders&#45;&gt;op_anno_ur1_it</title>
<path fill="none" stroke="black" d="M660.16,-488.91C663.31,-480.56 666.82,-471.24 670.03,-462.74"/>
<polygon fill="black" stroke="black" points="673.36,-463.83 673.62,-453.24 666.81,-461.36 673.36,-463.83"/>
</g>
<!-- ur1_it_orders_ann -->
<g id="node11" class="node">
<title>ur1_it_orders_ann</title>
<path fill="cyan" stroke="black" stroke-width="0" d="M832.5,-379C832.5,-379 528.5,-379 528.5,-379 522.5,-379 516.5,-373 516.5,-367 516.5,-367 516.5,-338 516.5,-338 516.5,-332 522.5,-326 528.5,-326 528.5,-326 832.5,-326 832.5,-326 838.5,-326 844.5,-332 844.5,-338 844.5,-338 844.5,-367 844.5,-367 844.5,-373 838.5,-379 832.5,-379"/>
<text text-anchor="middle" x="680.5" y="-363.8" font-family="Times,serif" font-size="14.00">ur1_it_orders_ann</text>
<text text-anchor="middle" x="680.5" y="-348.8" font-family="Times,serif" font-size="14.00">(commandes&#45;it&#45;2019&#45;ur1&#45;002&#45;annotated.tsv,</text>
<text text-anchor="middle" x="680.5" y="-333.8" font-family="Times,serif" font-size="14.00">33 items)</text>
</g>
<!-- op_ur1_to_l1p5 -->
<g id="node23" class="node">
<title>op_ur1_to_l1p5</title>
<path fill="pink" stroke="black" stroke-width="0" d="M804,-290C804,-290 537,-290 537,-290 531,-290 525,-284 525,-278 525,-278 525,-264 525,-264 525,-258 531,-252 537,-252 537,-252 804,-252 804,-252 810,-252 816,-258 816,-264 816,-264 816,-278 816,-278 816,-284 810,-290 804,-290"/>
<text text-anchor="middle" x="670.5" y="-274.8" font-family="Times,serif" font-size="14.00">op_ur1_to_l1p5</text>
<text text-anchor="middle" x="670.5" y="-259.8" font-family="Times,serif" font-size="14.00">(nettoyage et mise au format labo 1.5)</text>
</g>
<!-- ur1_it_orders_ann&#45;&gt;op_ur1_to_l1p5 -->
<g id="edge19" class="edge">
<title>ur1_it_orders_ann&#45;&gt;op_ur1_to_l1p5</title>
<path fill="none" stroke="black" d="M677.28,-325.91C676.25,-317.74 675.11,-308.65 674.06,-300.3"/>
<polygon fill="black" stroke="black" points="677.51,-299.72 672.79,-290.24 670.57,-300.6 677.51,-299.72"/>
</g>
<!-- ur1_it_orders_labo1p5 -->
<g id="node9" class="node">
<g id="node12" class="node">
<title>ur1_it_orders_labo1p5</title>
<polygon fill="cyan" stroke="black" points="415,-184 239,-184 239,-146 415,-146 415,-184"/>
<text text-anchor="middle" x="327" y="-168.8" font-family="Times,serif" font-size="14.00">ur1_it_orders_labo1p5</text>
<text text-anchor="middle" x="327" y="-153.8" font-family="Times,serif" font-size="14.00">(it&#45;ur1&#45;l1p5.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M708.5,-216C708.5,-216 556.5,-216 556.5,-216 550.5,-216 544.5,-210 544.5,-204 544.5,-204 544.5,-175 544.5,-175 544.5,-169 550.5,-163 556.5,-163 556.5,-163 708.5,-163 708.5,-163 714.5,-163 720.5,-169 720.5,-175 720.5,-175 720.5,-204 720.5,-204 720.5,-210 714.5,-216 708.5,-216"/>
<text text-anchor="middle" x="632.5" y="-200.8" font-family="Times,serif" font-size="14.00">ur1_it_orders_labo1p5</text>
<text text-anchor="middle" x="632.5" y="-185.8" font-family="Times,serif" font-size="14.00">(it&#45;ur1&#45;l1p5.tsv,</text>
<text text-anchor="middle" x="632.5" y="-170.8" font-family="Times,serif" font-size="14.00">22 items)</text>
</g>
<!-- ur1_it_orders_labo1p5&#45;&gt;concat -->
<g id="edge14" class="edge">
<title>ur1_it_orders_labo1p5&#45;&gt;concat</title>
<path fill="none" stroke="black" d="M301.76,-145.9C289.05,-136.78 273.5,-125.63 259.96,-115.92"/>
<polygon fill="black" stroke="black" points="262,-113.07 251.83,-110.09 257.92,-118.76 262,-113.07"/>
<!-- ur1_it_orders_labo1p5&#45;&gt;op_concat -->
<g id="edge22" class="edge">
<title>ur1_it_orders_labo1p5&#45;&gt;op_concat</title>
<path fill="none" stroke="black" d="M591.62,-162.91C576.1,-153.19 558.51,-142.18 543.29,-132.66"/>
<polygon fill="black" stroke="black" points="544.97,-129.58 534.64,-127.24 541.26,-135.51 544.97,-129.58"/>
</g>
<!-- ur1_paper_orders -->
<g id="node13" class="node">
<title>ur1_paper_orders</title>
<path fill="cyan" stroke="black" stroke-width="0" d="M949,-534.5C949,-534.5 806,-534.5 806,-534.5 800,-534.5 794,-528.5 794,-522.5 794,-522.5 794,-508.5 794,-508.5 794,-502.5 800,-496.5 806,-496.5 806,-496.5 949,-496.5 949,-496.5 955,-496.5 961,-502.5 961,-508.5 961,-508.5 961,-522.5 961,-522.5 961,-528.5 955,-534.5 949,-534.5"/>
<text text-anchor="middle" x="877.5" y="-519.3" font-family="Times,serif" font-size="14.00">ur1_paper_orders</text>
<text text-anchor="middle" x="877.5" y="-504.3" font-family="Times,serif" font-size="14.00">(archives papier ur1)</text>
</g>
<!-- ur1_paper_orders&#45;&gt;op_anno_ur1_it -->
<g id="edge17" class="edge">
<title>ur1_paper_orders&#45;&gt;op_anno_ur1_it</title>
<path fill="none" stroke="black" d="M832.8,-496.46C803.68,-484.71 765.52,-469.31 734.68,-456.87"/>
<polygon fill="black" stroke="black" points="735.95,-453.6 725.37,-453.11 733.33,-460.09 735.95,-453.6"/>
</g>
<!-- it_orders_labo1p5 -->
<g id="node10" class="node">
<g id="node14" class="node">
<title>it_orders_labo1p5</title>
<polygon fill="cyan" stroke="black" points="300,-38 156,-38 156,0 300,0 300,-38"/>
<text text-anchor="middle" x="228" y="-22.8" font-family="Times,serif" font-size="14.00">it_orders_labo1p5</text>
<text text-anchor="middle" x="228" y="-7.8" font-family="Times,serif" font-size="14.00">(it&#45;l1p5.tsv)</text>
<path fill="cyan" stroke="black" stroke-width="0" d="M565.5,-53C565.5,-53 445.5,-53 445.5,-53 439.5,-53 433.5,-47 433.5,-41 433.5,-41 433.5,-12 433.5,-12 433.5,-6 439.5,0 445.5,0 445.5,0 565.5,0 565.5,0 571.5,0 577.5,-6 577.5,-12 577.5,-12 577.5,-41 577.5,-41 577.5,-47 571.5,-53 565.5,-53"/>
<text text-anchor="middle" x="505.5" y="-37.8" font-family="Times,serif" font-size="14.00">it_orders_labo1p5</text>
<text text-anchor="middle" x="505.5" y="-22.8" font-family="Times,serif" font-size="14.00">(it&#45;l1p5.tsv,</text>
<text text-anchor="middle" x="505.5" y="-7.8" font-family="Times,serif" font-size="14.00">106 items)</text>
</g>
<!-- extraction_cnrs&#45;&gt;cnrs_all_xls -->
<!-- op_extra_geslab&#45;&gt;cnrs_all_xls -->
<g id="edge2" class="edge">
<title>extraction_cnrs&#45;&gt;cnrs_all_xls</title>
<path fill="none" stroke="black" d="M130,-659.81C130,-652.11 130,-642.82 130,-634.15"/>
<polygon fill="black" stroke="black" points="133.5,-634.02 130,-624.02 126.5,-634.02 133.5,-634.02"/>
<title>op_extra_geslab&#45;&gt;cnrs_all_xls</title>
<path fill="none" stroke="black" d="M128.5,-903.83C128.5,-896.13 128.5,-886.97 128.5,-878.42"/>
<polygon fill="black" stroke="black" points="132,-878.41 128.5,-868.41 125,-878.41 132,-878.41"/>
</g>
<!-- cnrs_xls_to_tsv&#45;&gt;cnrs_all_tsv -->
<!-- op_cnrs_xls_to_tsv&#45;&gt;cnrs_all_tsv -->
<g id="edge4" class="edge">
<title>cnrs_xls_to_tsv&#45;&gt;cnrs_all_tsv</title>
<path fill="none" stroke="black" d="M130,-511.83C130,-504.13 130,-494.97 130,-486.42"/>
<polygon fill="black" stroke="black" points="133.5,-486.41 130,-476.41 126.5,-486.41 133.5,-486.41"/>
<title>op_cnrs_xls_to_tsv&#45;&gt;cnrs_all_tsv</title>
<path fill="none" stroke="black" d="M128.5,-740.87C128.5,-732.89 128.5,-723.93 128.5,-715.38"/>
<polygon fill="black" stroke="black" points="132,-715.25 128.5,-705.25 125,-715.25 132,-715.25"/>
</g>
<!-- it_orders_filter&#45;&gt;cnrs_it_orders -->
<!-- op_cnrs_it_filter&#45;&gt;cnrs_it_orders -->
<g id="edge6" class="edge">
<title>it_orders_filter&#45;&gt;cnrs_it_orders</title>
<path fill="none" stroke="black" d="M130,-365.81C130,-358.11 130,-348.82 130,-340.15"/>
<polygon fill="black" stroke="black" points="133.5,-340.02 130,-330.02 126.5,-340.02 133.5,-340.02"/>
<title>op_cnrs_it_filter&#45;&gt;cnrs_it_orders</title>
<path fill="none" stroke="black" d="M128.5,-577.96C128.5,-570.32 128.5,-561.14 128.5,-552.23"/>
<polygon fill="black" stroke="black" points="132,-552 128.5,-542 125,-552 132,-552"/>
</g>
<!-- concat&#45;&gt;it_orders_labo1p5 -->
<!-- op_anno_cnrs_it&#45;&gt;cnrs_it_orders_ann -->
<g id="edge9" class="edge">
<title>op_anno_cnrs_it&#45;&gt;cnrs_it_orders_ann</title>
<path fill="none" stroke="black" d="M331.5,-414.96C331.5,-407.32 331.5,-398.14 331.5,-389.23"/>
<polygon fill="black" stroke="black" points="335,-389 331.5,-379 328,-389 335,-389"/>
</g>
<!-- op_cnrs_to_l1p5&#45;&gt;cnrs_it_orders_labo1p5 -->
<g id="edge11" class="edge">
<title>op_cnrs_to_l1p5&#45;&gt;cnrs_it_orders_labo1p5</title>
<path fill="none" stroke="black" d="M364.21,-251.96C370,-243.74 377.05,-233.73 383.76,-224.2"/>
<polygon fill="black" stroke="black" points="386.64,-226.19 389.54,-216 380.92,-222.16 386.64,-226.19"/>
</g>
<!-- op_extra_sifac&#45;&gt;ur1_all_orders -->
<g id="edge13" class="edge">
<title>op_extra_sifac&#45;&gt;ur1_all_orders</title>
<path fill="none" stroke="black" d="M650.5,-748.47C650.5,-738.87 650.5,-726.71 650.5,-715.28"/>
<polygon fill="black" stroke="black" points="654,-715.09 650.5,-705.09 647,-715.09 654,-715.09"/>
</g>
<!-- op_ur1_it_filter&#45;&gt;ur1_it_orders -->
<g id="edge15" class="edge">
<title>concat&#45;&gt;it_orders_labo1p5</title>
<path fill="none" stroke="black" d="M228,-73.81C228,-66.11 228,-56.82 228,-48.15"/>
<polygon fill="black" stroke="black" points="231.5,-48.02 228,-38.02 224.5,-48.02 231.5,-48.02"/>
<title>op_ur1_it_filter&#45;&gt;ur1_it_orders</title>
<path fill="none" stroke="black" d="M650.5,-577.96C650.5,-570.32 650.5,-561.14 650.5,-552.23"/>
<polygon fill="black" stroke="black" points="654,-552 650.5,-542 647,-552 654,-552"/>
</g>
<!-- cnrs_manual&#45;&gt;cnrs_it_orders_labo1p5 -->
<g id="edge8" class="edge">
<title>cnrs_manual&#45;&gt;cnrs_it_orders_labo1p5</title>
<path fill="none" stroke="black" d="M130,-219.81C130,-212.11 130,-202.82 130,-194.15"/>
<polygon fill="black" stroke="black" points="133.5,-194.02 130,-184.02 126.5,-194.02 133.5,-194.02"/>
<!-- op_anno_ur1_it&#45;&gt;ur1_it_orders_ann -->
<g id="edge18" class="edge">
<title>op_anno_ur1_it&#45;&gt;ur1_it_orders_ann</title>
<path fill="none" stroke="black" d="M680.5,-414.96C680.5,-407.32 680.5,-398.14 680.5,-389.23"/>
<polygon fill="black" stroke="black" points="684,-389 680.5,-379 677,-389 684,-389"/>
</g>
<!-- extraction_ur&#45;&gt;ur1_all_orders -->
<g id="edge10" class="edge">
<title>extraction_ur&#45;&gt;ur1_all_orders</title>
<path fill="none" stroke="black" d="M401,-659.81C401,-652.11 401,-642.82 401,-634.15"/>
<polygon fill="black" stroke="black" points="404.5,-634.02 401,-624.02 397.5,-634.02 404.5,-634.02"/>
<!-- op_ur1_to_l1p5&#45;&gt;ur1_it_orders_labo1p5 -->
<g id="edge20" class="edge">
<title>op_ur1_to_l1p5&#45;&gt;ur1_it_orders_labo1p5</title>
<path fill="none" stroke="black" d="M661.88,-251.96C658.07,-243.99 653.45,-234.34 649.02,-225.07"/>
<polygon fill="black" stroke="black" points="652.16,-223.52 644.69,-216 645.84,-226.53 652.16,-223.52"/>
</g>
<!-- sifac_to_itorders&#45;&gt;ur1_it_orders -->
<g id="edge12" class="edge">
<title>sifac_to_itorders&#45;&gt;ur1_it_orders</title>
<path fill="none" stroke="black" d="M401,-512.94C401,-504.99 401,-495.31 401,-486.31"/>
<polygon fill="black" stroke="black" points="404.5,-486.2 401,-476.2 397.5,-486.2 404.5,-486.2"/>
<!-- op_concat&#45;&gt;it_orders_labo1p5 -->
<g id="edge23" class="edge">
<title>op_concat&#45;&gt;it_orders_labo1p5</title>
<path fill="none" stroke="black" d="M505.5,-88.96C505.5,-81.32 505.5,-72.14 505.5,-63.23"/>
<polygon fill="black" stroke="black" points="509,-63 505.5,-53 502,-63 509,-63"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -119,14 +119,82 @@ Au lieu de ça, il apparaît ainsi (les colonnes **N° com. GESLAB** et **N° li
1950-4-7 12:00:00 AM 24/01/19 2019-3-19 12:00:00 AM CAT2_Configuration n°3 XPS 9365 DELL SAS S 1 0 1 0.00 1,755.00 0.00 1,755.00 SE9ADO0985 9ADO0985 NANOSC 2100 IM
```
#### cnrs_it_orders
Contient uniquement les achats informatiques extraits de [cnrs_all_tsv](####-cnrs_all_tsv).
- exemple: [commandes-it-2019-cnrs-002.tsv](../../tmp/commandes-it-2019-cnrs-002.tsv), qui contient 224 lignes de données
- colonnes: les mêmes que pour [cnrs_all_tsv](####-cnrs_all_tsv)
exemple:
```tsv
Date commande Libellé ligne Raison sociale fournisseur Qté com. Reste à const. Qté fac. Cons. ligne antérieur Consommé ligne Réservé ligne Facturé ligne Code EDP Matière Nat. dép.
71 24/01/19 MPXT2FN/A ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 1,195.15 0.00 1,195.15 MECVER 2100 IM
72 24/01/19 MBP13-3PL ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 89.00 0.00 89.00 MECVER 2100 IM
73 24/01/19 ECO-0,30 ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 0.30 0.00 0.30 MECVER 2100 IM
74 24/01/19 CTO-MPXT2-16GB ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 170.00 0.00 170.00 MECVER 2100 IM
...
84 24/01/19 D31591 ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 40.78 0.00 40.78 MECVER 2100 IM
89 24/01/19 CAT2_Configuration n°3 XPS 9365 DELL SAS 1.0 0.0 1.0 0.0 1,755.00 0.00 1,755.00 NANOSC 2100 IM
90 24/01/19 Dell Wireless Mouse WM126 BLACK DELL SAS 1.0 0.0 1.0 0.0 8.00 0.00 8.00 NANOSC 2100 IM
91 24/01/19 Eco contribution DELL SAS 1.0 0.0 1.0 0.0 0.43 0.00 0.43 NANOSC 2100 IM
...
```
#### cnrs_it_orders_labo1p5
- au format [attendu par labo 1.5](##description-du-fichier-attendu-par-labo1.5)
- par exemple [it-cnrs-l1p5.tsv](../../achats-ipr/2019/it-cnrs-l1p5.tsv) qui contien 84 lignes de données:
```tsv
id Modele Fabricant Type
cnrs_71 macbook pro 13 (2017) apple pc portable
cnrs_79 brilliance 258B6QUEB philips écran
cnrs_89 xps 9365 dell pc portable
cnrs_90 wm126 dell souris
cnrs_210 latitude 5590 dell pc portable
...
```
### ur1
#### ur1_all_orders
- exemple: [from_ddemorel](../../achats-ipr/2019/ur1/from_ddemorel) (610 items) qui contient:
- [2019.DIRECTION.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.DIRECTION.xls>), (93 items).
- [2019.MAT.NANO.SCIENCES.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.MAT.NANO.SCIENCES.xls>), (85 items).
- [2019.MATERIAUX ET LUMIERE.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.MATERIAUX ET LUMIERE.xls>), (86 items).
- [2019.MATIERE MOLLE.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.MATIERE MOLLE.xls>), (62 items).
- [2019.MECA VERRES.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.MECA VERRES.xls>), (88 items).
- [2019.MILIEU DIVISE.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.MILIEU DIVISE.xls>), (45 items).
- [2019.PHYSIQUE MOLECULAIRE.xls](<../../achats-ipr/2019/ur1/from_ddemorel/2019.PHYSIQUE MOLECULAIRE.xls>), (151 items).
- colonnes:
1. **Centre financier**: par exemple `991R423`
2. **Elément d'OTP**: par exemple `17CQ423-S0`
3. **Document d'achat**: par exemple `4500458349.0`
4. **Fournisseur/Division fourn.**: par exemple `7976 DELL`
5. **Date du document**: par exemple `2019-02-14`
6. **Code TVA**: par exemple `DK`
7. **Désignation**: par exemple `LATITUDE 5590 - Portable conf.n°2`
8. **Date livraison**: par exemple `2019-02-25`
9. **Valeur totale en cours**: par exemple `1616.8`
10. **Reste à livrer (quantité)**: par exemple `0`
11. **Livraison finale**: par exemple `X`
12. **Reste à facturer (quantité)**: par exemple `0`
13. **Facture finale**: par exemple `126639.0`
14. **Immobilisation**: par exemple ``
15. **Groupe marchandises**: par exemple `IA.11`
16. **Texte Correspondance**: par exemple `Danièle, Le numéro d'ordre n'est pas cor`
17. **Créateur commande**: par exemple, `DE MOREL DANIELE`
#### ur1_it_orders
- exemple : [commandes-it-2019-ur1-002\.tsv](../../tmp/commandes-it-2019-ur1-002.tsv), qui contient 33 lignes de données
- colonnes:
1. **<anonyme>**: identifieur d'achat, par exemple `21`
Contient uniquement les achats informatiques extraits de [ur1_all_orders](####-ur1_all_orders).
- exemple: [commandes-it-2019-ur1-002\.tsv](../../tmp/commandes-it-2019-ur1-002.tsv), qui contient 33 lignes de données
- colonnes: les mêmes que pour [ur1_all_orders](####-ur1_all_orders) mais avec la première colonne insérée
1. **<anonyme>**: identifieur de ligne, par exemple `21`
2. **Centre financier**: par exemple `991R423`
3. **Elément d'OTP**: par exemple `17CQ423-S0`
4. **Document d'achat**: par exemple `4500458349.0`
@ -145,6 +213,7 @@ Au lieu de ça, il apparaît ainsi (les colonnes **N° com. GESLAB** et **N° li
17. **Texte Correspondance**: par exemple `Danièle, Le numéro d'ordre n'est pas cor`
18. **Créateur commande**: par exemple, `DE MOREL DANIELE`
exemple:
```tsv
20241011-10:57:24 graffy@graffy-ws2:~/work/ddrs/procedures/labo1.5$ head -3 /home/graffy/work/ddrs/tmp/commandes-it-2019-ur1-002.tsv
Centre financier Elément d'OTP Document d'achat Fournisseur/Division fourn. Date du document Code TVA Désignation Date livraison Valeur totale en cours Reste à livrer (quantité) Livraison finale Reste à facturer (quantité) Facture finale Immobilisation Groupe marchandises Texte Correspondance Créateur commande
@ -204,3 +273,67 @@ ur1_237 latitude 3400 dell pc portable
...
```
## description des opérations
### `op_extra_geslab`: extraction geslab
Extraction geslab (effectuée par Nathalie Guicquiaux pour les données 2019)
### `op_extra_sifac`: extraction sifac
Extraction sifac (effectuée par Danièle Demorel pour les données 2019)
### `op_cnrs_it_filter`: filtrage pour ne garder que les achats informatiques
Opération effectuée automatiquement par [geslabt002_to_itorders.py](../../src/geslabt002_to_itorders.py) via [la recette make](../../src/Makefile)
Un achat est considéré comme un achat informatique que si le champ `Matière` a l'une des valeurs suivantes (définies dans [cnrs-matieres-001.csv](../../achats-ipr/2019/cnrs/from_ngicquiaux/cnrs-matieres-001.csv)):
- `1100` (PETIT_MATERIEL_INFORMATIQUE)
- `2100` (EQUIPEMENT_INFORMATIQUE)
- `D3--` (INFORMATIQUE_ACHAT)
### `op_anno_cnrs_it`: annotations
C'est l'opération manuelle qui consiste à ajouter une colonne `comment` pour y placer des infos supplémentaires concernant les achats, car la colonne `Libellé ligne` est souvent cryptique (il faut alors se référer aux archives papier des commandes cnrs `cnrs_paper_orders`), comme dans l'exemple ci-dessous où:
- le libellé `99MO084201` ne permet pas de savoir acilement qu'il s'agit d'un adaptatateur vga
- le libellé `MBP13-3PL` ne permet pas de savoir facilement qu'il s'agit de la garantie 3 ans du macbook pro
- etc.
```tsv
Date commande Libellé ligne Raison sociale fournisseur Qté com. Reste à const. Qté fac. Cons. ligne antérieur Consommé ligne Réservé ligne Facturé ligne Code EDP Matière Nat. dép.
...
71 24/01/19 MPXT2FN/A ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 1,195.15 0.00 1,195.15 MECVER 2100 IM macbook pro
72 24/01/19 MBP13-3PL ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 89.00 0.00 89.00 MECVER 2100 IM garantie 3 ans
73 24/01/19 ECO-0,30 ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 0.30 0.00 0.30 MECVER 2100 IM
74 24/01/19 CTO-MPXT2-16GB ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 170.00 0.00 170.00 MECVER 2100 IM passage à 16Go RAM
75 24/01/19 CTO-MPXT2-SSD1To ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 531.25 0.00 531.25 MECVER 2100 IM passage à disque dur 1To
76 24/01/19 MI4-MBP13-5PL ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 106.00 0.00 106.00 MECVER 2100 IM passage à garantie 5 ans
77 24/01/19 99MO084201 ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 23.34 0.00 23.34 MECVER 2100 IM adapter usbc->vga moshi 99MO084201
78 24/01/19 ECO-0,02 ECONOCOM PRODUCTS & SOLUTIONS 1.0 0.0 1.0 0.0 0.02 0.00 0.02 MECVER 2100 IM
...
```
### `op_cnrs_to_l1p5`: nettoyage et mise au format labo 1.5
C'est l'opération manuelle qui consiste à:
1. ajouter les colonnes labo 1.5: **id**, **Modèle**, **Fabricant** et **Type**
2. supprimer les lignes qui ne rentrent dans aucun [types supportés par labo 1.5](###-types-supportés-par-labo-1.5), par exemple, adaptateur vga ou extension de garantie
3. remplir les colonnes labo 1.5 (**id** est rempli par l'item number, préfixé par `cnrs_`, de manière à retrouver l'achat correspondant dans les tableaux détaillés, par exemple `ur1_it_orders_ann`)
4. supprimer les colonnes autres que les 4 colonnes labo 1.5
### `op_ur1_it_filter`: filtrage pour ne garder que les achats informatiques
Opération effectuée automatiquement par [sifact002_to_itorders.py](../../src/sifact002_to_itorders.py) via [la recette make](../../src/Makefile)
Un achat est considéré comme un achat informatique que si le champ `Fournisseur/Division fourn.` a l'une des valeurs suivantes:
- `7976 DELL`: marché pour l'achat de fixe et de portables non Apple
- `16783 ECONOCOM`: marché pour achat de matériel Apple
- `4945 MISCO INMAC WSTORE`: marché pour fournitures informatiques
### `op_ur1_to_l1p5`: nettoyage et mise au format labo 1.5
idem `op_cnrs_to_l1p5` mais côté ur1
### `op_concat`: fusion des données cnrs et ur1
Opération effectuée automatiquement par [la recette make](../../src/Makefile)

41
src/Makefile Normal file
View File

@ -0,0 +1,41 @@
DDRS_ROOT = /home/graffy/work/ddrs
TEMP_DIR = $(DDRS_ROOT)/tmp
cnrs_all_tsv = $(DDRS_ROOT)/achats-ipr/2019/cnrs/from_ngicquiaux/commandes-2019-cnrs-t002.tsv
cnrs_it_orders = $(TEMP_DIR)/commandes-it-2019-cnrs-002.tsv
cnrs_it_orders_labo1p5 = $(DDRS_ROOT)/achats-ipr/2019/it-cnrs-l1p5.tsv
ur1_all_orders_dir = $(DDRS_ROOT)/achats-ipr/2019/ur1/from_ddemorel
ur1_all_orders_pattern = $(ur1_all_orders_dir)/2019.<dept-id>.xls
ur1_all_orders_files = \
$(ur1_all_orders_dir)/2019.DIRECTION.xls \
$(ur1_all_orders_dir)/2019.MAT.NANO.SCIENCES.xls \
$(ur1_all_orders_dir)/2019.MATERIAUX\ ET\ LUMIERE.xls \
$(ur1_all_orders_dir)/2019.MATIERE\ MOLLE.xls \
$(ur1_all_orders_dir)/2019.MECA\ VERRES.xls \
$(ur1_all_orders_dir)/2019.MILIEU\ DIVISE.xls \
$(ur1_all_orders_dir)/2019.PHYSIQUE\ MOLECULAIRE.xls
ur1_it_orders = $(TEMP_DIR)/commandes-it-2019-ur1-002.tsv
ur1_it_orders_labo1p5 = $(DDRS_ROOT)/achats-ipr/2019/it-ur1-l1p5.tsv
it_orders_labo1p5 = $(DDRS_ROOT)/achats-ipr/2019/it-l1p5.tsv
all: $(it_orders_labo1p5)
$(it_orders_labo1p5): $(cnrs_it_orders_labo1p5) $(ur1_it_orders_labo1p5)
( cat $(word 1,$^) && tail +2 $(word 2,$^) )> $@
$(cnrs_it_orders_labo1p5): $(cnrs_it_orders)
echo "$@ must be updated manually from $< because $< is newer than $@" && false
$(cnrs_it_orders): $(cnrs_all_tsv)
$(DDRS_ROOT)/src/geslabt002_to_itorders.py --all-orders-report "$<" --it-orders-sheet "$@"
$(ur1_it_orders_labo1p5): $(ur1_it_orders)
echo "$@ must be updated manually from $< because $< is newer than $@" && false
$(ur1_it_orders): $(ur1_all_orders_files)
$(DDRS_ROOT)/src/sifact002_to_itorders.py --sifac-t002-path "$(ur1_all_orders_pattern)" --it-orders-sheet "$@"

View File

@ -6,23 +6,22 @@ import pandas
# converts a cnrs geslab type t001 report to a single table
def geslabt001_to_sheet(in_tsv_file_path: Path, out_tsv_file_path: Path):
with open(in_tsv_file_path) as inf, open(out_tsv_file_path, 'wt') as outf:
with open(in_tsv_file_path, encoding='utf8') as inf, open(out_tsv_file_path, 'wt', encoding='utf8') as outf:
table_header_has_been_written = False
for line in inf.readlines():
ignore_line = False
# the input report file contains groups of data lines sparated by header blocks such as this:
# Entité dépensière : AESJULLIEN AES RENNES METROPOLE MC JULLIEN Crédits reçus : 40,000.00
# Disponible : 24,743.14
#
#
# N° commande Souche Libellé commande Date commande Raison sociale fournisseur Montant consommé sur exercice antérieur Montant consommé sur l'exercice Montant réservé Montant facturé Code origine Nature dépense Statut Cde groupée
if re.match(r'^Entité dépensière', line):
ignore_line = True # noqa
is_table_header = re.match(r'^N° commande', line) is not None
# 19,572.00 19AESMCJ CAMERA ZYLA 5.5 sCMOS 04/11/19 ANDOR TECHNOLOGY LIMITED 0.00 13,681.56 0.00 0.00 635991 IM
if is_table_header and not table_header_has_been_written:
is_column_description = re.match(r'^N° commande', line) is not None
if is_column_description and not table_header_has_been_written:
outf.write('# %s' % line)
table_header_has_been_written = True
if re.match(r'^[0-9,./]+\t', line):
# this line is expected to contain data (ie not be part of the header blocks)
# 19,572.00 19AESMCJ CAMERA ZYLA 5.5 sCMOS 04/11/19 ANDOR TECHNOLOGY LIMITED 0.00 13,681.56 0.00 0.00 635991 IM
outf.write(line)

View File

@ -2,18 +2,32 @@
from pathlib import Path
import re
import pandas
import argparse
import tempfile
import os
# a geslab_t002 file is a sheet that contains data in the following form:
# ```
# LABORATOIRE : LABO1 IPR - UNIVERSITE DE RENNES Le : 27/01/2023
# DETAIL DES LIGNES DE COMMANDE Exercice : 2019
# Page : 1 / 100
# Etablissement : DR17 Délégation Bretagne et Pays de la Loire
#
#
# N° com. GESLAB Date commande N° ligne Libellé ligne Raison sociale fournisseur S Qté com. Reste à const. Qté fac. Cons. ligne antérieur Consommé ligne Réservé ligne Facturé ligne Code origine Elément analytique Code EDP Matière Nat. dép.
# ...
# 18,313.00 04/01/19 43,427.00 POUSSE SERINGUE PHD ULTRA 4400 I/W HARVARD APPARATUS S 1 0 1 0.00 6,616.00 0.00 6,616.00 59190 591901 ANRASJ 2500 IM
# ```
# converts a cnrs geslab type t001 report to a single table
# converts a cnrs geslab type t002 report to a single table
def geslabt002_to_sheet(in_tsv_file_path: Path, out_tsv_file_path: Path):
with open(in_tsv_file_path) as inf, open(out_tsv_file_path, 'wt') as outf:
with open(in_tsv_file_path, encoding='utf8') as inf, open(out_tsv_file_path, 'wt', encoding='utf8') as outf:
table_header_has_been_written = False
for line in inf.readlines():
# Entité dépensière : AESJULLIEN AES RENNES METROPOLE MC JULLIEN Crédits reçus : 40,000.00
# Disponible : 24,743.14
#
#
# N° commande Souche Libellé commande Date commande Raison sociale fournisseur Montant consommé sur exercice antérieur Montant consommé sur l'exercice Montant réservé Montant facturé Code origine Nature dépense Statut Cde groupée
is_table_header = re.match(r'^N° com. GESLAB', line) is not None
# for some strange reason, the column 'N° com. GESLAB''s contents are alternatively something like '1952-12-17 12:00:00 AM' and something like '19,855.00'
if is_table_header and not table_header_has_been_written:
@ -27,13 +41,15 @@ def geslabt002_to_sheet(in_tsv_file_path: Path, out_tsv_file_path: Path):
print('ignoring line : %s' % line)
def geslabt002_to_itorders(geslabt001_file_path: Path, itorders_file_path: Path):
sheet_file_path = Path('./tmp/commandes-2019-cnrs.tsv')
geslabt002_to_sheet(geslabt001_file_path, sheet_file_path)
def geslabt002_to_itorders(geslabt002_file_path: Path, itorders_file_path: Path):
df = pandas.read_csv(sheet_file_path, sep='\t')
all_orders_file_path = tempfile.NamedTemporaryFile(delete=False).name
print(f'all_orders_file_path = {all_orders_file_path}')
geslabt002_to_sheet(geslabt002_file_path, all_orders_file_path)
# delete the colums for which the labve is of the form 'Unnamed: <n>'. They come from the csv export of libre office
df = pandas.read_csv(all_orders_file_path, sep='\t')
# delete the colums for which the label is of the form 'Unnamed: <n>'. They come from the csv export of libre office
unnamed_columns = [column_label for column_label in df.keys() if re.match(r'^Unnamed', column_label) is not None]
print(unnamed_columns)
df = df.drop(columns=unnamed_columns)
@ -56,11 +72,18 @@ def geslabt002_to_itorders(geslabt001_file_path: Path, itorders_file_path: Path)
it_df = it_df.drop(columns=['S']) # I don't know the meaning of this column
print(it_df[['Facturé ligne', 'Raison sociale fournisseur', 'Libellé ligne']])
os.makedirs(itorders_file_path.parent, exist_ok=True)
it_df.to_csv(itorders_file_path, sep='\t')
def main():
geslabt002_to_itorders(Path('./achats-ipr/2019/cnrs/from_ngicquiaux_20230127/commandes-2019-cnrs-t002.tsv'), Path('./tmp/commandes-it-2019-cnrs-002.tsv'))
arg_parser = argparse.ArgumentParser(description='extracts the orders related to information technology hardware purchases from a report (in format geslab_t002) containing all the orders')
arg_parser.add_argument('--all-orders-report', type=Path, required=True, help='the input report file (in format geslab_t002) containing all the orders')
arg_parser.add_argument('--it-orders-sheet', type=Path, required=True, help='the output sheet containing only it orders')
args = arg_parser.parse_args()
all_orders_report_path = args.all_orders_report
it_orders_sheet_path = args.it_orders_sheet
geslabt002_to_itorders(all_orders_report_path, it_orders_sheet_path)
main()

View File

@ -2,10 +2,20 @@
from pathlib import Path
import re
import pandas
import argparse
import tempfile
import logging
# example of sifac_t002 file
# ```
# Centre financier Elément d'OTP Document d'achat Fournisseur/Division fourn. Date du document Code TVA Désignation Date livraison Valeur totale en cours Reste à livrer (quantité) Livraison finale Reste à facturer (quantité) Facture finale Immobilisation Groupe marchandises Texte Correspondance Créateur commande
# 0 991R423 17CQ423-A0 4500454464.0 4692 AIR LIQUIDE FRANCE INDUSTRIE 2019-01-21 DJ REGUL 2018GAZ HORS MARCHE ALPHAGAZ 2 AIR 2019-01-21 130.27 0 0 GA.21 Rejet à la demande de Magali MARCAULT MAGALI
# ...
# ```
# converts a cnrs geslab type t001 report to a single table
def sifact002_to_sheet(sifact002_dir: Path, out_tsv_file_path: Path):
# converts a cnrs sifac type t002 report to a single table
def sifact002_to_sheet(sifac_t002_path: str, out_tsv_file_path: Path):
dept_names = [
'DIRECTION',
@ -17,15 +27,16 @@ def sifact002_to_sheet(sifact002_dir: Path, out_tsv_file_path: Path):
'PHYSIQUE MOLECULAIRE'
]
with open(out_tsv_file_path, 'wt') as outf:
with open(out_tsv_file_path, 'wt', encoding='utf8') as outf:
out_header_has_been_written = False
for dept_name in dept_names:
src_file_path = sifact002_dir / ('2019.' + dept_name + '.xls')
tmp_file_path = Path('./tmp') / ('2019.' + dept_name + '.tsv')
src_file_path = Path(sifac_t002_path.replace('<dept-id>', dept_name))
tmp_file_path = Path(tempfile.NamedTemporaryFile(delete=False).name).with_suffix('.tsv')
logging.debug('tmp_file_path for department %s : %s', dept_name, tmp_file_path)
df = pandas.read_excel(src_file_path)
df.to_csv(tmp_file_path, sep='\t')
with open(tmp_file_path) as inf:
with open(tmp_file_path, encoding='utf8') as inf:
in_header_has_been_read = False
for line in inf.readlines():
if in_header_has_been_read:
@ -45,31 +56,14 @@ def sifact002_to_sheet(sifact002_dir: Path, out_tsv_file_path: Path):
# df = df[-1:] + df[:-1] # put the id column in the first column
df.to_csv(out_tsv_file_path, sep='\t')
# with open(in_tsv_file_path) as inf, open(out_tsv_file_path, 'wt') as outf:
# table_header_has_been_written = False
# for line in inf.readlines():
# ignore_line = False
# # Entité dépensière : AESJULLIEN AES RENNES METROPOLE MC JULLIEN Crédits reçus : 40,000.00
# # Disponible : 24,743.14
# #
# #
# # N° commande Souche Libellé commande Date commande Raison sociale fournisseur Montant consommé sur exercice antérieur Montant consommé sur l'exercice Montant réservé Montant facturé Code origine Nature dépense Statut Cde groupée
# if re.match(r'^Entité dépensière', line):
# ignore_line = True # noqa
# is_table_header = re.match(r'^N° commande', line) is not None
# # 19,572.00 19AESMCJ CAMERA ZYLA 5.5 sCMOS 04/11/19 ANDOR TECHNOLOGY LIMITED 0.00 13,681.56 0.00 0.00 635991 IM
# if is_table_header and not table_header_has_been_written:
# outf.write('# %s' % line)
# table_header_has_been_written = True
# if re.match(r'^[0-9,./]+\t', line):
# outf.write(line)
def sifact002_to_itorders(sifac_t002_path: str, itorders_file_path: Path):
all_orders_file_path = tempfile.NamedTemporaryFile(delete=False).name
logging.debug('all_orders_file_path = %s', all_orders_file_path)
def sifact002_to_itorders(sifact002_dir: Path, itorders_file_path: Path):
sheet_file_path = Path('./tmp/commandes-2019-ur1.tsv')
sifact002_to_sheet(sifact002_dir, sheet_file_path)
sifact002_to_sheet(sifac_t002_path, all_orders_file_path)
df = pandas.read_csv(sheet_file_path, sep='\t')
df = pandas.read_csv(all_orders_file_path, sep='\t')
# delete the colums for which the label is of the form 'Unnamed: <n>'. They come from the csv export of libre office
unnamed_columns = [column_label for column_label in df.keys() if re.match(r'^Unnamed', column_label) is not None]
@ -95,7 +89,15 @@ def sifact002_to_itorders(sifact002_dir: Path, itorders_file_path: Path):
def main():
sifact002_to_itorders(Path('./achats-ipr/2019/ur1/from_ddemorel'), Path('./tmp/commandes-it-2019-ur1-002.tsv'))
logging.basicConfig(level=logging.DEBUG)
arg_parser = argparse.ArgumentParser(description='extracts the orders related to information technology hardware purchases from excel sheets (one per department) containing all the orders')
arg_parser.add_argument('--sifac-t002-path', type=str, required=True, help='the path to the input files, where the department is represented by the tag <dept-id> (eg ./achats-ipr/2019/ur1/from_ddemorel/2019.<dept-id>.xls)')
arg_parser.add_argument('--it-orders-sheet', type=Path, required=True, help='the output sheet containing only it orders')
args = arg_parser.parse_args()
sifac_t002_path = args.sifac_t002_path
it_orders_sheet_path = args.it_orders_sheet
sifact002_to_itorders(sifac_t002_path, it_orders_sheet_path)
main()