Problems with merging git changes in notebooks

Offen
#140 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
20/100
Issue-Typ
Dokumentation
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
git, jupyter-notebook, vscode
Bereich
documentation

Rechercherichtung

The issue names no files, tests or entry points; it describes a git merge problem with notebook indentation and a suggested tutorial change. Start by reading the repository's notebook tutorial files and any existing guidance on git workflow, then agree with the maintainers on what the tutorial should say. Done means a decided approach, such as guidance or a helper note, that the maintainers accept.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement question

This is really a thing to think about for next time we do a Tutorial. But, putting it here, as we had some frictiion with this,. Although really it was much smaller than it should have been. This is also a known problem for Jupyter notebooks in github, and there are various groups with solutions out there.

Conflicts have to be resolved in a text editor and not VS Code

VS Code already led me to do that, and found it largely OK for simple conflicts. It was annoying when the next problem shows up, which is changes in indentation.

White-space Indentation

The main problem we saw was that different editors saved the raw notebooks with different indentation. Most are 1-space, but a few saved as 4-space indentation. Changes become difficult to merge when the indentation is different. It'll essentially mark as the complete block of things with indentation changes as needed to be merged by hand.

I've solved it by saving each section of the difference, and then do diffs without whitespace differences between each, and then apply the usually small change that's needed.

Vorherrschende Sprache
Jupyter Notebook
Sterne
4
Forks
11
Ø Merge
6 Std. 57 Min.
Gemergte PRs (30 T.)
62

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NCAR/CLM-Tutorial

Alle Issues in NCAR/CLM-Tutorial

Ähnliche Issues

Weitere Issues zu Documentation

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.