Coder Social home page Coder Social logo

c7's People

Contributors

hunterjsb avatar edaley-flemcollege avatar lepogoz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar Jackson Page avatar

c7's Issues

Firefox Chromedriver in Scanner

Issue

I'm sick of the selenium chromedriver signing me out of everything on chrome. Yes, I know it's a skill issue. I could just set up another profile or something but no.

Suggested Implementation

TBD

Save Device Storage Size

Issue

The c3 dashboard need a way to specify storage size

Suggested Implementation

A dropdown box with the option (128gb, 256gb, etc.)

Fix Partition Key

Issue

Cosmos is partitioned on status but we should partition on something else

Improve c3 Dashboard Loading

Issue

The dashboard is ridiculously slow when there a high number of listing. It freezes and is borderline unusable.

Possible Solutions

Improvements

  • Paginate
  • Save on next
  • #12
  • Migrate to JS Framework instead of Streamlit ???
  • Select one type at a time

Ed Dashboard

Issue

We need to build a dashboard for @edfarialand to grade and review phones before Claude initiates the conversation. This dashboard will display all listings stored in c3 and reflect his changes.

Implementation

Cosmos CosmosResourceNotFoundError on Patching Listing

Issue

When Ed saves it throws an error, I guess it's trying to save some listings that don't exist? How could he be updating a listing that doesn't exist.

Solution

For now maybe we just except the error and we'll know which ones aren't saving because they will remain on the dashboard after refresh, but graded ones should filter out. We can triage from there.

Stacktrace

from @edfarialand when he tried to save grades on the c3 dashboard

Traceback:
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in runscript
    exec(code, module.__dict)
File "/app/app.py", line 144, in <module>
    c3.update(_id, listing_body)
File "/app/offerup/c3.py", line 82, in update
    self.container.patch_item(item=listing_id, partition_key=partition, patch_operations=ops)
File "/usr/local/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
    return func(*args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/container.py", line 764, in patch_item
    return self.client_connection.PatchItem(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_cosmos_client_connection.py", line 2017, in PatchItem
    result, last_response_headers = self.Patch(path, request_params, request_data, headers, **kwargs)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_cosmos_client_connection.py", line 2868, in Patch
    return synchronized_request.SynchronizedRequest(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_synchronized_request.py", line 204, in SynchronizedRequest
    return _retry_utility.Execute(
           ^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_retry_utility.py", line 85, in Execute
    result = ExecuteFunction(function, global_endpoint_manager, args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_retry_utility.py", line 149, in ExecuteFunction
    return function(args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/azure/cosmos/_synchronized_request.py", line 149, in _Request
    raise exceptions.CosmosResourceNotFoundError(message=data, response=response)

Write Dashboard Changes to DB

See #2

Issue

We need to create a function like c3.grade or c3.update that we can call when changes are made to the dashboard, so we reflect those changes in the database. If this proves annoying to implement we can look at using a save button instead.

Suggested Implementation

in c3.py: function to reflect changes in Cosmos
in app.py: call function when changes are made or when ed saves

Re-Runs Loop on Every Action

Description

app.py re-runs hte top-level loop (over data.id) every time an action is take on the page.

Steps to reproduce

  1. Add print to loop in app.py
  2. Start the streamlit app
  3. Wait for the page to load
  4. Hit "Next" on the first listing
  5. Observe ๐Ÿ‘“

Suggested Fix

  • Add to load_data function and only run once now realizing its re-loading the data on every click too...
  • Paginate
  • Top-level bool called is_loaded or something to check if we've already run that loop

Final Additions

Issue

Improvements requested by @edfarialand

  • Prefill radio buttons with model (itemType)
  • #12
  • Expand all expanders by default
  • Remove the previous button
  • Change "LCD Damange" checkbox to "Battery Damage"
  • Change the save button from "Print Selected Grades" to something like "Save Changes"
  • Default the grade to B
  • "iCloud Lock" checkbox

Notes

On the first point, you can get the model from a column called itemType in the df. There is also a column for grade(will be None if not graded), but there is not guaranteed to be columns for the 'damage checkboxes'.

Dashboard UI Additions

Issue

Add the following UI elements

  • Change radio buttons to just B, C, D
  • Add the following checkboxes
    • LCD Damage
    • Cracked Back
    • Cracked Camera
  • Drop-down to select iPhone model*

*We probably need to define a model list or enum for the drop-down to draw from

Suggested Implementation

I will write a function called c3.update where you can pass the updated conversation or maybe just c3.grade where you can pass an Id and some new info.

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.