Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/common/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def _wrapper(self, format, *args, **kwds):
# the other documents.
getattr(DocBuilder(self.name, lang), format)(*args, **kwds)

# PDF: we need to build master index file which lists all
# PDF: we need to build main index file which lists all
# of the PDF file. So we create an html file, based on
# the file index.html from the "website" target.
if format == 'pdf':
Expand Down
8 changes: 4 additions & 4 deletions src/doc/common/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def get_doc_abspath(path):
# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'
# The main toctree document.
main_doc = 'index'

# General information about the project.
project = u""
Expand Down Expand Up @@ -143,8 +143,8 @@ def add(subdoc=''):
'mathscinet': ('http://www.ams.org/mathscinet-getitem?mr=%s', 'MathSciNet ')
}

# By default document are not master.
multidocs_is_master = True
# By default document are not main.
multidocs_is_main = True

# Options for HTML output
# -----------------------
Expand Down
18 changes: 9 additions & 9 deletions src/doc/common/multidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The goal of this extension is to manage a multi documentation in Sphinx.
To be able to compile Sage's huge documentation in parallel, the
documentation is cut into a bunch of independent documentations called
"subdocs", which are compiled separately. There is a master document which
"subdocs", which are compiled separately. There is a main document which
points to all the subdocs. The intersphinx extension ensures that the
cross-link between the subdocs are correctly resolved. However some work
is needed to build a global index. This is the goal of multidocs.
Expand Down Expand Up @@ -237,15 +237,15 @@ def fetch_citation(app, env):

def init_subdoc(app):
"""
Init the merger depending on if we are compiling a subdoc or the master
Init the merger depending on if we are compiling a subdoc or the main
doc itself.
"""
if app.config.multidocs_is_master:
app.info(bold("Compiling the master document"))
if app.config.multidocs_is_main:
app.info(bold("Compiling the main document"))
app.connect('env-updated', merge_environment)
app.connect('html-collect-pages', merge_js_index)
if app.config.multidocs_subdoc_list:
# Master file with indexes computed by merging indexes:
# Main file with indexes computed by merging indexes:
# Monkey patch index fetching to silence warning about broken index
def load_indexer(docnames):
app.builder.info(bold('Skipping loading of indexes'), nonl=1)
Expand All @@ -259,7 +259,7 @@ def load_indexer(docnames):
# Monkey patch copy_static_files to make a symlink to "../"
def link_static_files():
"""
Instead of copying static files, make a link to the master static file.
Instead of copying static files, make a link to the main static file.
See sphinx/builder/html.py line 536::

class StandaloneHTMLBuilder(Builder):
Expand All @@ -269,13 +269,13 @@ def copy_static_files(self):
"""
app.builder.info(bold('linking _static directory.'))
static_dir = os.path.join(app.builder.outdir, '_static')
master_static_dir = os.path.join('..', '_static')
main_static_dir = os.path.join('..', '_static')
if os.path.exists(static_dir):
if os.path.isdir(static_dir) and not os.path.islink(static_dir):
shutil.rmtree(static_dir)
else:
os.unlink(static_dir)
os.symlink(master_static_dir, static_dir)
os.symlink(main_static_dir, static_dir)

app.builder.copy_static_files = link_static_files

Expand All @@ -284,7 +284,7 @@ def copy_static_files(self):


def setup(app):
app.add_config_value('multidocs_is_master', True, True)
app.add_config_value('multidocs_is_main', True, True)
app.add_config_value('multidocs_subdoc_list', [], True)
app.add_config_value('multidoc_first_pass', 0, False) # 1 = deactivate the loading of the inventory
app.connect('builder-inited', init_subdoc)
2 changes: 1 addition & 1 deletion src/doc/en/reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#Ignore all .rst in the _sage subdirectory
exclude_trees = exclude_trees + ['_sage']

multidocs_is_master = True
multidocs_is_main = True

# Sorted list of subdocs. Include all subdirectories of ref_src except
# for 'static' and 'templates', and to deal with upgrades: 'sage',
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/reference/quivers/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
#Ignore all .rst in the _sage subdirectory
exclude_trees = exclude_trees + ['_sage']

