Opened 7 years ago

Closed 7 years ago

#19855 closed defect (fixed)

"Möbius": always use moebius instead of mobius

Reported by: Jori Mäntysalo Owned by:
Priority: minor Milestone: sage-7.1
Component: misc Keywords:
Cc: Volker Braun, Karl-Dieter Crisman Merged in:
Authors: Jori Mäntysalo Reviewers: Frédéric Chapoton, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: e62a430 (Commits, GitHub, GitLab) Commit: e62a43052a1b4f690eadbea97d846f1bb147e2bd
Dependencies: #19879 Stopgaps:

Status badges

Description (last modified by Jori Mäntysalo)

"Möbius" can not be a part of identifier name. Some functions and classes are named as mobius_*, others as moebius_*. As an example there is moebius_algebra() in finite lattices, and mobius_function() in finite posets.

This patch unifies them to moebius.

Change History (48)

comment:1 Changed 7 years ago by Jeroen Demeyer

Description: modified (diff)

comment:2 Changed 7 years ago by Jori Mäntysalo

Authors: Jori Mäntysalo
Cc: Karl-Dieter Crisman added
Description: modified (diff)
Summary: Ascii version of "Möbius": mobius or moebius?"Möbius": always use moebius instead of mobius

comment:3 Changed 7 years ago by Jori Mäntysalo

Branch: u/jmantysalo/ascii_version_of__m_bius___mobius_or_moebius_

comment:4 Changed 7 years ago by Jori Mäntysalo

Commit: 40f48527a34c4d133ba6f1817b61bc7089bd1eda

Where did those conf.py came?

Otherwise this can be commented. I have not yet run tests, so not in needs_review anyways.


New commits:

40f4852Use moebius instead of mobius.

comment:5 Changed 7 years ago by git

Commit: 40f48527a34c4d133ba6f1817b61bc7089bd1eda4337da2d40d6773206e1b1a56ad53ab108a2a760

Branch pushed to git repo; I updated commit sha1. New commits:

4337da2Added charset definitions.

comment:6 Changed 7 years ago by John Palmieri

Those "conf.py" changes should not be there. Each of those files should be a symlink to ../conf_sub.py.

comment:7 in reply to:  6 Changed 7 years ago by Jori Mäntysalo

Replying to jhpalmieri:

Those "conf.py" changes should not be there. Each of those files should be a symlink to ../conf_sub.py.

Should there be any conf.py in source? I.e. can I remove all to get a working patch?

comment:8 Changed 7 years ago by John Palmieri

There should be actual files conf.py and conf_sub.py in doc/en/reference. Most (probably all) of the subdirectories should contain a symlink conf.py -> ../conf_sub.py.

comment:9 Changed 7 years ago by git

Commit: 4337da2d40d6773206e1b1a56ad53ab108a2a760bbcb3d1a66008c6a68338100bb1ec22ab6f75bc1

Branch pushed to git repo; I updated commit sha1. New commits:

bbcb3d1Minor correction.

comment:10 Changed 7 years ago by Jori Mäntysalo

There is src/sage/rings/arith.py with

    def __repr__(self):
        """
        Returns a description of this function.

        EXAMPLES::

            sage: q = Moebius()
            sage: q.__repr__()
            'The Möbius function'
        """
        return "The Möbius function"

and it says

Expected:
    The Möbius function
Got:
    'The M\xc3\xb6bius function'

I can see no difference to other functions. Charcode-line at the beginning of file is same etc. Any ideas?

comment:11 Changed 7 years ago by John Palmieri

Change the leading """ to u""" or to r"""?

comment:12 Changed 7 years ago by Jeroen Demeyer

Dependencies: #19879

Can you please base this on #19879 to avoid merge conflicts?

comment:13 in reply to:  12 Changed 7 years ago by Jori Mäntysalo

Replying to jdemeyer:

Can you please base this on #19879 to avoid merge conflicts?

Yes I can, but first I should make this to work...

comment:14 in reply to:  11 Changed 7 years ago by Jori Mäntysalo

Replying to jhpalmieri:

Change the leading """ to u""" or to r"""?

Already tried u""", now tested r""". No help from those.

