Skip to content

Commit ea8e436

Browse files
Merge pull request steam-bell-92#1124 from anshul23102/fix/1050-readme-setup-instructions
docs: Add comprehensive setup instructions to README for issue steam-bell-92#1050
2 parents bbcbe6c + bba0f67 commit ea8e436

1 file changed

Lines changed: 135 additions & 0 deletions

File tree

README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,141 @@ python-mini-project/
9090
└── requirements.txt
9191
```
9292

93+
## 🚀 Getting Started
94+
95+
### Prerequisites
96+
97+
- Python 3.10 or higher
98+
- Git (for cloning the repository)
99+
- pip (Python package manager)
100+
101+
### Installation Steps
102+
103+
#### 1. Clone the Repository
104+
105+
```bash
106+
git clone https://github.com/steam-bell-92/python-mini-project.git
107+
cd python-mini-project
108+
```
109+
110+
#### 2. Create a Virtual Environment
111+
112+
For Linux/macOS:
113+
```bash
114+
python3 -m venv venv
115+
source venv/bin/activate
116+
```
117+
118+
For Windows (Command Prompt):
119+
```bash
120+
python -m venv venv
121+
venv\Scripts\activate
122+
```
123+
124+
For Windows (PowerShell):
125+
```bash
126+
python -m venv venv
127+
venv\Scripts\Activate.ps1
128+
```
129+
130+
#### 3. Install Dependencies
131+
132+
```bash
133+
pip install --upgrade pip
134+
pip install -r requirements.txt
135+
```
136+
137+
### Running Command-Line Projects
138+
139+
Each Python project in `games/`, `math/`, and `utilities/` folders can be run independently.
140+
141+
#### Example: Running a Game
142+
143+
```bash
144+
cd games/Snake-Game
145+
python Snake-Game.py
146+
```
147+
148+
#### Example: Running a Math Project
149+
150+
```bash
151+
cd math/Fibonacci-Series
152+
python Fibonacci-Series.py
153+
```
154+
155+
#### Example: Running a Utility
156+
157+
```bash
158+
cd utilities/Text-to-Morse
159+
python Text-to-Morse.py
160+
```
161+
162+
### Running the Web App
163+
164+
The web application provides a browser-based interface for all projects.
165+
166+
#### Prerequisites for Web App
167+
168+
The web app requires Node.js and npm:
169+
- Download from https://nodejs.org/ (v16 or higher recommended)
170+
- Verify installation: `node --version && npm --version`
171+
172+
#### Steps to Run Web App
173+
174+
```bash
175+
cd web-app
176+
npm install
177+
npm start
178+
```
179+
180+
The app will open at `http://localhost:3000` (or your configured port).
181+
182+
### Running Tests
183+
184+
To verify that the projects work correctly, run the test suite:
185+
186+
```bash
187+
pytest tests/ -v
188+
```
189+
190+
For specific test file:
191+
```bash
192+
pytest tests/test_armstrong.py -v
193+
```
194+
195+
### Development Workflow
196+
197+
#### Creating a New Project
198+
199+
1. Choose appropriate directory: `games/`, `math/`, or `utilities/`
200+
2. Create a new folder with your project name (use PascalCase)
201+
3. Add your `.py` file with the same name as the folder
202+
4. Include a `README.md` in your project folder with usage instructions
203+
5. Add tests in `tests/` directory with prefix `test_`
204+
205+
#### Code Guidelines
206+
207+
- Follow PEP 8 style guide
208+
- Write docstrings for functions and classes
209+
- Add unit tests for your code
210+
- Test your project before submitting a PR
211+
212+
#### Virtual Environment Reminder
213+
214+
Always activate your virtual environment before working:
215+
```bash
216+
# Linux/macOS
217+
source venv/bin/activate
218+
219+
# Windows
220+
venv\Scripts\activate
221+
```
222+
223+
Deactivate when done:
224+
```bash
225+
deactivate
226+
```
227+
93228
## 🧩 What’s Inside
94229

95230
- Games for quick interactive fun

0 commit comments

Comments
 (0)