multidocs_is_master = False
multidocs_is_main = False
2 changes: 1 addition & 1 deletion src/doc/en/reference/riemannian_geometry/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
#Ignore all .rst in the _sage subdirectory
exclude_trees = exclude_trees + ['_sage']

multidocs_is_master = False
multidocs_is_main = False
2 changes: 1 addition & 1 deletion src/sage/categories/category_with_axiom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ class ``Sets.Finite``), or in a separate file (typically in a class
does not use :meth:`Category._with_axiom` to add axioms, but its
sister :meth:`Category._with_axiom_as_tuple`; the latter builds a
tuple of categories that should be joined together but leaves the
computation of the join to its caller, the master join calculation.
computation of the join to its caller, the main join calculation.

Adding an axiom ``A`` to a category ``Cs()`` implementing it
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sidon_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def sidon_sets(N, g = 1):
return sidon_sets_rec(N, g = g)


# This recursive and cached slave function is mainly here because
# This recursive and cached subordinate function is mainly here because
# caching the user entry function 'sidon_sets' prevents it from
# appearing in the built documentation.
@cached_function
Expand Down
2 changes: 1 addition & 1 deletion src/sage/databases/sql_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def construct_skeleton(database):
"""
skeleton = {}
cur = database.__connection__.cursor()
exe = cur.execute("SELECT name FROM sqlite_master WHERE TYPE='table'")
exe = cur.execute("SELECT name FROM sqlite_main WHERE TYPE='table'")
from sage.misc.misc import SAGE_SHARE
for table in exe.fetchall():
skeleton[table[0]] = {}
Expand Down
46 changes: 23 additions & 23 deletions src/sage/dev/git_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _run_git(self, cmd, args, git_kwds, popen_kwds=dict()):

sage: git._run_git('status', (), {})
(0,
'# On branch master\n#\n# Initial commit\n#\nnothing to commit
'# On branch main\n#\n# Initial commit\n#\nnothing to commit
(create/copy files and use "git add" to track)\n',
'',
'git -c user.email=doc@test.test -c user.name=doctest status')
Expand Down Expand Up @@ -204,7 +204,7 @@ def _execute(self, cmd, *args, **kwds):
sage: os.chdir(config['git']['src'])

sage: git._execute('status')
# On branch master
# On branch main
#
# Initial commit
#
Expand Down Expand Up @@ -317,7 +317,7 @@ def _read_output(self, cmd, *args, **kwds):
sage: os.chdir(config['git']['src'])

sage: git._read_output('status')
'# On branch master\n#\n# Initial commit\n#\nnothing to
'# On branch main\n#\n# Initial commit\n#\nnothing to
commit (create/copy files and use "git add" to track)\n'
sage: git._read_output('status',foo=True) # --foo is not a valid parameter
Traceback (most recent call last):
Expand Down Expand Up @@ -523,7 +523,7 @@ def get_state(self):
sage: git.super_silent.checkout("-b","branch1")
sage: with open("file","w") as f: f.write("version 1")
sage: git.silent.commit("-am","second commit")
sage: git.super_silent.checkout("master")
sage: git.super_silent.checkout("main")
sage: git.super_silent.checkout("-b","branch2")
sage: with open("file","w") as f: f.write("version 2")
sage: git.silent.commit("-am","conflicting commit")
Expand Down Expand Up @@ -613,7 +613,7 @@ def reset_to_clean_state(self):
sage: git.super_silent.checkout("-b","branch1")
sage: with open("file","w") as f: f.write("version 1")
sage: git.silent.commit("-am","second commit")
sage: git.super_silent.checkout("master")
sage: git.super_silent.checkout("main")
sage: git.super_silent.checkout("-b","branch2")
sage: with open("file","w") as f: f.write("version 2")
sage: git.silent.commit("-am","conflicting commit")
Expand Down Expand Up @@ -701,7 +701,7 @@ def clean_wrapper(self, remove_untracked_files=False,
sage: open('ignored_dir/untracked','w').close()
sage: with open('tracked','w') as f: f.write('version 0')
sage: git.echo.status()
# On branch master
# On branch main
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
Expand Down Expand Up @@ -732,7 +732,7 @@ def clean_wrapper(self, remove_untracked_files=False,

sage: git.clean_wrapper()
sage: git.echo.status()
# On branch master
# On branch main
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
Expand Down Expand Up @@ -792,18 +792,18 @@ def is_child_of(self, a, b):
sage: git.super_silent.checkout("-b","branch1")
sage: with open("file","w") as f: f.write("version 1")
sage: git.silent.commit("-am","second commit")
sage: git.super_silent.checkout("master")
sage: git.super_silent.checkout("main")
sage: git.super_silent.checkout("-b","branch2")
sage: with open("file","w") as f: f.write("version 2")
sage: git.silent.commit("-am","conflicting commit")

sage: git.is_child_of('master', 'branch2')
sage: git.is_child_of('main', 'branch2')
False
sage: git.is_child_of('branch2', 'master')
sage: git.is_child_of('branch2', 'main')
True
sage: git.is_child_of('branch1', 'branch2')
False
sage: git.is_child_of('master', 'master')
sage: git.is_child_of('main', 'main')
True
"""
return self.is_ancestor_of(b, a)
Expand Down Expand Up @@ -832,18 +832,18 @@ def is_ancestor_of(self, a, b):
sage: git.super_silent.checkout("-b","branch1")
sage: with open("file","w") as f: f.write("version 1")
sage: git.silent.commit("-am","second commit")
sage: git.super_silent.checkout("master")
sage: git.super_silent.checkout("main")
sage: git.super_silent.checkout("-b","branch2")
sage: with open("file","w") as f: f.write("version 2")
sage: git.silent.commit("-am","conflicting commit")

sage: git.is_ancestor_of('master', 'branch2')
sage: git.is_ancestor_of('main', 'branch2')
True
sage: git.is_ancestor_of('branch2', 'master')
sage: git.is_ancestor_of('branch2', 'main')
False
sage: git.is_ancestor_of('branch1', 'branch2')
False
sage: git.is_ancestor_of('master', 'master')
sage: git.is_ancestor_of('main', 'main')
True
"""
return self.merge_base(a, b) == self.rev_parse(a)
Expand Down Expand Up @@ -957,7 +957,7 @@ def local_branches(self):
sage: git.super_silent.checkout('-b', 'branch')
sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:20")
sage: git.silent.commit('-m','second commit','--allow-empty', env=env)
sage: git.super_silent.checkout('-b', 'other', 'master')
sage: git.super_silent.checkout('-b', 'other', 'main')
sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:30")
sage: git.silent.commit('-m','third commit','--allow-empty', env=env)

Expand All @@ -973,16 +973,16 @@ def local_branches(self):
sage: git2.super_silent.checkout("branch")
sage: git2.echo.branch("-a")
* branch
master
main
remotes/git/branch
remotes/git/master
remotes/git/main
remotes/git/other

sage: git2.local_branches()
['master', 'branch']
['main', 'branch']
sage: os.chdir(config['git']['src'])
sage: git.local_branches()
['other', 'branch', 'master']
['other', 'branch', 'main']
"""
result = self.for_each_ref('refs/heads/', sort='-committerdate', format="%(refname)")
return [head[11:] for head in result.splitlines()]
Expand Down Expand Up @@ -1011,14 +1011,14 @@ def current_branch(self):
sage: git.silent.branch('branch2')

sage: git.current_branch()
'master'
'main'
sage: git.super_silent.checkout('branch1')
sage: git.current_branch()
'branch1'

If ``HEAD`` is detached::

sage: git.super_silent.checkout('master~')
sage: git.super_silent.checkout('main~')
sage: git.current_branch()
Traceback (most recent call last):
...
Expand Down Expand Up @@ -1188,7 +1188,7 @@ def create_wrapper(git_cmd__):
sage: git = GitInterface(config["git"], DoctestUserInterface(config["UI"]))
sage: os.chdir(config['git']['src'])
sage: git.echo.status() # indirect doctest
# On branch master
# On branch main
#
# Initial commit
#
Expand Down
Loading