การพัฒนาซอฟต์แวร์ด้วย GitHub Copilot
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp




$$
กำหนด:

$$
กำหนด:

ระบุไว้ใน: .github/copilot-instructions.md
## Project context Python project for processing data pipelines with Airflow.## Coding style - Use type hints for all functions- Follow PEP8- Use snake_case naming- Write Google-style docstrings## Testing - Use pytest- Include one test per function## More instructions...
$$
✅ คำสั่งที่มีประสิทธิภาพ:
$$
❌ คำสั่งที่ไม่มีประสิทธิภาพ:
$$
$$
## Style guidelines
- Conform to the coding styles defined
in styleguide.md in repo my-org/my-repo
- Answer in the style of a friendly
colleague, using informal language
- Answer in fewer than 1,000 characters

$$
$$
## Style guidelines
- Conform to the coding styles defined
in styleguide.md in repo my-org/my-repo
- Answer in the style of a friendly
colleague, using informal language
- Answer in fewer than 1,000 characters

copilot-instructions.md
copilot-instructions.md



$$


$$

$$
ตัวอย่างกฎระดับองค์กร:
$$

$$
$$
| ขอบเขต | ลำดับความสำคัญ |
|---|---|
| คำสั่งส่วนตัว | สูงสุด |
| คำสั่งระดับโปรเจกต์ | กลาง |
| คำสั่งระดับองค์กร | ต่ำสุด |
$$
ตัวอย่าง prompt: "เขียนฟังก์ชันที่คำนวณค่าเฉลี่ยของรายการตัวเลข"
def calculate_average(numbers: List[float]) -> float:
"""Calculate the average of a list of numbers.
Args:
numbers (List[float]): A list of numbers to average.
Returns:
float: The average value of the numbers.
Raises:
ValueError: If the list is empty.
"""
if not numbers:
raise ValueError("The list of numbers cannot be empty.")
return sum(numbers) / len(numbers)
$$
ตัวอย่าง prompt: "เขียนฟังก์ชันที่คำนวณค่าเฉลี่ยของรายการตัวเลข"
def calculate_average(numbers: List[float]) -> float:
"""Calculate the average of a list of numbers.
Args:
numbers (List[float]): A list of numbers to average.
Returns:
float: The average value of the numbers.
Raises:
ValueError: If the list is empty.
"""
if not numbers:
raise ValueError("The numbers list cannot be empty.")
return sum(numbers) / len(numbers)
$$

การพัฒนาซอฟต์แวร์ด้วย GitHub Copilot