Git Product home page Git Product logo

dyno-viewer's People

Contributors

dependabot[bot] avatar mrllama123 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dyno-viewer's Issues

setup ci

  • setup unit test workflow
  • enable flatpak support for linux packaging
  • add workflow to build app for linux and mac on new release created

better error handling

right now whenever there is an error it crashes and as a end user you can't see the logs (i really hope in future they fix this) so it would be good to add some helpful messages in the app for errors like:

  • iam permission errors
  • creds and auth errors
  • dynamodb errors (like ResourceNotFoundException, invalid query etc )

doco refinement

before releasing it to the wild, Want to refine and add some more docs.
Some doc changes i can think off the top of my head are:

  • update readme as things have changed and needs to more clear
  • add doc about testing as the docs are lacking in that part
  • (maybe ?) add doc about how the code is structured

simplify and fix the ui styling

right now the ui styling and css is very hacky and all over the place as i didn't know what i was doing when i originally wrote it. Also it doesn't display the table data very well for one row items

dyn table refactor

the current way we display data from tables is hacky and over complicated

make the ui of table selection nicer

currently is a list selection, Which is not great ui. Would be better to have a search bar results from search that you can select i.e something like this:

Image

change project structure

the different ui components are in one file this needs to be split out into separate files and folders for code readability. Might also change repo name to be a bit more clearer on what it is

region swapping doesn't work fully

dyn-cli-bug.webm

for some regions it will throw an exception when you switch to it once you have loaded up a table for the first time

add a help menu

add a help menu. Which shows things like keyboard shortcuts etc

dyn data table unit tests not displaying data properly

e.g for test_pk_sk_gsi_data test case 1 snapshot rows are:

[
  [
    "customer#12345",
    "CUSTOMER",
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null
  ],
  [
    "customer#12345",
    "CUSTOMER",
    "account#123",
    "ACCOUNT",
    "account#123",
    "ACCOUNT",
    "account2#123",
    "ACCOUNT2",
    "account3#123",
    "ACCOUNT3"
  ]
]

which it should be:

[
  [
    "customer#12345",
    "CUSTOMER",
    null,
    null,
    null,
    null,
    null,
    null,
  ],
  [
    "customer#12345",
    "CUSTOMER",
    "account#123",
    "ACCOUNT",
    "account2#123",
    "ACCOUNT2",
    "account3#123",
    "ACCOUNT3"
  ]
]

with this fix i will also remove snapshot support as it hid this issue way to easily and is easy enough to just use standard assert. I did some of this in here: #50 will move that into a separate branch and make that pr just support concurrency

also snapshots are not supported for running tests concurrently which is needed to make sure the tests are fast and don't chew into github action minutes

get table menu crashes sporadically

stack trace:

        ╭──────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────╮
