Opened 6 years ago
Closed 6 years ago
#19675 closed enhancement (fixed)
Move normalize_names() out of CategoryObject
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.10 |
Component: | categories | Keywords: | |
Cc: | Merged in: | ||
Authors: | Jeroen Demeyer | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 280312f (Commits, GitHub, GitLab) | Commit: | 280312f0d57cb9c85d5333970f4261939f634d7b |
Dependencies: | Stopgaps: |
Description (last modified by )
It makes no sense that normalize_names
appears in the TAB-completion of all CategoryObject
s. It also makes little sense that it's a method of CategoryObject
.
- Move
normalize_names
and_certify_names
out ofCategoryObject
and make them non-method functions.
- Remove the redundant
parent_gens.normalize_names
,parent_gens._certify_names
,parent.normalize_names
andsage.schemes.toric.variety.certify_names
.
- Always interpret
ngens=-1
as "unknown number of generators" andngens=0
as "no generators". The previous implementation did this inconsistently.
- Add doctests.
Note that many more classes should probably use normalize_names
. I didn't fix this here. Example from src/sage/algebras/jordan_algebra.py
:
if names is not None: if isinstance(names, str): names = names.split(',') names = tuple(names)
Change History (10)
comment:1 Changed 6 years ago by
- Description modified (diff)
- Summary changed from make CategoryObject.normalize_names private to move normalize_names() out of CategoryObject
comment:2 Changed 6 years ago by
- Description modified (diff)
- Summary changed from move normalize_names() out of CategoryObject to Move normalize_names() out of CategoryObject
comment:3 Changed 6 years ago by
- Description modified (diff)
comment:4 Changed 6 years ago by
comment:5 Changed 6 years ago by
- Branch set to u/jdemeyer/make_categoryobject_normalize_names_private
comment:6 Changed 6 years ago by
- Commit set to 280312f0d57cb9c85d5333970f4261939f634d7b
- Status changed from new to needs_review
New commits:
280312f | Move normalize_names to function in category_object.pyx
|
comment:7 Changed 6 years ago by
- Description modified (diff)
comment:8 Changed 6 years ago by
- Description modified (diff)
comment:9 Changed 6 years ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
LGTM.
comment:10 Changed 6 years ago by
- Branch changed from u/jdemeyer/make_categoryobject_normalize_names_private to 280312f0d57cb9c85d5333970f4261939f634d7b
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Big +1.