Skip to content

Commit 4ab3db9

Browse files
authored
Merge pull request #40 from Akhileswar6/Feature
Feature
2 parents 1f39648 + 8d71fe3 commit 4ab3db9

File tree

9 files changed

+49
-38
lines changed

9 files changed

+49
-38
lines changed

.github/workflows/python-test.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: Python Auto Test
22

3-
on: [push] # means: run this every time I push code to GitHub
3+
on: [push]
44

55
jobs:
6-
test: # name of the job
7-
runs-on: ubuntu-latest # the environment (like a virtual computer)
6+
check:
7+
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout code
10-
uses: actions/checkout@v3 # step 1: get your code from GitHub
10+
uses: actions/checkout@v3
1111

1212
- name: Set up Python
13-
uses: actions/setup-python@v5 # step 2: install Python
13+
uses: actions/setup-python@v5
1414
with:
15-
python-version: '3.10' # version to use
15+
python-version: '3.10'
1616

17-
- name: Run a test command
18-
run: python --version # step 3: run your Python command
17+
- name: Check Python Syntax
18+
run: |
19+
python -m compileall .
File renamed without changes.

config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# config.yaml - Professional Python Practice Settings
2+
3+
user:
4+
name: "Akhileswar Kamale"
5+
github: "https://github.com/Akhileswar6"
6+
linkedin: "https://www.linkedin.com/in/akhileswar-kamale"
7+
8+
python:
9+
version: "3.10"
10+
show_welcome_message: true
11+
12+
folders:
13+
basics: true
14+
intermediate: true
15+
problems: true
16+
17+
settings:
18+
display_output: true
19+
log_errors: true

file.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

file1.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

file2.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

iss.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

load_config.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import yaml
2+
3+
# Load YAML config
4+
with open("config.yml", "r") as file:
5+
config = yaml.safe_load(file)
6+
7+
# Example: display user info
8+
user = config["user"]
9+
print(f"Hello, {user['name']}!")
10+
print(f"GitHub: {user['github']}")
11+
print(f"LinkedIn: {user['linkedin']}")
12+
13+
# Example: check active folders
14+
folders = config["folders"]
15+
for folder, active in folders.items():
16+
status = "active" if active else "inactive"
17+
print(f"{folder} folder is {status}")
18+
19+
# Example: conditional message
20+
if config["python"]["show_welcome_message"]:
21+
print("\nWelcome to Python Practice Repository!\n")

sample.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)