cate issueshttps://gitlab.uni.lu/PCOG/cate/-/issues2019-03-15T11:48:37+01:00https://gitlab.uni.lu/PCOG/cate/-/issues/15Depiction of torsions does not respect the sign convention2019-03-15T11:48:37+01:00Raphaël BleuseDepiction of torsions does not respect the sign conventionThe refactor of the SVG export (4756463895e6) erroneously swapped the representation of torsions.The refactor of the SVG export (4756463895e6) erroneously swapped the representation of torsions.Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/7Decouple optimization code from drawing code2018-10-25T17:32:39+02:00Raphaël BleuseDecouple optimization code from drawing codeThe existing code tightly couples the optimization functions to the drawing backend. The optimization aprt should output a list of stages with the corresponding operations (torsion, crossing). The outputting part would then use this as i...The existing code tightly couples the optimization functions to the drawing backend. The optimization aprt should output a list of stages with the corresponding operations (torsion, crossing). The outputting part would then use this as input and transfotm it into a graphical representation (svg) or any other suitable output format (JSON for example).Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/13Antialiasing issue with SVG export.2018-10-25T17:29:52+02:00Raphaël BleuseAntialiasing issue with SVG export.The refactor of the SVG export (see 4756463895e69d9ece7ee2e03e5670d2914eaa63) creates templates with horizontal white lines. These lines are located at the junction of levels, and originate from the poor antialiasing of SVG.
A possible f...The refactor of the SVG export (see 4756463895e69d9ece7ee2e03e5670d2914eaa63) creates templates with horizontal white lines. These lines are located at the junction of levels, and originate from the poor antialiasing of SVG.
A possible fix would be to slightly vertically overlap the levels.Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/2Remove `type=argparse.FileType` from argument parsing2018-07-27T16:40:25+02:00Raphaël BleuseRemove `type=argparse.FileType` from argument parsingThe `argparse.FileType` type is annoying for many reasons:
- It `open`s the file, forcing the developer to explicitely `close` it: one should use a context manager instead.
- When used with `'w'` or `'x'`, as soon as the parsing succeeds...The `argparse.FileType` type is annoying for many reasons:
- It `open`s the file, forcing the developer to explicitely `close` it: one should use a context manager instead.
- When used with `'w'` or `'x'`, as soon as the parsing succeeds, it creates a file. If the script later fails, this leaves a empty file with no meaning.v1.0.0Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/3Report progress with `logging` module2018-07-24T10:30:01+02:00Raphaël BleuseReport progress with `logging` moduleRemove all `print` calls to report the progress of the computations in favor of a proper use of the `logging` module.Remove all `print` calls to report the progress of the computations in favor of a proper use of the `logging` module.https://gitlab.uni.lu/PCOG/cate/-/issues/4Harden input sanitizing2018-07-24T10:27:49+02:00Raphaël BleuseHarden input sanitizingThe input matrix file should be thoroughly sanitized before being used.The input matrix file should be thoroughly sanitized before being used.v1.0.0https://gitlab.uni.lu/PCOG/cate/-/issues/9Nasty error with valid JSON but incorrect linking matrix2018-07-24T10:27:04+02:00Raphaël BleuseNasty error with valid JSON but incorrect linking matrixWhen called with an empty linking matrix, `cate` fails with an exception. This should be handled gracefully.
Steps to reproduce:
```sh
$ echo '[]' | cate -
```
This call then fails with the following trace:
```sh
Starting constructing ...When called with an empty linking matrix, `cate` fails with an exception. This should be handled gracefully.
Steps to reproduce:
```sh
$ echo '[]' | cate -
```
This call then fails with the following trace:
```sh
Starting constructing the tree
Maximum possible level: 0
Finished constructing the tree
Starting generating the report
Finished generating the report
Starting creation of the SVG template
Traceback (most recent call last):
File "/home/bleuse/devel/cate-dev.venv36/bin/cate", line 11, in <module>
load_entry_point('cate', 'console_scripts', 'cate')()
File "/home/bleuse/src/cate.git/src/cate/cli.py", line 82, in cli
main.run(matrix, **options)
File "/home/bleuse/src/cate.git/src/cate/main.py", line 361, in run
drawSVGTemplate(matrix, myTree, output, entireTemplate=complete_flow, white=not color, scale=scale)
File "/home/bleuse/src/cate.git/src/cate/main.py", line 246, in drawSVGTemplate
maxTorsions = abs(max(torsions, key=abs))
ValueError: max() arg is an empty sequence
```v1.0.0https://gitlab.uni.lu/PCOG/cate/-/issues/12Nasty error with malformed JSON2018-07-23T16:53:05+02:00Raphaël BleuseNasty error with malformed JSONThis is a similar issue than #9. If a malformed JSON is given as input, the user is exposed to the whole traceback resulting from the `json.decoder.JSONDecodeError` that is raised. This should be handled gracefully.
Steps to reproduce:
...This is a similar issue than #9. If a malformed JSON is given as input, the user is exposed to the whole traceback resulting from the `json.decoder.JSONDecodeError` that is raised. This should be handled gracefully.
Steps to reproduce:
```sh
echo '[[0, 0], [0, 1]' | cate - # missing closing bracket
```
The call then fails with the following trace:
```sh
Traceback (most recent call last):
File "/home/bleuse/devel/cate-dev.venv36/bin/cate", line 11, in <module>
load_entry_point('cate', 'console_scripts', 'cate')()
File "/home/bleuse/src/cate.git/src/cate/cli.py", line 107, in cli
main.run(matrix, **options)
File "/home/bleuse/src/cate.git/src/cate/main.py", line 349, in run
matrix = createMatrixfromFile(matrix)
File "/home/bleuse/src/cate.git/src/cate/main.py", line 35, in createMatrixfromFile
matrix = json.load(f)
File "/usr/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 1 (char 16)
```v1.0.0Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/10Tests for the validation of linking matrix2018-07-11T15:26:22+02:00Martin RosalieTests for the validation of linking matrixCorrect matrix:
* Matrix 1 `[[0, 0], [0, 1]]`
* Matrix 2 `[[-1, -1, -1, -1], [-1, 0, 0, 0], [-1, 0, 1, 1], [-1, 0, 1, 2]]`
f1: diagonal_criterion()
* Matrix 3 `[[0, 0], [0, 2]]`
f2: neighbors_criterion()
* Matrix 4 `[[3, 2, 2, 3], ...Correct matrix:
* Matrix 1 `[[0, 0], [0, 1]]`
* Matrix 2 `[[-1, -1, -1, -1], [-1, 0, 0, 0], [-1, 0, 1, 1], [-1, 0, 1, 2]]`
f1: diagonal_criterion()
* Matrix 3 `[[0, 0], [0, 2]]`
f2: neighbors_criterion()
* Matrix 4 `[[3, 2, 2, 3], [2, 2, 2, 3], [2, 2, 3, 4], [3, 3, 4, 4]]`
f3: final_position_criterion()
* Matrix 5 `[[0, 0, 0, -1], [0, 1, 0, 0], [0, 0, 0, -1], [-1, 0, -1, -1]]`
f4: submatrix_criterion()
* Matrix 6 `[[0, 1], [1, 1]]`
* Matrix 7 `[[1, 2], [2, 2]]`
* Matrix 8 `[[-1, -1], [-1, -2]]`
* Matrix 9 `[[-1, -1, -1], [-1, -2, -2], [-1, -2, -3]]`
f5: planarity_criterion()
* Matrix 10 `[[0, 0, 0, 0], [0, 1, 0, -1], [0, 0, 0, -1], [0, -1, -1, -1]]`
| Matrix | f1 | f2 | f3 | f4 | f5 |
| ------ | -- | -- | -- | -- | -- |
| 1 | T | T | T | T | T |
| 2 | T | T | T | T | T |
| 3 | F | T | F | F | F |
| 4 | T | F | F | F | U |
| 5 | T | T | F | T | U |
| 6 | T | T | T | F | U |
| 7 | T | T | T | F | U |
| 8 | T | T | T | F | U |
| 9 | T | T | T | F | U |
| 10 | T | T | T | T | F |Martin RosalieMartin Rosaliehttps://gitlab.uni.lu/PCOG/cate/-/issues/5Drop dependency to `numpy`2018-06-29T13:19:38+02:00Raphaël BleuseDrop dependency to `numpy`The package `numpy` is only used in function `samePlusK`. This function could be rewritten not to use `numpy`. This would drop the heavy dependency that is `numpy`.The package `numpy` is only used in function `samePlusK`. This function could be rewritten not to use `numpy`. This would drop the heavy dependency that is `numpy`.https://gitlab.uni.lu/PCOG/cate/-/issues/11Log to standard error instead of standard output2018-06-29T13:13:51+02:00Martin RosalieLog to standard error instead of standard outputBecause progress reporting is done on stdout we cannot redirect the svg file to another program.Because progress reporting is done on stdout we cannot redirect the svg file to another program.Raphaël BleuseRaphaël Bleusehttps://gitlab.uni.lu/PCOG/cate/-/issues/1Fix formatting of README.rst2018-06-12T10:47:47+02:00Raphaël BleuseFix formatting of README.rstThe blocks used in README.rst to display code are broken.The blocks used in README.rst to display code are broken.Raphaël BleuseRaphaël Bleuse