[Widelands-dev] [Merge] lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands
Continuous integration builds have changed state: Travis build 4197. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/452676073. Appveyor build 3993. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_terrain_affinity_as_int-3993. -- https://code.launchpad.net/~widelands-dev/widelands/terrain_affinity_as_int/+merge/358299 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/terrain_affinity_as_int into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui into lp:widelands
Continuous integration builds have changed state: Travis build 4196. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/452675533. Appveyor build 3992. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_empire04_unused_key_return_on_dismantle_no_ui-3992. -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui/+merge/358305 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle_no_ui into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1769426-libreadline into lp:widelands
Continuous integration builds have changed state: Travis build 4195. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/452675099. Appveyor build 3991. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1769426_libreadline-3991. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1769426-libreadline/+merge/358362 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1769426-libreadline into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1801767-tutorial2-ai into lp:widelands
Continuous integration builds have changed state: Travis build 4194. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/452674525. Appveyor build 3990. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1801767_tutorial2_ai-3990. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1801767-tutorial2-ai/+merge/358363 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1801767-tutorial2-ai into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/update_beautifulsoup4 into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/update_beautifulsoup4 into lp:widelands-website. Commit message: Update BeautifulSoup and make needed changes Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/update_beautifulsoup4/+merge/358571 Update BeautifulSoup3 to BeautifulSoup4. This is a prerequisite for the python update. In contrary to bs3, bs4 escapes all (python) strings, so it is not possible anymore to apply just a (unicode)string like "LINKTEXT". This results to "LINKTEXT" for a BS4 object. This branch takes care of this and modifies the used code to use BeautifulSoup4 objects. The new code may can be smarter, but i find it understandable. I have also refactored some variables and comments. The rendering times are close to equal in comparison with BeautifulSoup3. E.g. For the Developers page: /developers/ bs3: ~0.62s bs4: ~0.45s For /wiki/WikiSyntax/ bs3: ~0.14s bs4: ~0.14s The Regular expression for finding pasted plain text-links is tested here: https://regexr.com/42pq5 I have also removed the SMILEY_PREESCAPING things, because it works as is right now. The only problem is: The 'develish' smiley won't work if it is placed as the first characters. I am in favor to replace '>:-)' with ']:-)' to fix this. Any remarks for this? -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/update_beautifulsoup4 into lp:widelands-website. === modified file 'mainpage/templatetags/wl_markdown.py' --- mainpage/templatetags/wl_markdown.py 2017-11-14 16:54:28 + +++ mainpage/templatetags/wl_markdown.py 2018-11-09 18:07:36 + @@ -25,7 +25,7 @@ import urllib import bleach -from BeautifulSoup import BeautifulSoup, NavigableString +from bs4 import BeautifulSoup, NavigableString # If we can import a Wiki module with Articles, we # will check for internal wikipages links in all internal @@ -38,8 +38,7 @@ # We will also need the site domain from django.contrib.sites.models import Site -from settings import SITE_ID, SMILEYS, SMILEY_DIR, \ -SMILEY_PREESCAPING +from settings import SITE_ID, SMILEYS, SMILEY_DIR try: _domain = Site.objects.get(pk=SITE_ID).domain @@ -60,42 +59,55 @@ def _insert_smileys(text): """This searches for smiley symbols in the current text and replaces them with the correct images. - -Only replacing if smiley symbols aren't in a word (e.g. http://) - -""" -words = text.split(' ') -for sc, img in SMILEYS: -if sc in words: -words[words.index( -sc)] = "" % (SMILEY_DIR, img, img) -text = ' '.join(words) -return text - - -def _insert_smiley_preescaping(text): -"""This searches for smiley symbols in the current text and replaces them -with the correct images.""" -for before, after in SMILEY_PREESCAPING: -text = text.replace(before, after) -return text + +Then we have to reassemble the whole contents...""" + +tmp_content = [] +for content in text.parent.contents: +try: +# If this fails, content is probably '\n' or not a string, e.g. +words = content.split(' ') +except: +# apply the unsplittable content and continue +tmp_content.append(content) +continue + +for i, word in enumerate(words): +smiley = "" +for sc, img in SMILEYS: +if word == sc: +smiley = img +if smiley: +img_tag = BeautifulSoup(features="lxml").new_tag('img') +img_tag['src'] = "{}{}".format(SMILEY_DIR, smiley) +img_tag['alt'] = smiley +tmp_content.append(img_tag) +# Apply a space after the smiley +tmp_content.append(NavigableString(' ')) +else: +if i < (len(words) - 1): +# Apply a space after each word, except the last word +word = word + ' ' +tmp_content.append(NavigableString(word)) + +text.parent.contents = [x for x in tmp_content] def _classify_link(tag): -"""Returns a classname to insert if this link is in any way special +"""Applies a classname if this link is in any way special (external or missing wikipages) -tag to classify for +tag: classify for this tag """ # No class change for image links -if tag.findChild('img') != None: -return None +if tag.next_element.name == 'img': +return try: href = tag['href'].lower() except KeyError: -return None +return # Check for external link if href.startswith('http'): @@ -105,67 +117,93 @@ external = False break if external: -
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands
Oh, now I see where your original comments are. Don't know why I didn't notice them before. Sorry about that. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands
Oh, I see you had some other nits that you fixed. Fair enough. I should have checked more thoroughly. Or did you mention some specifics before somewhere and I had missed them? As for the naming of the temp dir, I also had it named "temp" first but felt that might encourage players to just delete it (possibly while the game is up, thus messing up their next save). I guess I was overreacting because a friend of mine notoriously does this kind of thing, always complaining that stupid programmers never clean up their temp stuff. But honestly, "temp" is perfectly fine. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1798297-locale-C into lp:widelands
Continuous integration builds have changed state: Travis build 4193. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/452673990. Appveyor build 3989. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1798297_locale_C-3989. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1798297-locale-C/+merge/358364 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1798297-locale-C into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1800337-unlocalize-log into lp:widelands
Review: Approve Looks good to me. Also playtested it. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1800337-unlocalize-log/+merge/358424 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1800337-unlocalize-log. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1800337-unlocalize-log into lp:widelands
Continuous integration builds have changed state: Travis build 4192. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/452673599. Appveyor build 3988. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1800337_unlocalize_log-3988. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1800337-unlocalize-log/+merge/358424 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1800337-unlocalize-log into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_wai_files_09112018 into lp:widelands
TiborB has proposed merging lp:~widelands-dev/widelands/ai_wai_files_09112018 into lp:widelands. Commit message: Another round of AI training. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/ai_wai_files_09112018/+merge/358544 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai_wai_files_09112018 into lp:widelands. === modified file 'data/ai/ai_input_1.wai' --- data/ai/ai_input_1.wai 2018-07-13 19:37:02 + +++ data/ai/ai_input_1.wai 2018-11-09 11:50:58 + @@ -2,345 +2,345 @@ # See wiki for more info: https://wl.widelands.org/wiki/Ai%20Training/ [magic_numbers] -0="-66" -1="-46" -2="-14" -3="-33" -4="20" -5="47" -6="24" -7="20" -8="-2" -9="81" -10="-94" -11="1" +0="43" +1="-70" +2="-80" +3="-66" +4="-86" +5="61" +6="80" +7="63" +8="37" +9="0" +10="81" +11="95" 12="63" -13="37" -14="15" -15="-53" -16="-63" -17="-15" +13="-85" +14="7" +15="30" +16="-54" +17="6" 18="78" -19="-40" -20="-31" -21="-85" -22="16" +19="-54" +20="-87" +21="-57" +22="58" 23="-11" -24="-25" -25="-86" -26="-20" -27="59" -28="-55" -29="-22" -30="-81" -31="-19" -32="75" -33="0" -34="-23" -35="17" -36="47" -37="25" -38="-48" -39="56" -40="35" -41="89" -42="-1" -43="36" -44="-34" +24="60" +25="-50" +26="16" +27="-37" +28="-21" +29="-13" +30="68" +31="55" +32="-82" +33="-80" +34="-3" +35="36" +36="57" +37="48" +38="-10" +39="-52" +40="-38" +41="-1" +42="27" +43="-67" +44="-14" 45="66" -46="95" -47="-60" -48="-29" +46="-58" +47="99" +48="-60" 49="54" -50="-69" -51="51" -52="-6" +50="-21" +51="-8" +52="-40" 53="44" -54="59" -55="-41" -56="33" -57="-8" -58="85" -59="79" -60="-81" -61="13" -62="-100" -63="84" -64="-67" -65="67" -66="-29" -67="45" -68="-88" -69="-19" -70="33" -71="40" -72="-59" -73="0" -74="-81" -75="10" -76="73" -77="-64" -78="64" +54="-6" +55="48" +56="-52" +57="86" +58="-10" +59="31" +60="-90" +61="11" +62="-70" +63="65" +64="55" +65="0" +66="-78" +67="-20" +68="-5" +69="72" +70="-36" +71="21" +72="14" +73="-4" +74="-58" +75="64" +76="-93" +77="52" +78="5" 79="27" -80="-38" -81="-99" -82="-96" +80="21" +81="-53" +82="-62" 83="100" -84="5" -85="-92" -86="-85" -87="-100" -88="73" -89="-4" -90="17" -91="-99" -92="-85" -93="-97" -94="18" -95="-27" -96="85" -97="67" +84="38" +85="59" +86="91" +87="-94" +88="92" +89="0" +90="-68" +91="65" +92="-88" +93="-60" +94="33" +95="-46" +96="73" +97="84" 98="0" -99="17" -100="77" -101="76" -102="-99" +99="-39" +100="57" +101="14" +102="-6" 103="67" 104="-28" -105="-60" -106="50" -107="-94" -108="-10" -109="54" -110="17" +105="-16" +106="40" +107="98" +108="54" +109="30" +110="45" 111="-99" -112="-65" -113="-71" -114="83" -115="-80" -116="43" -117="45" -118="87" -119="75" -120="-73" +112="13" +113="-57" +114="35" +115="28" +116="-74" +117="-94" +118="-17" +119="87" +120="52" 121="-3" -122="17" -123="-7" +122="46" +123="48" 124="-63" -125="66" -126="76" +125="33" +126="55" 127="-60" -128="-2" -129="89" -130="6" -131="77" +128="-68" +129="-58" +130="-78" +131="-19" 132="73" 133="-40" -134="32" -135="-6" +134="0" +135="0" 136="80" -137="9" -138="-5" -139="0" -140="28" +137="91" +138="-33" +139="-49" +140="50" 141="-94" -142="11" -143="-93" -144="43" -145="-11" -146="36" -147="-95" -148="15" -149="75" -150="-44" -151="77" -152="19" -153="-55" -154="-91" -155="-29" -156="32" -157="-61" -158="36" -159="16" -160="-72" -161="-89" -162="19" -163="1" -164="82" -165="-59" -166="31" -167="-57" -168="-87" -169="15" -170="44" -171="95" -172="-40" +142="0" +143="56" +144="59" +145="-37" +146="-32" +147="98" +148="-97" +149="-20" +150="-67" +151="-48" +152="5" +153="57" +154="-66" +155="-70" +156="-3" +157="-28" +158="68" +159="69" +160="-58" +161="79" +162="-56" +163="-41" +164="0" +165="-63" +166="8" +167="-72" +168="-81" +169="-40" +170="1" +171="65" +172="25" 173="0" 174="-95" -175="63" -176="87" -177="88" -178="-62" -179="50" -180="27" -181="-89" -182="77" -183="-48" -184="42" -185="26" -186="3" -187="100" -188="-8" -189="-83" -190="-24" -191="24" -192="-39" -193="12" -194="-27" -195="62" -196="-98" -197="-60" -198="98" -199="-67" +175="-94" +176="92" +177="4" +178="65" +179="-15" +180="87" +181="-40" +182="37" +183="-89" +184="-31" +185="36" +186="4" +187="60" +188="66" +189="-46" +190="-7" +191="-96" +192="-21" +193="-94" +194="22" +195="20" +196="-75" +197="-69" +198="-46" +199="-1" [neuron_values] -0="-86" -1="-85" -2="-76" -3="54" -4="-11" -5="-51" -6="2" -7="60" -8="86" -9="-55" -10="-51" -11="-50" -12="-89" +0="49" +1="41" +2="69" +3="-40" +4="-24" +5="-61" +6="29" +7="-64" +8="68" +9="-16" +10="-44" +11="-25" +12="-16" 13="30" 14="-2" -15="-75" +15="-97" 16="87" -17="-45" -18="29" -19="46" -20="-57" +17="-90" +18="-66" +19="-90" +20="44" 21="-29" 22="27" -23="-16" -24="-90" -25="-50" -26="92" -27="3" -28="-93" -29="17" -30="39" +23="-76" +24="-58" +25="-21" +26="-49" +27="-87" +28="94" +29="100" +30="-93" 31="4
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands
Huh? I had already fixed them. Did I miss something? -- https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/robust-file-saving into lp:widelands
Continuous integration builds have changed state: Travis build 4191. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/452672883. Appveyor build 3987. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_robust_file_saving-3987. -- https://code.launchpad.net/~widelands-dev/widelands/robust-file-saving/+merge/358473 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/robust-file-saving into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles into lp:widelands
Review: Approve I have now fixed the nits myself, so that we can start reviewing your other branches @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/bug-1753230-working-with-tempfiles/+merge/357656 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1753230-working-with-tempfiles. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp