개발자가 코드 작성 후 지속적으로 코드를 합치고 배포하는 과정
continuous integration
continuous delivery
continuous deployment
배포의 경우 서비스 배포와 더불어 내부적으로 QA엔지니어나 관리자 페이지를 위한 배포, 데이터웨어하우스로부터 데이터를 가공해서 백엔드 개발자를 위한 패포를 포함함(참고)
파이프라인의 장점
class Dog:
def __init__(self, name, age): # 멤버 변수
self.name = name
self.age = age
def bark(self): # 멤버 함수
return "Woof!"
my_dog = Dog("Buddy", 3)
your_dog = Dog("Max", 5)
# 인스턴스 속성 접근
print(my_dog.name) # 출력: Buddy
print(your_dog.age) # 출력: 5
# 인스턴스 메서드 호출
print(my_dog.bark()) # 출력: Woof!
class Dog:
def __init__(self, name, age):
self.name = name
self.age = age
def bark(self):
return "Woof!"
@staticmethod # 클래스 내에서 static 키워드로 선언
def info():
return "This is a dog class. It provides methods to interact with dogs."
# 클래스를 이용하여 인스턴스 생성
my_dog = Dog("Buddy", 3)
your_dog = Dog("Max", 5)
class Calculator:
def add(self, a, b): # 매개변수 2개
return a + b
def add(self, a, b, c): # 매개변수 3개
return a + b + c
class Animal: # 부모클래스
def speak(self):
return "Animal speaks"
class Dog(Animal): # 자식클래스, Animal 클래스 상속
def speak(self): # speak 함수 재정의 "Woof"
return "Woof!"
class Cat(Animal):
def speak(self):
return "Meow!"
# 인스턴스 생성
animal = Animal()
dog = Dog()
cat = Cat()
class BankAccount:
def __init__(self, account_number, balance):
self._account_number = account_number
self._balance = balance
def deposit(self, amount): # 입금액 함수
self._balance += amount
def withdraw(self, amount): # 이체 함수
if self._balance >= amount:
self._balance -= amount
else:
print("Insufficient funds")
def get_balance(self): # 위 두함수의 핵심인 잔돈을 get_balance로 추상화 함
return self._balance