comment:15 Changed 7 years ago by git

Commit: bbcb3d1a66008c6a68338100bb1ec22ab6f75bc1dfff47df80e9466c873fded1e07cd113117e109d

Branch pushed to git repo; I updated commit sha1. New commits:

dfff47dKind of a fix for ö in doctest.

comment:16 Changed 7 years ago by git

Commit: dfff47df80e9466c873fded1e07cd113117e109d9a2632b140991363457decfc759128ce6ded7157

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9a2632bAlways 'moebius' instead of 'mobius'.

comment:17 Changed 7 years ago by Jori Mäntysalo

Status: newneeds_review

OK, now this should be OK. There was an error at src/sage/algebras/catalog.py, so I did not change class name but corrected a broken link.

I changed every docstring so that right form, "Möbius", is used everywhere except in the code. Also _repr_ is changed.

comment:18 Changed 7 years ago by Jori Mäntysalo

Status: needs_reviewneeds_work

Forget. Still wrong arith.py...

comment:19 Changed 7 years ago by git

Commit: 9a2632b140991363457decfc759128ce6ded7157478f706cda1cca01cbb60e5f96eb486ef2d6a033

Branch pushed to git repo; I updated commit sha1. New commits:

478f706'moebius' instead of 'mobius'.

comment:20 Changed 7 years ago by Jori Mäntysalo

Status: needs_workneeds_review

Hopefully I got this right at last.

comment:21 Changed 7 years ago by Frédéric Chapoton

patchbot is not happy..

comment:22 in reply to:  21 Changed 7 years ago by Jori Mäntysalo

Replying to chapoton:

patchbot is not happy..

??? 7.1.beta1 -patchbot says that all tests passed.

comment:23 Changed 7 years ago by Frédéric Chapoton

but 2 plugins are failing, and you should take care of what they say

comment:24 Changed 7 years ago by git

Commit: 478f706cda1cca01cbb60e5f96eb486ef2d6a0330cf597cddb1a3d2027e73bd15bfbd1ef40165f1d

Branch pushed to git repo; I updated commit sha1. New commits:

0cf597cCharset and ...-continuation.

comment:25 in reply to:  23 Changed 7 years ago by Jori Mäntysalo

Replying to chapoton:

but 2 plugins are failing, and you should take care of what they say

Ah, OK. Now those should be corrected. Took a while to understand what's wrong with ...-continuation I didn't change.

comment:26 Changed 7 years ago by Frédéric Chapoton

yet one plugin is still red..

comment:27 Changed 7 years ago by git

Commit: 0cf597cddb1a3d2027e73bd15bfbd1ef40165f1d3fa8102c13417b58b82b91c1b257eb796cf17bb5

Branch pushed to git repo; I updated commit sha1. New commits:

3fa8102Another ...-continuation.

comment:28 Changed 7 years ago by Jori Mäntysalo

Arghs. Yet another try.

comment:29 Changed 7 years ago by Jori Mäntysalo

Hooray! Now it does not complain!

comment:30 Changed 7 years ago by Frédéric Chapoton

almost good to go.

This looks wrong in src/sage/repl/rich_output/backend_ipython.py:

+# -*- coding: utf-8 -*-
 # -*- encoding: utf-8 -*-

once corrected, you can set positive review

comment:31 Changed 7 years ago by git

Commit: 3fa8102c13417b58b82b91c1b257eb796cf17bb578da6269b65115766f240cee111622b8832976c0

Branch pushed to git repo; I updated commit sha1. New commits:

78da626Double 'encoding' line removed.

comment:32 in reply to:  30 ; Changed 7 years ago by Jori Mäntysalo

Replying to chapoton:

+# -*- coding: utf-8 -*-
 # -*- encoding: utf-8 -*-

Good catch. It seems that there is no difference between the two, but "coding" is used many times more than "encoding". Should I unify them on another patch, just to make automatic processing a little bit easier?

comment:33 in reply to:  30 Changed 7 years ago by Jori Mäntysalo

Status: needs_reviewpositive_review

Replying to chapoton:

  • - once corrected, you can set positive review

Done. (And tested.)

