8000 Rename default branch by tacaswell · Pull Request #21371 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Rename default branch #21371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2021
Merged

Conversation

tacaswell
Copy link
Member
@tacaswell tacaswell commented Oct 15, 2021

PR Summary

The changes needed to implement https://discourse.matplotlib.org/t/minor-re-writing-of-history-and-moving-from-master-to-main-for-default-branch/22354/10

We are not able to remove every instance of 'master' from the code base (see the details for what is left). There are:

  • a parameter named master_transform (this can not be changed without a deprecation cycle)
  • usages in agg (definitly should not touch Agg !)
  • branch names from other projects (do not want to break links)
  • old branch names in whats_new when quoting PR titles (try to keep some parts of history consistent)
  • in a user name (the name is what it is)
  • in code that uses the tk or osx APIs (pinned by external APIs)
  • in the tri code (do not want to touch c-code unnecessarily)
18:27:55 $ ack  'master[^_]'
LICENSE/LICENSE_SOLARIZED
1:https://github.com/altercation/solarized/blob/master/LICENSE

doc/devel/MEP/MEP10.rst
48:<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_:

doc/devel/MEP/MEP28.rst
230:The source code (GitHub master as of 2016-10-17) was inspected for

doc/devel/gitwash/git_links.inc
49:.. _deleting main on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html

doc/devel/gitwash/configure_git.rst
154:    *   d304a73 - (origin/placeholder, placeholder) Merge pull request #48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst]
160:    *   376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst]
166:    | *   956fbab - Merge remote-tracking branch 'upstream/master' (3 weeks ago) [Jonathan Terhorst]

doc/devel/README.txt
8:The script is hosted at https://raw.githubusercontent.com/matthew-brett/gitwash/master/gitwash_dumper.py.

doc/devel/documenting_mpl.rst
126:<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_ is
281:`intersphinx <http://www.sphinx-doc.org/en/master/ext/intersphinx.html>`_:
993:.. _inheritance-diagram: https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html
1010:.. _documentation: https://www.sphinx-doc.org/en/master/contents.html

doc/users/prev_whats_new/github_stats_3.0.0.rst
1078:* :ghpull:`10523`: The current master branch is now python 3 only.
1169:* :ghissue:`11426`: nbagg broken on master.  'Path' is not defined...

doc/users/prev_whats_new/github_stats_3.0.1.rst
198:* :ghissue:`12352`: TeX rendering broken on master with windows

doc/users/prev_whats_new/github_stats_3.0.2.rst
425:* :ghissue:`12352`: TeX rendering broken on master with windows

doc/users/prev_whats_new/github_stats_3.2.2.rst
160:* :ghissue:`17033`: Using a ``TextBox`` in current master produces a seemingly unrelated warning.

doc/users/credits.rst
1035:ugurthemaster,

doc/users/dflt_style_changes.rst
42:<https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#category10>`__

doc/resources/index.rst
13:  <https://www.packtpub.com/product/mastering-matplotlib/9781783987542>`_

doc/conf.py
214:# The master toctree document.

examples/misc/ftface_props.py
60:              'Multiple masters',

examples/user_interfaces/embedding_in_tk_sgskip.py
29:canvas = FigureCanvasTkAgg(fig, master=root)  # A tk.DrawingArea.
40:button_quit = tkinter.Button(master=root, text="Quit", command=root.quit)

examples/user_interfaces/web_application_server_sgskip.py
47:# `flask command-line tool <https://flask.palletsprojects.com/en/master/cli/>`_

lib/matplotlib/backends/_backend_tk.py
167:    def __init__(self, figure=None, master=None, resize_callback=None):
173:            master=master, background="white",
176:            master=self._tkcanvas, width=w, height=h)
239:            master=self._tkcanvas, width=int(width), height=int(height))
425:        window_dpi = tk.IntVar(master=window, value=96,
523:        # Avoid using self.window (prefer self.canvas.get_tk_widget().master),
527:        tk.Frame.__init__(self, master=window, borderwidth=2,
551:        label = tk.Label(master=self, font=self._label_font,
555:        self.message = tk.StringVar(master=self)
556:        self._message_label = tk.Label(master=self, font=self._label_font,
642:            image = ImageTk.PhotoImage(im.resize((size, size)), master=self)
648:            b = tk.Button(master=self, text=text, command=command)
655:            var = tk.IntVar(master=self)
657:                master=self, text=text, command=command,
671:        s = tk.Frame(master=self, height='18p', relief=tk.RIDGE, bg='DarkGray')
695:            master=self.canvas.get_tk_widget().master,
805:        tk.Frame.__init__(self, master=window,
809:        self._message = tk.StringVar(master=self)
810:        self._message_label = tk.Label(master=self, font=self._label_font,
834:            frame = tk.Frame(master=self, borderwidth=0)
887:        canvas = type(self.canvas)(toolfig, master=self.window)
905:        dialog.done = lambda num: dialog.frame.master.withdraw()
933:            icon_img = tk.PhotoImage(file=icon_fname, master=window)
940:            canvas = cls.FigureCanvas(figure, master=window)

lib/matplotlib/backends/qt_compat.py
40:# (https://github.com/enthought/pyface/blob/master/pyface/qt/__init__.py)

lib/matplotlib/sphinxext/mathmpl.py
8:    <https://www.sphinx-doc.org/en/master/usage/extensions/math.html>`__

lib/matplotlib/tests/tinypages/index.rst
1:.. tinypages documentation master file, created by

lib/matplotlib/tests/test_mlab.py
869:# https://github.com/scipy/scipy/blob/master/scipy/stats/tests/test_kdeoth.py

lib/matplotlib/tri/trirefine.py
227:        # edge_apexes); we then extract only the masters to avoid overlaps.
228:        # The so-called 'master' is the triangle with biggest index
231:        # For slave and master we will identify the apex pointing to the edge
236:        mask_masters = (edge_elems > edge_neighbors)
238:        # Identifying the "masters" and adding to refi_x, refi_y vec
239:        masters = edge_elems[mask_masters]
240:        apex_masters = edge_apexes[mask_masters]
241:        x_add = (x[triangles[masters, apex_masters]] +
242:                 x[triangles[masters, (apex_masters+1) % 3]]) * 0.5
243:        y_add = (y[triangles[masters, apex_masters]] +
244:                 y[triangles[masters, (apex_masters+1) % 3]]) * 0.5
256:        # If ielem is the apex master: simple count, given the way refi_x was
263:            mask_st_loc = (imid == apex_masters)
264:            n_masters_loc = np.sum(mask_st_loc)
265:            elem_masters_loc = masters[mask_st_loc]
266:            new_pt_midside[:, imid][elem_masters_loc] = np.arange(
267:                n_masters_loc, dtype=np.int32) + cum_sum
268:            cum_sum += n_masters_loc
271:        # for each slave element we identify the master and then the inode
272:        # once slave_masters is identified, slave_masters_apex is such that:
273:        # neighbors[slaves_masters, slave_masters_apex] == slaves
274:        mask_slaves = np.logical_not(mask_masters)
276:        slaves_masters = edge_neighbors[mask_slaves]
277:        diff_table = np.abs(neighbors[slaves_masters, :] -
279:        slave_masters_apex = np.argmin(diff_table, axis=1)
282:            slaves_masters, slave_masters_apex]

lib/matplotlib/backend_bases.py
330:        combinations, given a master transform, a list of paths and

lib/matplotlib/mlab.py
895:    # from scipy: https://github.com/scipy/scipy/blob/master/scipy/stats/kde.py

src/_macosx.m
227:- (ToolWindow*)initWithContentRect:(NSRect)rect master:(NSWindow*)window;
228:- (void)masterCloses:(NSNotification*)notification;
1006:    PyObject* master = PyObject_GetAttrString(toolbar, "canvas");
1007:    if (master==nil)
1017:        Py_DECREF(master);
1028:        Py_DECREF(master);
1038:        Py_DECREF(master);
1048:        Py_DECREF(master);
1053:    NSWindow* mw = [((FigureCanvas*)master)->view window];
1054:    Py_DECREF(master);
1061:                                                           master: mw];
1522:- (ToolWindow*)initWithContentRect:(NSRect)rect master:(NSWindow*)window
1533:                                             selector: @selector(masterCloses:)
1539:- (void)masterCloses:(NSNotification*)notification

src/_tkmini.h
62: * through Tck / Tk master as of 21 May 2016

.circleci/config.yml
73:            wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true

.github/workflows/reviewdog.yml
23:            https://github.com/reviewdog/reviewdog/raw/master/install.sh | \

extern/agg24-svn/include/agg_scanline_boolean_algebra.h
1162:        // Here "sg1" is master, "sg2" is slave.
1194:            // Synchronize "slave" with "master"
1219:            // Advance the "master"

tools/gh_api.py
64:      "note_url": "https://github.com/ipython/ipython/tree/master/tools",

@tacaswell tacaswell added this to the v3.6.0 milestone Oct 15, 2021
Comment on lines +16 to 17
In what follows we'll refer to the upstream Matplotlib ``main`` branch, as
"trunk".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not replace trunk with main, instead of this confusing extra name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I did not search for trunk and did this with sed and then rejecting changes I did not want.

@tacaswell
Copy link
Member Author

I just did cycler and it was very painless, if people go over there you can see what the GH UI will give you, which is annoyingly not going to work quite right for us as the first step is to rename their local master branch -> main :(

@tacaswell tacaswell force-pushed the rename_default_branch branch from 3d6f2f4 to 3fcb595 Compare October 20, 2021 20:10
@QuLogic QuLogic merged commit 0115b43 into matplotlib:main Oct 20, 2021
@tacaswell tacaswell deleted the rename_default_branch branch October 20, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0