@@ -32,105 +32,92 @@ <h1>Frequently Asked Questions</h1>
3232 </ details >
3333</ div >
3434< div id ="technical-faq " class ="faq-container ">
35+ < h1 > Technical FAQ</ h1 >
36+
3537 < details >
3638 < summary > Which Python version is supported?</ summary >
3739 < p >
38- Python ≥ 3.11 is required. Using lower versions may cause dependency resolution or typing issues.
39- Verify using < code > python --version</ code > .
40+ Python ≥ 3.11 is required. Verify using:
4041 </ p >
42+ < pre > < code > python --version</ code > </ pre >
4143 </ details >
4244
4345 < details >
44- < summary > Where is the virtual environment created ?</ summary >
46+ < summary > How do I install dependencies ?</ summary >
4547 < p >
46- Poetry manages the virtual environment automatically.
47- Run < code > poetry env info</ code > to check the active environment.
48- If virtualenvs.path is configured, it will be created in that directory.
48+ Use the Makefile command:
49+ </ p >
50+ < pre > < code > make install</ code > </ pre >
51+ < p >
52+ This runs < code > poetry install</ code > internally.
4953 </ p >
5054 </ details >
5155
5256 < details >
53- < summary > How do I add a new dependency?</ summary >
54- < p >
55- Use Poetry only.
56- </ p >
57- < pre > < code > poetry add package-name</ code > </ pre >
58- < p >
59- For dev dependencies:
60- </ p >
61- < pre > < code > poetry add --group dev package-name</ code > </ pre >
57+ < summary > How do I run the Streamlit app?</ summary >
58+ < pre > < code > make dev</ code > </ pre >
6259 < p >
63- Do not manually edit < code > pyproject.toml </ code > .
60+ This executes < code > poetry run sample dev </ code > .
6461 </ p >
6562 </ details >
6663
6764 < details >
68- < summary > When should I regenerate poetry.lock?</ summary >
69- < p >
70- Only when adding or upgrading dependencies.
71- Use:
72- </ p >
73- < pre > < code > poetry lock --no-cache --regenerate</ code > </ pre >
65+ < summary > How do I run the FastAPI server?</ summary >
66+ < pre > < code > make api</ code > </ pre >
7467 < p >
75- Avoid unnecessary lock file changes in pull requests .
68+ This executes < code > poetry run sample api </ code > .
7669 </ p >
7770 </ details >
7871
7972 < details >
80- < summary > Why are environment variables not loading?</ summary >
81- < p >
82- Ensure the < code > ENV</ code > variable is set correctly:
83- </ p >
84- < pre > < code > export ENV=development</ code > </ pre >
85- < p >
86- or
87- </ p >
88- < pre > < code > export ENV=production</ code > </ pre >
73+ < summary > How do I run linting and type checks?</ summary >
74+ < pre > < code > make lint</ code > </ pre >
8975 < p >
90- Also confirm that corresponding < code > .env.* </ code > file exists in the project root .
76+ This runs ruff, black (check mode), and mypy .
9177 </ p >
9278 </ details >
9379
9480 < details >
95- < summary > Why is Streamlit not reflecting changes?</ summary >
81+ < summary > How do I auto-format the code?</ summary >
82+ < pre > < code > make format</ code > </ pre >
9683 < p >
97- Restart the Streamlit process. If caching issues occur, clear local cache or restart the shell .
84+ This runs black and ruff with auto-fix enabled .
9885 </ p >
9986 </ details >
10087
88+
10189 < details >
102- < summary > Why is my commit failing?</ summary >
90+ < summary > How do I clean cache and build artifacts?</ summary >
91+ < pre > < code > make clean</ code > </ pre >
10392 < p >
104- Pre-commit hooks enforce linting, formatting, and type checks.
105- Fix issues by running:
93+ This removes __pycache__, mypy cache, pytest cache, and build artifacts.
10694 </ p >
107- < pre > < code > poetry run lint</ code > </ pre >
10895 </ details >
10996
11097 < details >
111- < summary > How do I fix a corrupted virtual environment?</ summary >
98+ < summary > Where is the virtual environment created ?</ summary >
11299 < p >
113- Remove and recreate the environment:
100+ Poetry manages the virtual environment automatically.
101+ To inspect:
114102 </ p >
115- < pre > < code > poetry env info
116- poetry env remove <env-name>
117- poetry install</ code > </ pre >
103+ < pre > < code > poetry env info</ code > </ pre >
118104 </ details >
119105
120106 < details >
121- < summary > How do I test the built package locally ?</ summary >
107+ < summary > When should I regenerate poetry.lock ?</ summary >
122108 < p >
123- Build the package:
109+ Only when adding or upgrading dependencies.
124110 </ p >
125- < pre > < code > poetry build </ code > </ pre >
111+ < pre > < code > poetry lock --no-cache --regenerate </ code > </ pre >
126112 < p >
127- Create a clean virtual environment and install the wheel file from < code > dist/ </ code > .
113+ Avoid unnecessary lock file changes in pull requests .
128114 </ p >
129115 </ details >
116+
130117 < details >
131118 < summary > What if pymongo is not found?</ summary >
132119 < p >
133- MongoDB support is installed as an optional extra dependency.
120+ MongoDB support is an optional extra dependency.
134121 Install using:
135122 </ p >
136123 < pre > < code > pip install sample[mongo]</ code > </ pre >
@@ -140,15 +127,6 @@ <h1>Frequently Asked Questions</h1>
140127 < pre > < code > poetry install --extras "mongo"</ code > </ pre >
141128 </ details >
142129
143- < details >
144- < summary > What is the expected folder structure?</ summary >
145- < p >
146- All source code must reside inside the < code > src/</ code > directory.
147- Business logic should not be written directly in UI or API entry files.
148- Maintain separation between API, UI, services, and utilities.
149- </ p >
150- </ details >
151-
152130 < details >
153131 < summary > Are secrets allowed inside the repository?</ summary >
154132 < p >
0 commit comments