https://orbstack.dev/ 설치 linux -> machines에서 ubuntu 생성 orb sudo passwd $USER sudo apt update && sudo apt upgrade sudo apt install curl curl --vers
Exception: Can not find valid pkg-config name. Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manuallypoetry add pymysqlsettings.py
pytest.inienv_path -> env_files
\->cwd를 tests로 지정했는데 못찾음
환경 : vscode, pytest, django, poetry venv, pytest-django-dotenvpoetry 가상환경에서 pytest를 실행하면 에러가 발생함원인 : pytest-django-dotenv 이게 poetry 가상환경 경로 + pytest.i
dockerfile에서 파일을 못찾는 문제 발생error Couldn't find a package.json file insubmodule이 있었는데 clone을 못하고 있었음github token 생성하고 추가
mac m1, m2 를 사용하면 발생하는 문제일 수 있음아래처럼 플랫폼을 linux/amd64로 지정하고 컨테이너 실행해야 함
터미널에서 which mysqldumpdatagrip에서 exportmysqldump 경로를 입력하면 됨.
git push했을 때 권한 문제가 발생했다.token 발급 후 remote url 지정하기git remote set-url origin https://ghp_xxx@github.com/id/repo_name.gitgithub repository setting
로그를 일일이 찾아서 지우는 게 귀찮을 때 command + f로 찾기 창 열고 regex 선택 후 console.log\\(.\*\\)replace 켜서 빈값으로 대치
sqlalchemy로 만든 모델을 기반으로 테이블을 생성하려고 함'Cannot add foreign key constraint' 에러 발생부모 테이블 데이터 삭제 시 ondelete='SET NULL'로 관계를 없애주는 조건이 있지만 nullable=False 때문에
brew search postgresql 버전 검색brew install postgresql or brew install postgresql@x 특정 버전 설치postgres -V 버전 확인brew services list 목록 확인brew services restar
환경에 따라 mongo client 인스턴스를 만들어 사용하려고 함테스트 코드 상에서 의존성 주입을 하려고 했는데 pytest는 테스트 클래스에 \_\_init\_\_ 메서드를 만들 수 없었음. 다른 메서드에 def a(b: B): 이렇게 의존성 주입을 하려고 하니까
fixture 클래스에서 dependency injection을 해주고 fixture 클래스를 상속 받아서 데이터를 생성하려고 했다. \_\_init\_\_이 있으면 경고가 떴다.의존성 주입을 하지 않고 인스턴스를 fixture로 만들어서 사용하기로 함.
pymongo, bson 삭제 후 재설치
settings.json에 테스트 디렉토리의 상위 디렉토리를 명시해야 함테스트 디렉토리가 tests라면 pytestArgs에 그것보다 상위 디렉토리를 작성해주면 됨
poetry 가상환경 실행poetry shelllock 파일 없이 기존 requirements.txt 에 있는 패키지 설치poetry add $( cat requirements.txt )패키지 설치poetry add {패키지명}pyproject.toml 로부터 프로젝트
brew install pyenvbrew install pyenv-virtualenv.zshrc에 추가 후 source .zshrc 입력eval "$(pyenv init -)"eval "$(pyenv virtualenv-init -)"pyenv로 파이썬 설치pyenv