<aside>
</aside>
session.install()
๋ก ๋ฆฐํฐ/ํฌ๋งคํฐ ์ค์น ๋ฐ session.run()
์ผ๋ก ์คํ ๋ฐฉ๋ฒ ์ตํ๊ธฐํ๋ก์ ํธ ๊ตฌ์กฐ:
graph TD
A(my-pytest-project) --> B(.venv);
A --> C(mycalc);
A --> D(tests);
A --> E(pytest.ini);
A --> F(noxfile.py lint,format ์ธ์
์ถ๊ฐ);
A --> G(requirements-dev.txt flake8,black,isort ์ถ๊ฐ);
A --> H(pyproject.toml ๋๊ตฌ ์ค์ ํ์ผ ์ ํ ์ฌํญ);
C --> ...;
D --> ...;
style B fill:#eee,stroke:#333,stroke-dasharray: 5 5;
style C fill:#ccf,stroke:#333;
style D fill:#cfc,stroke:#333;
style E fill:#fef,stroke:#333;
style F fill:#ffc,stroke:#333;
style G fill:#eee,stroke:#333;
style H fill:#eef,stroke:#333;
requirements-dev.txt
(๋ฆฐํฐ/ํฌ๋งคํฐ ๋๊ตฌ ์ถ๊ฐ):pyproject.toml
(์ ํ์ผ - ํ๋ก์ ํธ ๋ฃจํธ, ๋๊ตฌ ์ค์ ):(Black, isort ๋ฑ ๋๊ตฌ ์ค์ ์ ํ ๊ณณ์์ ๊ด๋ฆฌ. ์์ผ๋ฉด ๊ธฐ๋ณธ ์ค์ ์ผ๋ก ๋์)noxfile.py
(lint
, format
์ธ์
์ถ๊ฐ):์ด๋ฒ ์๊ฐ์ ์ฌ์ฉํ ์ฃผ์ ๋ช ๋ น์ด:
# (๊ฐ์ํ๊ฒฝ ํ์ฑํ, ํ๋ก์ ํธ ๋ฃจํธ)
nox -s lint # ๋ฆฐํธ ์ธ์
์คํ (๊ฒ์ฌ)
nox -s format # ํฌ๋งท ์ฒดํฌ ์ธ์
์คํ (๊ฒ์ฌ๋ง)
nox -s format -- fix # ํฌ๋งท ์์ ์ธ์
์คํ (ํ์ผ ๋ด์ฉ ๋ณ๊ฒฝ!)
# nox # ๋ชจ๋ ์ธ์
์์ฐจ ์คํ