Skip to content

Commit 1236b76

Browse files
author
RecursiveZero
committed
update faqs; README
1 parent 005cea3 commit 1236b76

13 files changed

Lines changed: 126 additions & 142 deletions

File tree

.env.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
ENVIRONMENT=development
33

44
MONGODB_URI="mongodb://<user>:<password>@127.0.0.1:27017/?retryWrites=true&w=majority&appName=sample"
5-
DATABASE_NAME="sample"
5+
DATABASE_NAME="sample"

.streamlit/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ toolbarMode = "viewer"
1111
hideTopBar = false
1212

1313
[theme]
14-
base = "light"
14+
base = "dark"
1515
primaryColor = "#4b9fffff"
1616
backgroundColor = "#FFFFFFFF"
1717
secondaryBackgroundColor = "#F0F2F6FF"

.streamlit/secrets.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ GEMINI_API = ""
99
GROQ_API = "gsk_"
1010

1111
[mongodb]
12-
MONGODB_URI = "mongodb://<user:<password>@127.0.0.1:27017/sample-server?authSource=admin&retryWrites=true&w=majority&appName=sample"
12+
MONGODB_URI = "mongodb://admin:1234@127.0.0.1:27017/sample-server?authSource=admin&retryWrites=true&w=majority&appName=sample"
1313
DATABASE_NAME = "sample"

.vscode/Python.code-profile

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.vscode/extensions.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"aaron-bond.better-comments",
1313
"Heron.firefox-devtools-theme",
1414
"GitHub.github-vscode-theme",
15-
"ms-python.python",
16-
"yzhang.markdown-all-in-one"
15+
"yzhang.markdown-all-in-one",
16+
"tamasfe.even-better-toml",
17+
"ms-python.vscode-python-envs"
1718
]
18-
}
19+
}

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Ensure below files are configured (create if not exist) properly to run the proj
4040

4141
```bash
4242
poetry lock --no-cache --regenerate
43-
poetry install --with dev
43+
poetry install --all-extras --with dev
4444
```
4545

4646
Or manually
@@ -126,22 +126,35 @@ pip install sample
126126

127127
current version will be printed on start of above commands.
128128

129+
## Install GIT hooks
130+
131+
these hooks will
132+
133+
- Check for lint and audit for security before commit
134+
- Append branch name in commit message
135+
- Generate requirements.txt on checkout on new branch
136+
137+
```bash
138+
# Install git hooks
139+
poetry run ./scripts/setup-hooks.sh
140+
```
141+
142+
there is `.vscode/Python.code-profile` file; import this as a profile in vscode which include necessary extension for python development.
129143

130144
## Troubleshooting
131145

132146
sometimes there might be chances that virtual environment get corrupted then delete the old virtual environment and start afresh.
133147

134148
```sh
135-
poetry env info
136-
# this will provide virtual environment name
149+
poetry env info
150+
# this will provide virtual environment name
137151
poetry env remove <environment-full-name>
138-
```
152+
```
139153

140154
## License
141155

142156
[MIT](./LICENSE)
143157

144-
145158
## References
146159

147160
- [Python Downloads](https://www.python.org/downloads)
@@ -150,7 +163,3 @@ poetry env remove <environment-full-name>
150163
- [Poetry Docs](https://python-poetry.org/docs/)
151164
- [MyPy Docs](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports)
152165
- [Useful Poetry commands](./docs//POETRY_COMMANDS.md)
153-
154-
155-
156-

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[project]
22
name = "sample"
33
version = "0.0.5"
4-
description = "A package template for Recursive zero."
4+
description = "A python template for fastapi and streamlit projects."
55
authors = [{ name = "sample", email = "recursivezero@outlook.com" }]
66
license = "MIT"
77
readme = "README.md"
88
requires-python = ">=3.10,<3.13"
9-
keywords = ["image", "fastapi", "streamlit"]
9+
keywords = ["python", "fastapi", "streamlit"]
1010
classifiers = [
1111
"Programming Language :: Python :: 3",
1212
"Topic :: Scientific/Engineering :: Image Recognition",

sample-py.code-workspace

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"explorer.fileNesting.enabled": true,
4242
"explorer.fileNesting.patterns": {
4343
"pyproject.toml": "poetry.lock,ruff.toml,.pip-audit.toml",
44-
".gitignore": ".prettier*, .poetryignore, .editorconfig, .eslint*, .npm*, .markdown*, .flake8, .env*, mypy.ini",
44+
".gitignore": ".gitattributes, .poetryignore, .editorconfig, .eslint*, .npm*, .markdown*, .flake8, .env*, mypy.ini",
4545
"README.md": "*.md, requirements.txt,packages.txt",
4646
"LICENSE": "LICENSE-*"
4747
},
@@ -95,12 +95,14 @@
9595
"sideBar.border": "#6d4589"
9696
},
9797
"peacock.color": "#523467",
98-
"cSpell.words": [],
98+
"cSpell.words": [
99+
"gitstash"
100+
],
99101
"files.autoSave": "onFocusChange",
100102
"editor.dragAndDrop": false,
101103
"editor.tabCompletion": "onlySnippets",
102104
"editor.formatOnSaveMode": "file",
103-
"files.eol": "\r\n",
105+
"files.eol": "\n",
104106
"files.readonlyExclude": {
105107
"dist/**": true
106108
},
@@ -134,7 +136,6 @@
134136
"diffEditor.ignoreTrimWhitespace": true
135137
},
136138
"files.readonlyInclude": {
137-
".githooks/**": true,
138139
".venv/**": true
139140
},
140141
"workbench.editor.pinnedTabsOnSeparateRow": true,
@@ -145,6 +146,7 @@
145146
"./src"
146147
],
147148
"files.exclude": {
149+
".git/**": true,
148150
".poetry/**": true,
149151
"**/.git": false
150152
},
@@ -153,18 +155,14 @@
153155
"servers": {}
154156
},
155157
"chat.mcp.serverSampling": {
156-
"sample-py.code-workspace: my-mcp-server-c37295de": {
158+
"tz-script.code-workspace: my-mcp-server-c37295de": {
157159
"allowedModels": [
158160
"copilot/gpt-4.1",
159161
"copilot/claude-3.5-sonnet"
160162
]
161163
}
162164
},
163165
"gitstash.explorer.display.fileSorting": "tree",
164-
"folderStructure.ignorePatterns": [
165-
"node_modules",
166-
".*",
167-
"__pycache__"
168-
],
166+
"files.insertFinalNewline": true,
169167
}
170-
}
168+
}

src/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from db.db_connection import mongo_client
1+
from db.connection import mongo_client
22

33
if mongo_client:
4-
print("MongoDB connection successfull")
4+
print("MongoDB connected successfully.")

0 commit comments

Comments
 (0)