│ /home/bob/dev/dyna-cli/dyna_cli/components/screens/table_select.py:76 in on_input_changed                                                                 │
│                                                                                                                                                           │
│   73 │   │   list_view = self.query_one(ListView)                                                                                                         │
│   74 │   │   list_view.clear()                                                                                                                            │
│   75 │   │   for matched_table in match_tables:                                                                                                           │
│ ❱ 76 │   │   │   list_view.append(ListItem(Label(matched_table), id=matched_table))                                                                       │
│   77 │                                                                                                                                                    │
│   78 │   def on_input_submitted(self, submitted: Input.Submitted) -> None:                                                                                │
│   79 │   │   if submitted.value in self.tables:                                                                                                           │
│                                                                                                                                                           │
│ ╭─────────────────────────────────── locals ────────────────────────────────────╮                                                                         │
│ │       changed = Changed()                                                     │                                                                         │
│ │     list_view = ListView(pseudo_classes={'enabled'})                          │                                                                         │
│ │  match_tables = ['test-table', 'test-table']                                  │                                                                         │
│ │ matched_table = 'test-table'                                                  │                                                                         │
│ │          self = TableSelectScreen(pseudo_classes={'enabled', 'focus-within'}) │                                                                         │
│ ╰───────────────────────────────────────────────────────────────────────────────╯                                                                         │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_list_view.py:185 in append                   │
│                                                                                                                                                           │
│   182 │   │   │   An awaitable that yields control to the event loop                                                                                      │
│   183 │   │   │   │   until the DOM has been updated with the new child item.                                                                             │
│   184 │   │   """                                                                                                                                         │
│ ❱ 185 │   │   await_mount = self.mount(item)                                                                                                              │
│   186 │   │   if len(self) == 1:                                                                                                                          │
│   187 │   │   │   self.index = 0                                                                                                                          │
│   188 │   │   return await_mount                                                                                                                          │
│                                                                                                                                                           │
│ ╭─────────────────────────── locals ───────────────────────────╮                                                                                          │
│ │ item = ListItem(id='test-table', pseudo_classes={'enabled'}) │                                                                                          │
│ │ self = ListView(pseudo_classes={'enabled'})                  │                                                                                          │
│ ╰──────────────────────────────────────────────────────────────╯                                                                                          │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widget.py:749 in mount                                │
│                                                                                                                                                           │
│    746 │   │   else:                                                                                                                                      │
│    747 │   │   │   parent = self                                                                                                                          │
│    748 │   │                                                                                                                                              │
│ ❱  749 │   │   mounted = self.app._register(                                                                                                              │
│    750 │   │   │   parent, *widgets, before=insert_before, after=insert_after                                                                             │
│    751 │   │   )                                                                                                                                          │
│    752                                                                                                                                                    │
│                                                                                                                                                           │
│ ╭──────────────────────────────────── locals ─────────────────────────────────────╮                                                                       │
│ │                after = None                                                     │                                                                       │
│ │               before = None                                                     │                                                                       │
│ │         ids_to_mount = ['test-table']                                           │                                                                       │
│ │         insert_after = None                                                     │                                                                       │
│ │        insert_before = None                                                     │                                                                       │
│ │       num_unique_ids = 1                                                        │                                                                       │
│ │ num_widgets_with_ids = 1                                                        │                                                                       │
│ │               parent = ListView(pseudo_classes={'enabled'})                     │                                                                       │
│ │                 self = ListView(pseudo_classes={'enabled'})                     │                                                                       │
│ │           unique_ids = {'test-table'}                                           │                                                                       │
│ │              widgets = (ListItem(id='test-table', pseudo_classes={'enabled'}),) │                                                                       │
│ ╰─────────────────────────────────────────────────────────────────────────────────╯                                                                       │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/app.py:1880 in _register                              │
│                                                                                                                                                           │
│   1877 │   │   │   if not isinstance(widget, Widget):                                                                                                     │
│   1878 │   │   │   │   raise AppError(f"Can't register {widget!r}; expected a Widget instance")                                                           │
│   1879 │   │   │   if widget not in self._registry:                                                                                                       │
│ ❱ 1880 │   │   │   │   self._register_child(parent, widget, before, after)                                                                                │
│   1881 │   │   │   │   if widget._nodes:                                                                                                                  │
│   1882 │   │   │   │   │   self._register(widget, *widget._nodes)                                                                                         │
│   1883 │   │   │   │   apply_stylesheet(widget)                                                                                                           │
│                                                                                                                                                           │
│ ╭─────────────────────────────────────────────────────────────────────── locals ────────────────────────────────────────────────────────────────────────╮ │
│ │            after = None                                                                                                                               │ │
│ │ apply_stylesheet = <bound method Stylesheet.apply of <Stylesheet ['/home/bob/dev/dyna-cli/dyna_cli/components/css/query.css',                         │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/app.py:App',                  │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/screen.py:Screen',            │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widget.py:Widget',            │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_data_table.py:DataT… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/scroll_view.py:ScrollView',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/containers.py:ScrollableCont… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_footer.py:Footer',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/containers.py:VerticalScroll… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_list_item.py:ListIt… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_label.py:Label',     │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_static.py:Static',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/containers.py:Container',     │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_button.py:Button',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/containers.py:Horizontal',    │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_switch.py:Switch',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_option_list.py:Opti… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_input.py:Input',     │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_select.py:Select',   │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/containers.py:Vertical',      │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_select.py:SelectCur… │ │
│ │                    '/home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/widgets/_select.py:SelectOve… │ │
│ │           before = None                                                                                                                               │ │
│ │           parent = ListView(pseudo_classes={'enabled'})                                                                                               │ │
│ │             self = DynCli(title='DynCli', classes={'-dark-mode'})                                                                                     │ │
│ │           widget = ListItem(id='test-table', pseudo_classes={'enabled'})                                                                              │ │
│ │      widget_list = (ListItem(id='test-table', pseudo_classes={'enabled'}),)                                                                           │ │
│ │          widgets = (ListItem(id='test-table', pseudo_classes={'enabled'}),)                                                                           │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/app.py:1835 in _register_child                        │
│                                                                                                                                                           │
│   1832 │   │   │   │   # At this point we appear to not be adding before or after,                                                                        │
│   1833 │   │   │   │   # or we've got a before/after value that really means                                                                              │
│   1834 │   │   │   │   # "please append". So...                                                                                                           │
│ ❱ 1835 │   │   │   │   parent._nodes._append(child)                                                                                                       │
│   1836 │   │   │                                                                                                                                          │
│   1837 │   │   │   # Now that the widget is in the NodeList of its parent, sort out                                                                       │
│   1838 │   │   │   # the rest of the admin.                                                                                                               │
│                                                                                                                                                           │
│ ╭──────────────────────────── locals ────────────────────────────╮                                                                                        │
│ │  after = None                                                  │                                                                                        │
│ │ before = None                                                  │                                                                                        │
│ │  child = ListItem(id='test-table', pseudo_classes={'enabled'}) │                                                                                        │
│ │ parent = ListView(pseudo_classes={'enabled'})                  │                                                                                        │
│ │   self = DynCli(title='DynCli', classes={'-dark-mode'})        │                                                                                        │
│ ╰────────────────────────────────────────────────────────────────╯                                                                                        │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/_node_list.py:81 in _append                           │
│                                                                                                                                                           │
│    78 │   │   │   self._nodes_set.add(widget)                                                                                                             │
│    79 │   │   │   widget_id = widget.id                                                                                                                   │
│    80 │   │   │   if widget_id is not None:                                                                                                               │
│ ❱  81 │   │   │   │   self._ensure_unique_id(widget_id)                                                                                                   │
│    82 │   │   │   │   self._nodes_by_id[widget_id] = widget                                                                                               │
│    83 │   │   │   self._updates += 1                                                                                                                      │
│    84                                                                                                                                                     │
│                                                                                                                                                           │
│ ╭────────────────────────────────────────────── locals ───────────────────────────────────────────────╮                                                   │
│ │      self = <NodeList                                                                               │                                                   │
│ │             │   [                                                                                   │                                                   │
│ │             │   │   ListItem(                                                                       │                                                   │
│ │             │   │   │   id='test-table',                                                            │                                                   │
│ │             │   │   │   classes={'--highlight'},                                                    │                                                   │
│ │             │   │   │   pseudo_classes={'enabled'}                                                  │                                                   │
│ │             │   │   ),                                                                              │                                                   │
│ │             │   │   ListItem(id='test-table', pseudo_classes={'enabled'})                           │                                                   │
│ │             │   ]                                                                                   │                                                   │
│ │             >                                                                                       │                                                   │
│ │    widget = ListItem(id='test-table', pseudo_classes={'enabled'})                                   │                                                   │
│ │ widget_id = 'test-table'                                                                            │                                                   │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                   │
│                                                                                                                                                           │
│ /home/bob/.cache/pypoetry/virtualenvs/dyna-cli-iGbQMlYs-py3.10/lib/python3.10/site-packages/textual/_node_list.py:102 in _ensure_unique_id                │
│                                                                                                                                                           │
│    99 │                                                                                                                                                   │
│   100 │   def _ensure_unique_id(self, widget_id: str) -> None:                                                                                            │
│   101 │   │   if widget_id in self._nodes_by_id:                                                                                                          │
│ ❱ 102 │   │   │   raise DuplicateIds(                                                                                                                     │
│   103 │   │   │   │   f"Tried to insert a widget with ID {widget_id!r}, but a widget {self._no                                                            │
│   104 │   │   │   │   "already exists with that ID in this list of children. "                                                                            │
│   105 │   │   │   │   "The children of a widget must have unique IDs."                                                                                    │
│                                                                                                                                                           │
│ ╭────────────────────────────────────────────── locals ───────────────────────────────────────────────╮                                                   │
│ │      self = <NodeList                                                                               │                                                   │
│ │             │   [                                                                                   │                                                   │
│ │             │   │   ListItem(                                                                       │                                                   │
│ │             │   │   │   id='test-table',                                                            │                                                   │
│ │             │   │   │   classes={'--highlight'},                                                    │                                                   │
│ │             │   │   │   pseudo_classes={'enabled'}                                                  │                                                   │
│ │             │   │   ),                                                                              │                                                   │
│ │             │   │   ListItem(id='test-table', pseudo_classes={'enabled'})                           │                                                   │
│ │             │   ]                                                                                   │                                                   │
│ │             >                                                                                       │                                                   │
│ │ widget_id = 'test-table'                                                                            │                                                   │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.