Thanks!

comment:34 in reply to:  32 ; Changed 7 years ago by Frédéric Chapoton

Replying to jmantysalo:

Good catch. It seems that there is no difference between the two, but "coding" is used many times more than "encoding". Should I unify them on another patch, just to make automatic processing a little bit easier?

NO ! Please try to open tickets only for important things.

comment:35 in reply to:  34 Changed 7 years ago by Jori Mäntysalo

Replying to chapoton:

NO ! Please try to open tickets only for important things.

Ok.

comment:36 Changed 7 years ago by Jori Mäntysalo

Milestone: sage-7.0sage-7.1

comment:37 Changed 7 years ago by Volker Braun

Status: positive_reviewneeds_work

reviewer name missing

comment:38 Changed 7 years ago by Travis Scrimshaw

We should also avoid unicode in strings (at least until we switch to Python3).

comment:39 in reply to:  38 ; Changed 7 years ago by Jori Mäntysalo

Replying to tscrim:

We should also avoid unicode in strings (at least until we switch to Python3).

Why?

(Maybe the answer should go to sage-devel instead of one ticket.)

comment:40 in reply to:  39 ; Changed 7 years ago by Travis Scrimshaw

Replying to jmantysalo:

Replying to tscrim:

We should also avoid unicode in strings (at least until we switch to Python3).

Why?

(Maybe the answer should go to sage-devel instead of one ticket.)

Python 2 strings are not unicode by default (which is changed in Python 3), so this can cause output problems (in particular, for those rare terminals that do not support unicode).

comment:41 in reply to:  40 ; Changed 7 years ago by Jori Mäntysalo

Replying to tscrim:

Replying to jmantysalo:

Replying to tscrim:

We should also avoid unicode in strings (at least until we switch to Python3).

Why?

(Maybe the answer should go to sage-devel instead of one ticket.)

Python 2 strings are not unicode by default (which is changed in Python 3), so this can cause output problems (in particular, for those rare terminals that do not support unicode).

?? But in sage-devel there has been discussion about this. I think that it was said that we can assume unicode support.

comment:42 in reply to:  41 ; Changed 7 years ago by Travis Scrimshaw

Replying to jmantysalo:

Replying to tscrim:

Replying to jmantysalo:

Replying to tscrim:

We should also avoid unicode in strings (at least until we switch to Python3).

Why?

(Maybe the answer should go to sage-devel instead of one ticket.)

Python 2 strings are not unicode by default (which is changed in Python 3), so this can cause output problems (in particular, for those rare terminals that do not support unicode).

?? But in sage-devel there has been discussion about this. I think that it was said that we can assume unicode support.

This is what I get:

sage: s = "ü"
sage: s
'\xc3\xbc'

Granted, this is fixed by doing print s, and we have the same behavior for s = u"ü". Yet most output does not occur with a print statement.

comment:43 Changed 7 years ago by git

Commit: 78da6269b65115766f240cee111622b8832976c02099e8a5c73acb571a1c676e6d873b00d5a65955

Branch pushed to git repo; I updated commit sha1. New commits:

2099e8aNo ö for string constants.

comment:44 in reply to:  42 Changed 7 years ago by Jori Mäntysalo

Replying to tscrim:

Granted, this is fixed by doing print s, and we have the same behavior for s = u"ü". Yet most output does not occur with a print statement.

OK. Corrected, now compiling and testing.

comment:45 Changed 7 years ago by git

Commit: 2099e8a5c73acb571a1c676e6d873b00d5a65955e62a43052a1b4f690eadbea97d846f1bb147e2bd

Branch pushed to git repo; I updated commit sha1. New commits:

e62a430Doctest corrections.

comment:46 Changed 7 years ago by Jori Mäntysalo

Status: needs_workneeds_review

Tests passed.

comment:47 Changed 7 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton, Travis Scrimshaw
Status: needs_reviewpositive_review

ok, let it go.

comment:48 Changed 7 years ago by Volker Braun

Branch: u/jmantysalo/ascii_version_of__m_bius___mobius_or_moebius_e62a43052a1b4f690eadbea97d846f1bb147e2bd
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.