<commit_before>import kivy
kivy.require('1.9.1')

from kivy.config import Config
Config.set('graphics', 'width', '393')
Config.set('graphics', 'height', '700')

# from kivy.core.window import Window
# Window.clearcolor = (1, 1, 1, 1)

from kivy.app import App
from kivy.garden.androidtabs import AndroidTabsBase, AndroidTabs
from kivy.uix.actionbar import ActionBar
from kivy.uix.boxlayout import BoxLayout


class NostraRoot(BoxLayout):

    def show_main_screen(self):
        self.clear_widgets()
        self.add_widget(MainScreen())

    def show_add_transaction_screen(self):
        self.clear_widgets()
        self.add_widget(AddTransactionScreen())


class MainScreen(AndroidTabs):
    pass


class AddTransactionScreen(BoxLayout):
    pass


class Bar(ActionBar):
    pass


class DashboardTab(BoxLayout, AndroidTabsBase):

    def populate_listview(self):
        items = ["History number %i" % index for index in range(30)]
        self.listview.adapter.data = items


class HistoryTab(BoxLayout, AndroidTabsBase):
    pass


class NostraPlata(App):

    def on_start(self):
        self.root.main.dashboard.populate_listview()

if __name__ == "__main__":
    NostraPlata().run()<commit_msg>adding and removing add_transaction_screen correctly<commit_after>import kivy
kivy.require('1.9.1')

from kivy.config import Config
Config.set('graphics', 'width', '393')
Config.set('graphics', 'height', '700')

# from kivy.core.window import Window
# Window.clearcolor = (1, 1, 1, 1)

from kivy.app import App
from kivy.garden.androidtabs import AndroidTabsBase, AndroidTabs
from kivy.properties import ObjectProperty
from kivy.uix.actionbar import ActionBar
from kivy.uix.boxlayout import BoxLayout


class NostraRoot(BoxLayout):
    main_screen = ObjectProperty()
    add_transaction_screen = ObjectProperty()

    def show_main_screen(self):
        self.remove_widget(self.add_transaction_screen)
        self.add_widget(self.main_screen)

    def show_add_transaction_screen(self):
        self.remove_widget(self.main_screen)

        if not self.add_transaction_screen:
            self.add_transaction_screen = AddTransactionScreen()
        self.add_widget(self.add_transaction_screen)


class MainScreen(AndroidTabs):
    pass


class AddTransactionScreen(BoxLayout):
    pass


class Bar(ActionBar):
    pass


class DashboardTab(BoxLayout, AndroidTabsBase):

    def populate_listview(self):
        items = ["History number %i" % index for index in range(30)]
        self.listview.adapter.data = items


class HistoryTab(BoxLayout, AndroidTabsBase):
    pass


class NostraPlata(App):

    def on_start(self):
        self.root.main.dashboard.populate_listview()
        self.root.main_screen = self.root.main

if __name__ == "__main__":
    NostraPlata().run()
{'fraction_non_alphanumeric': 0.10143884892086331, 'fraction_numerical': 0.01079136690647482, 'mean_word_length': 4.130996309963099, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4339374', 'n_tokens_mistral': 922, 'n_tokens_neox': 882, 'n_words': 192}