Opened 6 years ago

Closed 6 years ago

#19855 closed defect (fixed)

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

Reported by: jmantysalo Owned by:
Priority: minor Milestone: sage-7.1
Component: misc Keywords:
Cc: vbraun, kcrisman 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 jmantysalo)

"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 6 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 6 years ago by jmantysalo

  • Authors set to Jori Mäntysalo
  • Cc kcrisman added
  • Description modified (diff)
  • Summary changed from Ascii version of "Möbius": mobius or moebius? to "Möbius": always use moebius instead of mobius

comment:3 Changed 6 years ago by jmantysalo

  • Branch set to u/jmantysalo/ascii_version_of__m_bius___mobius_or_moebius_

comment:4 Changed 6 years ago by jmantysalo

  • Commit set to 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 6 years ago by git

  • Commit changed from 40f48527a34c4d133ba6f1817b61bc7089bd1eda to 4337da2d40d6773206e1b1a56ad53ab108a2a760

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

4337da2Added charset definitions.

comment:6 follow-up: Changed 6 years ago by jhpalmieri

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 6 years ago by jmantysalo

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 6 years ago by jhpalmieri

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 6 years ago by git

  • Commit changed from 4337da2d40d6773206e1b1a56ad53ab108a2a760 to bbcb3d1a66008c6a68338100bb1ec22ab6f75bc1

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

bbcb3d1Minor correction.

comment:10 Changed 6 years ago by jmantysalo

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 follow-up: Changed 6 years ago by jhpalmieri

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

comment:12 follow-up: Changed 6 years ago by jdemeyer

  • Dependencies set to #19879

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

comment:13 in reply to: ↑ 12 Changed 6 years ago by jmantysalo

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 6 years ago by jmantysalo

Replying to jhpalmieri:

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

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

comment:15 Changed 6 years ago by git

  • Commit changed from bbcb3d1a66008c6a68338100bb1ec22ab6f75bc1 to dfff47df80e9466c873fded1e07cd113117e109d

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

dfff47dKind of a fix for ö in doctest.

comment:16 Changed 6 years ago by git

  • Commit changed from dfff47df80e9466c873fded1e07cd113117e109d to 9a2632b140991363457decfc759128ce6ded7157

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

9a2632bAlways 'moebius' instead of 'mobius'.

comment:17 Changed 6 years ago by jmantysalo

  • Status changed from new to needs_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 6 years ago by jmantysalo

  • Status changed from needs_review to needs_work

Forget. Still wrong arith.py...

comment:19 Changed 6 years ago by git

  • Commit changed from 9a2632b140991363457decfc759128ce6ded7157 to 478f706cda1cca01cbb60e5f96eb486ef2d6a033

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

478f706'moebius' instead of 'mobius'.

comment:20 Changed 6 years ago by jmantysalo

  • Status changed from needs_work to needs_review

Hopefully I got this right at last.

comment:21 follow-up: Changed 6 years ago by chapoton

patchbot is not happy..

comment:22 in reply to: ↑ 21 Changed 6 years ago by jmantysalo

Replying to chapoton:

patchbot is not happy..

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

comment:23 follow-up: Changed 6 years ago by chapoton

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

comment:24 Changed 6 years ago by git

  • Commit changed from 478f706cda1cca01cbb60e5f96eb486ef2d6a033 to 0cf597cddb1a3d2027e73bd15bfbd1ef40165f1d

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

0cf597cCharset and ...-continuation.

comment:25 in reply to: ↑ 23 Changed 6 years ago by jmantysalo

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 6 years ago by chapoton

yet one plugin is still red..

comment:27 Changed 6 years ago by git

  • Commit changed from 0cf597cddb1a3d2027e73bd15bfbd1ef40165f1d to 3fa8102c13417b58b82b91c1b257eb796cf17bb5

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

3fa8102Another ...-continuation.

comment:28 Changed 6 years ago by jmantysalo

Arghs. Yet another try.

comment:29 Changed 6 years ago by jmantysalo

Hooray! Now it does not complain!

comment:30 follow-ups: Changed 6 years ago by 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 6 years ago by git

  • Commit changed from 3fa8102c13417b58b82b91c1b257eb796cf17bb5 to 78da6269b65115766f240cee111622b8832976c0

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

78da626Double 'encoding' line removed.

comment:32 in reply to: ↑ 30 ; follow-up: Changed 6 years ago by jmantysalo

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 6 years ago by jmantysalo

  • Status changed from needs_review to positive_review

Replying to chapoton:

  • - once corrected, you can set positive review

Done. (And tested.)

Thanks!

comment:34 in reply to: ↑ 32 ; follow-up: Changed 6 years ago by 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 6 years ago by jmantysalo

Replying to chapoton:

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

Ok.

comment:36 Changed 6 years ago by jmantysalo

  • Milestone changed from sage-7.0 to sage-7.1

comment:37 Changed 6 years ago by vbraun

  • Status changed from positive_review to needs_work

reviewer name missing

comment:38 follow-up: Changed 6 years ago by tscrim

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

comment:39 in reply to: ↑ 38 ; follow-up: Changed 6 years ago by 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.)

comment:40 in reply to: ↑ 39 ; follow-up: Changed 6 years ago by 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).

comment:41 in reply to: ↑ 40 ; follow-up: Changed 6 years ago by 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.

comment:42 in reply to: ↑ 41 ; follow-up: Changed 6 years ago by tscrim

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 6 years ago by git

  • Commit changed from 78da6269b65115766f240cee111622b8832976c0 to 2099e8a5c73acb571a1c676e6d873b00d5a65955

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

2099e8aNo ö for string constants.

comment:44 in reply to: ↑ 42 Changed 6 years ago by jmantysalo

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 6 years ago by git

  • Commit changed from 2099e8a5c73acb571a1c676e6d873b00d5a65955 to e62a43052a1b4f690eadbea97d846f1bb147e2bd

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

e62a430Doctest corrections.

comment:46 Changed 6 years ago by jmantysalo

  • Status changed from needs_work to needs_review

Tests passed.

comment:47 Changed 6 years ago by chapoton

  • Reviewers set to Frédéric Chapoton, Travis Scrimshaw
  • Status changed from needs_review to positive_review

ok, let it go.

comment:48 Changed 6 years ago by vbraun

  • Branch changed from u/jmantysalo/ascii_version_of__m_bius___mobius_or_moebius_ to e62a43052a1b4f690eadbea97d846f1bb147e2bd
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.