File tree Expand file tree Collapse file tree 9 files changed +49
-38
lines changed
Expand file tree Collapse file tree 9 files changed +49
-38
lines changed Original file line number Diff line number Diff line change 11name : Python Auto Test
22
3- on : [push] # means: run this every time I push code to GitHub
3+ on : [push]
44
55jobs :
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.
Original file line number Diff line number Diff line change 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
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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 ("\n Welcome to Python Practice Repository!\n " )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments