Skip to content
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

Feat add db nps #12

Merged
merged 14 commits into from
Jan 4, 2025
Merged

Feat add db nps #12

merged 14 commits into from
Jan 4, 2025

Conversation

ghostleek
Copy link
Contributor

No description provided.

Assistant generated file changes:
- main.py: Fix line length and trailing whitespace, Fix trailing whitespace and exception handling
- test_main.py: Fix line length in test file

---

User prompt:

Run pylint $(git ls-files '*.py')
************* Module main
main.py:50:0: C0301: Line too long (111/100) (line-too-long)
main.py:52:0: C0301: Line too long (113/100) (line-too-long)
main.py:82:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:84:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:103:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:115:0: C0301: Line too long (107/100) (line-too-long)
main.py:26:7: W0718: Catching too general exception Exception (broad-exception-caught)
************* Module test_main
test_main.py:25:0: C0301: Line too long (134/100) (line-too-long)
test_main.py:27:0: C0301: Line too long (107/100) (line-too-long)
Assistant generated file changes:
- database.py: Switch to Replit's database

---

User prompt:

is installing sqlite necessary to use the db function in replit?
Assistant generated file changes:
- main.py: Add star rating component

---

User prompt:

how about using https://github.com/flucas96/streamlit_star_rating instead
Assistant generated file changes:
- requirements.txt: Update star rating package name

---

User prompt:

change the command to  pip install st-star-rating
Assistant generated file changes:
- main.py: Fix star rating implementation

---

User prompt:

no nps survey shows. why?
Assistant generated file changes:
- main.py: Fix star rating implementation

---

User prompt:

i think the component isn't imported correctly

It should look like

from streamlit_star_rating import st_star_rating

$ stars = st_star_rating("Please rate you experience", maxValue=5, defaultValue=3, key="rating")
Assistant generated file changes:
- main.py: Fix star rating variable name

---

User prompt:

help resolve error:

2025-01-04 09:52:13.751 Uncaught app execution
Traceback (most recent call last):
  File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/home/runner/strExitCard/.pythonlibs/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
  File "/home/runner/strExitCard/main.py", line 134, in <module>
    main()
  File "/home/runner/strExitCard/main.py", line 118, in main
    if rating:
       ^^^^^^
NameError: name 'rating' is not defined
Assistant generated file changes:
- main.py: Update star rating and add email field

---

User prompt:

should make min stars 5 by default.
remove the text "please rate your experience"
include optional email field for feedback
Assistant generated file changes:
- database.py: Switch to PostgreSQL and add table creation
- main.py: Add database initialization

---

User prompt:

no tables found in replit database. is that normal?
Assistant generated file changes:
- main.py: Add immediate logging of search terms

---

User prompt:

at the point of entering a term, it should be logged in the database. but it does not seem to be the case for the current implementation. why?
Assistant generated file changes:
- main.py: Add comments to feedback saving
- database.py: Add comments column and parameter, Update save_feedback function

---

User prompt:

comments not logged in the db. please fix that
@ghostleek ghostleek merged commit 3285b72 into main Jan 4, 2025
1 of 2 checks passed
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.

1 participant