Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests (trailing spaces) #29

Merged
merged 1 commit into from
May 15, 2014

Conversation

ospalh
Copy link
Contributor

@ospalh ospalh commented Apr 4, 2014

Hi.
This should fix unit tests after trailing spaces have disappeared from the source SVGs.

I guess i am partially responsible for the trailing white space disappearing from the source SVG. So i thought i might fix these tests.

… SVGs.

Also remove trailing spaces not related to the unit tests from `colorizer.py`.
cayennes added a commit that referenced this pull request May 15, 2014
@cayennes cayennes merged commit 136dcf1 into cayennes:master May 15, 2014
@cayennes
Copy link
Owner

Thanks

@ospalh ospalh deleted the feature-fix-unittests branch May 16, 2014 07:02
Connum added a commit to Connum/hanzi-colorize that referenced this pull request May 27, 2020
7a32000 Merge commit '4c3df2ddb775cade3b6a3f31e11407e644a49237'
4c3df2d Squashed 'hanzicolorizer/data/hanzivg/' changes from 49ae2a3a..8e740aa8
2b5a9ff updated readme
da40c88 Merge branch 'master' of https://github.com/Connum/hanzi-colorize
63c0bfd fixed link in README
17ec805 fixed link in README
3e56319 Squashed 'hanzicolorizer/data/hanzivg/' content from commit 49ae2a3
4e87bec Merge commit '3e56319f1387228600e28ba8f13164cc53d02fe9' as 'hanzicolorizer/data/hanzivg'
f24c225 updated README
ff6395d added dist.bat for convenience
4944ee8 fixed switching note types in conjunction with multiple src/dest field names, increased compatibility to Fluent Forever note types, some more kanji->hanzi renaming
03a6e1c removed php build script, as we can use the pavement script ($ paver dist_anki_addon)
6d8ee94 Merge branch 'master' of https://github.com/cayennes/kanji-colorize into cayennes-master
86aba63 Packaging instructions
3bd0260 Merge pull request cayennes#48 from AyanamiSan/feature/customizing-model-and-fields
e0c112f Allow customizing model and fields names
5a1076d Use new anki config system, bump version
97fda09 minor coding style fix
33aa6f9 make sure to read svg files in utf-8
6e8dd19 fix failing test in __init__
c4a2053 update circleci config
525c104 WIP: Update to python 3 and anki 2.1
711bede added php build script for anki addon zip
d8bde3f support array of field names as valid source and destination names in order to support the fields of the Fluent Forever Mandarin Model Deck out-of-the-box
ec7af6c support SVG files where id attribute is not the first attribute of a group
86d937d rename kanjicolorizer > hanzicolorizer
84827c0 change submodule and folders from kanjivg to hanzivg, update copyright notices
62d5224 bump version for future dev
09c8c48 Bump version for release
fa6c2cd Update KanjiVG data
ddb442c Fix bug that locks up anki when editing cards
6e14d3c Merge pull request cayennes#38 from 0xazure/invalid-write-file-mode
fec15fc Fix invalid write mode on adding SVG to media
a6c3783 New circle badge
095e55f Add a convenience function
8b9d2b1 Update pytest-circleci
78ce033 Merge pull request cayennes#35 from cayennes/xunit
fd142f8 Output junit.xml for circle
aa5945d Colorize kana in anki
9aa6583 Bump version for LucasEasedUp's fix
388fa90 Update README
7ac21d4 Parallel tests in CircleCI
e5c3743 Merge pull request cayennes#33 from LucasEasedUp/patch-1
cbd4e62 Fix AttributeError when closing card creation dialog with Kanji field selected
9809e8c Readme correction about wide-character
f54f438 CircleCI
5c00742 Update kanjivg
4d2357a Add some infrastructure
36792d4 Pull kanjivg updates
9f21136 Update README
136dcf1 Merge pull request cayennes#29 from ospalh/feature-fix-unittests
d058a9e Update kanjivg
23e2bac Fix unit tests after trailing spaces have disappeared from the source SVGs. Also remove trailing spaces not related to the unit tests from `colorizer.py`.
f1bd682 Fix anki addon crash on Chinese characters
376e5cc Fix addon with respect to latest anki version
8ea8027 Fix group mode
0113372 version 0.7dev
2c228e8 Version 0.6
d21138b make groups option a flag
e00ab95 Upstream KanjiVG updates
0f5c2ba Fix typo in anki addon usage instructions
00ec62d paver
13d54e6 More README updates
b16eab5 Update README
94667b9 Fix the tests for the stroke→fill change.
982c735 Use “fill”, not “stroke” to set the color of the text elements. Like this the stroke numbers don’t get a bold-like look.
57bd5ed Merge remote branch 'ospalh/just-comma-list'
52a960d Merge remote branch 'shufps/master'
24d6f2e Fix addon
6f14fdc Split character list on commas, if there are any. Useful to just create a variant of one kanji.
9c5a9db Kanji group coloring
c33fcb3 Replace import codecs with from codecs import open
99b44db Replace --source-directory option with --characters option
7502bab Add KanjiVG.get_all() unit tests
0c0f884 Add KanjiVG.character_filename unit tests
b5c26fb Add KanjiVG.ascii_filename unit tests
dc9e6e4 Add unit tests for KanjiVG._create_from_filename
5f63721 Make no-variant empty string instead of None
7e96cde Raise exceptions when trying to initialize nonexistent kanji
2d0f862 Add unit tests for current KanjiVG.__init__ behavior
ef9eecc Create files for unittest tests
e7a232a Clean up docstring for recent updates
1ea76c9 Remove an unused variable
0aa1a18 fix many pep8 issues
9c6b379 Add section about importing to README
9463093 Update anki2 mention in Known Issues section
e91aadb Start refactoring; add KanjiVG class
eab40ad Bump version to 0.6dev because I'll be changing API
5a903e0 Fix a few typos in colorizer.py that didn't affect functionality
d5f8b3b Use utf-8
dda8599 Use env for shebang
021fd4c Fill in missing part of sentence in config instructions
7634985 Bump version to 0.5.2dev
af8a24b Bump version to 0.5.1
c9ca8ff Add explanion to text config options
5c9aa54 Add missing space in --help text
1212c6e Update readme to mention addon
6ddfd3f Update README to explain where to download
a6e7773 Bump version to 0.5.1dev
dcf8071 Bump version to 0.5
3a90a09 Added menu item to (re)generate all kanji diagrams
25e0cd8 Actually use the config setting
b951990 Add licenses to MANIFEST.in for proper packaging
89a76a1 Remember to increment version in setup.py
db22cae Add first version of anki2 addon
8dd8ced setup.py
baf4de9 Add KanjiColorizer.get_colored_svg(character) method
154e119 Make kanjicolorizer.py run doctests if run as main
0a8ce70 Add kanji_colorize.py back as a script that imports kanjicolorizer
d2ec80b Move code into a KanjiColorizer class
1b2bee8 Rename kanji_colorize.py kanjicolorizer.py
b7587b0 Essential bugfixes and another doctest
ea75dd4 Actually use the arguments
1ed9f17 Add kanjivg as a submodule
91ef2cd specify python2 in the shebang
b31b461 Update README for switch to command line configuration
7f0fb1e Options on command line instead of config variables in code
8e174f6 Wrap lines in README
98ad2fe Switch to Affero GPL license
2c10e4c license information
3c215b4 Add setup_dst_dir() dectest
0a2f5b5 Add comment_copyright doctest
6a6c498 Add modify_svg doctest
e0f3a30 Add get_src_dir() doctest
142de62 Update .gitignore to properly deal with various kanji directories, and ignore .pyc files
3cbdf5c Add test/default_results directory with the expected SVGs from running the script in spectrum or contrast mode
cb78e5c Add test directory
3f431cb Add resize_svg doctest
cff5584 Add stroke_count doctest
c04b9ad Add color_svg doctest
adc0fee Add color_generator doctest
dd916ea Add get_dst_filename doctest
649e07b Add to hsv_to_rgbhexcode and convert_file_name doctest
97e2a4c Put configuration in a config dictionary rather than many globals
3da82db Clean up code
5b748e6 Rename kanji-colorize.py to kanji_colorize.py
cfa98c2 Fix typo in README
240bd8d Use cross-platform paths
e339e7e First release of kanji-colorize.py
dc0147d Add kanjivg directories to .gitignore
1c4d122 Add a "Known Issues" section
9a3e5ac hopefully really explain interaction of field formatting syntax this time
bc222de Merge branch 'documentation'
ec1f8f0 mention {{text:Kanji}} and {{{Kanji}}} interaction
2c77b7c Merge branch 'documentation'
143ce40 semi-fix for formatting (issue 1)
a6293c1 Merge branch 'documentation'
b29e003 properly tested instructions
ca7bdb2 Merge branch 'documentation'
74bc8f9 add JLU direct link
b0f6bea fix wrong markdown link syntax
96c6ff8 Merge branch 'documentation'
27bb664 fix typo that made instructions not work
62422f2 Merge branch 'documentation'
7f1384f switch readme to markdown
0653625 Merge branch 'documentation'
a47626c more creole syntax fixes
cdd266b Merge branch 'documentation'
e5d658e fix typo in creole link syntax
6f4ef7b Merge branch 'documentation'
ce63ab4 Initial readme explaining usage of downloaded kanji sets
9426a3d adding .gitignore to ignore files created to make zips to upload
4c0bc86 adding .gitignore to ignore files created to make zips to upload
8d6fd99 first commit
REVERT: 8e740aa8 Fixed stroke order on 嗎 (cayennes#6)
REVERT: 49ae2a3a added character 骑
REVERT: c53e15c5 updated HSK status page
REVERT: c4618d6d added 3 new hanzi: 弹, 钢, 琴
REVERT: c787b886 updated HSK status page
REVERT: 51b44db1 added two characters: 抚, 摸
REVERT: fe5ce70e format.html: updated copyright year in comment
REVERT: ca6343e9 format.html: auto-fix missing style attribute on numbers group
REVERT: a784dd30 added our first Traditional character (嗎 / 055ce) thanks to 2600box (cayennes#3)
REVERT: d3078e35 removed some old kanji files, updated status_hsk.html
REVERT: d1bec93a Merge pull request cayennes#2 from davidb7/ffpage5
REVERT: 0f4114e2 changed and added tests
REVERT: 464f285c support negative numbers as acoordinates for pathStart
REVERT: 8ef78620 Updating files through format.html
REVERT: 5f601052 Added remaining 3 hanzi from fluent forever word list page 5
REVERT: 3e78eb70 update status page
REVERT: f8bdb03e added 5 HSK2 hanzi
REVERT: e1a08e58 update jsdelivr URLs to github pages
REVERT: af209edc added overall progress and percentage done to status page
REVERT: 96b7b910 update status page
REVERT: 2acd790f added three new HSK hanzi
REVERT: 44aef470 added one HSK5 hanzi
REVERT: 2d141a2f added two new HSK2 Hanzi
REVERT: e7783043 changed link to status_hsk.html from rawgit to htmlpreview.github.io
REVERT: 4f8dbca0 reformatted code of format.html and switched rawgit icon urls to jsdelivr
REVERT: f40ff167 removed done file from wip
REVERT: f50619d7 UPDATE status_hsk.html
REVERT: dd617126 added some more hanzi
REVERT: b8784c15 UPDATE statUPDATE status_hsk.html
REVERT: 22067032 UPDATE status_hsk.html
REVERT: a246b589 added >4000 other common hanzi not in HSK1-6 (analogue to animCJK)
REVERT: 0a89eaeb completed transferring all HSK2 Hanzi that are in KanjiVG
REVERT: 29ed3b25 UPDATE status_hsk.html
REVERT: 5c281c10 include work-in-progress in compare and status_hsk
REVERT: 25767339 added several hanzi (some completely new)
REVERT: 92c45e97 further clean up template.svg
REVERT: b017c0fd format.html: auto-fix font-size on StrokeNumbers group
REVERT: 9ad6ff2f template.svg: remove transforms
REVERT: ae5636b2 UPDATE status_hsk.html
REVERT: d7225b1f added some new tests
REVERT: 3357630e fixed some group names in recently added hanzi and added some new ones (mainily HSK2, plus some others)
REVERT: 4fe91746 UPDATE status_hsk.html
REVERT: d50a042a added several HSK2 hanzi
REVERT: 1387d18c UPDATE status_hsk.html
REVERT: 94eb0fe3 added several hanzi, mainly HSK2
REVERT: 2af1f7a9 UPDATE status_hsk.html
REVERT: 9ad4d02d Merge branch 'master' of https://github.com/Connum/hanzivg
REVERT: 38c9055b HSK1 completed!
REVERT: dea6f169 HSK1 completed!
REVERT: 31badc3c UPDATE status_hsk.html
REVERT: 122b4e6c added several new HSK1 Hanzi from AnimHanzi
REVERT: 50b97450 UPDATE status_hsk.html
REVERT: 7ddf1c6d added several new HSK1 hanzi
REVERT: ce119e8e don't show square brackets if there are no elements in log message
REVERT: 5070728a trigger namespace renaming in files imported from animhanzi
REVERT: ba90a2f5 test.js: test for KanjiVG variants only in STANDALONE mode (= in test.php)
REVERT: dc29f740 refactored tree nodes to use .data instead of .original.node, possibility to highlight/activate nodes from error logs
REVERT: e14278c5 UPDATE status_hsk.html
REVERT: 17562391 added several new HSK1 hanzi from animHanzi and some fixes
REVERT: 11d8cf6f format.html: button to run tests again in the panel of the two root groups; confirm losing changes when closing tab; react to hashchange;
REVERT: cc41ca29 added characterid in id attribute test
REVERT: e392d366 UPDATE status_hsk.html
REVERT: 0a04050a added more HSK1 hanzi from AnimHanzi
REVERT: 8d34db1e outsourced tests to test.js, run tests in format.html; improved automatic fixes in format.html
REVERT: 6859dae9 improved event log information and layout
REVERT: b25db83f mark clicked char as active to make it easier to spot where you left when switching back to the tab
REVERT: 40e9c24b test.php: check for duplicate ids
REVERT: 45cc22e1 format.html: implemented event log
REVERT: 0f0219c4 UPDATE status_hsk.html
REVERT: e00d5371 replaced deprecated kvg:part by kvg:number
REVERT: afab3213 added more HSK1 hanzi from AnimHanzi
REVERT: 09fd3525 UPDATE status_hsk.html
REVERT: 86f532b8 added test for KanjiVG variants in IDs
REVERT: 25b300e0 fix char id when importing template.svg
REVERT: f39ead1c HSK1 hanzi from KanjiVG complete
REVERT: dcd52fd9 fixed preview playback for variant files
REVERT: 63992ac8 updated status_hsk.html
REVERT: 37335aa4 added several HSK1 hanzi
REVERT: c839fec1 fix charId being an array
REVERT: 3f1102f5 updated README
REVERT: 7d3f1ac7 fixed several hanzi (mainly radicals / grouping)
REVERT: fa2676b5 added test.php for some simple tests of char/svg integrity
REVERT: 7082b5c9 open variant editing in new tab
REVERT: 0518308c ignore pointer events of stroke start dot overlay
REVERT: 84a1a5e0 show info link only if applicable
REVERT: d62f9faa FIXED group deletion
REVERT: 65dfe285 display radical + additional stroke when selecting any of the root groups
REVERT: c8bae6d1 update status.html
REVERT: 68bd1681 added more HSK1 hanzi from KanjiVG
REVERT: fd645146 update status_hsk.html
REVERT: a75fba32 added several hanzi
REVERT: dbad2597 status_hsk.php: stats for each HSK level; updated status_hsk.html
REVERT: 52ae5cd5 added several chars
REVERT: 4b27e451 compare.php: list variants and link to format editor
REVERT: b708adf1 compare.php: fix written chinese link
REVERT: 56fc9d35 status.php: delete files from kanji and animhanzi if they exist in hanzivg (including variants)
REVERT: 1b09fc11 update status_hsk.html
REVERT: ef5d70c0 added several new chars
REVERT: a739f40e fix local/online check in status_hsk
REVERT: 7120c645 link chars in status_hsk to compare page if run locally, update status_hsk.html
REVERT: 4ac5555b Merge branch 'master' of https://github.com/Connum/hanzivg
REVERT: e95b6c2f added 08c22
REVERT: 657ddce8 Update README.md
REVERT: db762a48 update status_hsk.html
REVERT: 526c5d02 added status_hsk.php with static html generation for linking in README
REVERT: 33434d03 added several Hanzi
REVERT: bd75aea3 format.html: fix wrongly named ids on load
REVERT: 49b01047 format.html: support for different path notations
REVERT: d47755c3 added 05f88 from KanjiVG
REVERT: 4a90eafc format.html: remove variant name from ids when editing a character
REVERT: b3d9d34b Revert "removed KanjiVG 05f88"
REVERT: 992201be format.html: implemented stroke starting point display
REVERT: d8c12549 removed KanjiVG 05f88
REVERT: a1aa7b1c Added from AnimHanzi: 04e1a, 04e1c, 04e1d, 04f60, 04eec, 08fd9, 04e48, 08bf4, 05417, 05979 Added from KanjiVG: 06211, 07684, 0662f, 04e86, 04ed6, 05728, 04e2a, 0597d, 04eba, 090a3, 04f1a, 06ca1, 060f3, 080fd, 053bb Removed from sources: 06709, 06765-Kaisho
REVERT: 1f2e66ed added 04e13 from AnimHanzi
REVERT: 1aed45b1 updated export copyright notice to include AnimHanzi
REVERT: 3a8a0777 added preview functionality
REVERT: 5a710de8 set active element class again after export
REVERT: fadde896 format.html: add as last node when dropping into group, open main character node on load
REVERT: 9a1f0924 format.html: fixed bug with drag&drop
REVERT: 3f900639 format.html: possibility to load file from parameter instead of drag&drop, compare.php: open files in format.html
REVERT: 5b7bcc4e completed char 09547
REVERT: fda2cc1f update README
REVERT: cd2e3e05 update README
REVERT: a8b99ea4 updated README with description of how to add a new character, added help link to format.html
REVERT: be827898 format.html: implemented cleansing and export
REVERT: ad92cd07 compare.php: link to MDBG (useful for character decomposition)
REVERT: 55f316b8 load icons from rawgit CDN
REVERT: 4ab4d3ee format.html: implemented grouping and attributes (export still TODO)
REVERT: 0bb78701 initial commit of template.svg and format.html (no editing capabilities so far, only group and stroke inspection), 09547 as work in progress (all strokes done, needs grouping/metadata and conversion  to final format)
REVERT: 83470ee1 include writtenchinese link in compare.php output
REVERT: 997a9ecf updated README
REVERT: 5818fa42 moved 04e03 from kanji to hanzi
REVERT: 07671cd1 updated README / conventions
REVERT: c229d33b moved a bunch of files from kanji to hanzi, deleted kanji variant that is no longer needed
REVERT: 560b0436 initial commit of status.php and compare.php
REVERT: 24d96a8c Added what seem to be the missing HSK4+ files from https://github.com/parsimonhi/animHanzi/
REVERT: e709e0dd change kvg: to hvg: in id attributes and added a paragraph about this to the README
REVERT: 8b855aff our first HanziVG file! :-) 有 based on KanjiVG 06709-Kaisho
REVERT: 8c585e3c updated readme regarding AnimHanzi errors
REVERT: a96e8b5b new README section on why this is needed at all
REVERT: 593e508b Some minor README updates, initial commit of kanji and animhanzi files
REVERT: c4174bc1 Create README.md

git-subtree-dir: hanzicolorizer/data/hanzivg
git-subtree-split: 7a32000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants