File tree Expand file tree Collapse file tree 4 files changed +54
-109
lines changed
Expand file tree Collapse file tree 4 files changed +54
-109
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ dist-contents: build
5757
5858# Check code quality
5959check :
60- ruff check .
60+ ruff check . --fix
6161 find . -wholename " ./newtype/extensions/*.c" -exec cppcheck {} +
6262
6363# Format code
Original file line number Diff line number Diff line change @@ -19,38 +19,46 @@ git clone https://github.com/yourusername/python-newtype.git
1919cd python-newtype
2020```
2121
22- 2 . Install dependencies using Poetry:
23- ``` bash
24- poetry install --no-root
25- ```
26-
27- 3 . Activate the virtual environment:
28- ``` bash
29- poetry shell
30- ```
31-
32- Alternatively, you can use ` venv ` to create and activate a virtual environment.
33- Create a new virtual environment using ` venv ` :
22+ 2 . Create a new virtual environment using ` venv ` :
3423
3524For Linux:
25+
3626``` bash
3727python3 -m venv venv
38- source venv/bin/activate
28+ source . venv/bin/activate
3929```
4030For Windows:
31+
4132``` bash
4233python -m venv venv
43- .\v env\S cripts\a ctivate
34+ .\. venv\S cripts\a ctivate
4435```
4536
46- Then, get poetry to use it:
37+ 3 . Install ` poetry ` :
38+
39+ ``` bash
40+ pip install poetry
41+ ```
42+
43+ 4 . Get poetry to use the virtual environment in the project directory:
44+
4745``` bash
4846poetry config virtualenvs.in-project true
4947```
48+
5049This will ensure that Poetry uses the current virtual environment located in the project directory.
5150You can also set the virtual environment path explicitly if needed.
5251For example:
53- ` poetry config virtualenvs.path /path/to/your/venvs `
52+
53+ ``` bash
54+ poetry config virtualenvs.path /path/to/your/venvs
55+ ```
56+
57+ Then, you can install all development dependencies using
58+
59+ ``` bash
60+ poetry install --with dev --no-root --no-interaction
61+ ```
5462
5563## Project Structure
5664
Original file line number Diff line number Diff line change @@ -37,26 +37,26 @@ generate-setup-file = false
3737generate-ref-docs = " scripts.generate_ref_docs:main"
3838
3939[tool .poetry .dependencies ]
40- python = " >=3.8"
40+ python = " >=3.8,<4.0 "
4141typing-extensions = " *"
4242
4343[tool .poetry .group .dev .dependencies ]
4444pre_commit = " *"
45- ruff = " ^0.1.14 "
46- mypy = " ^1.8.0 "
45+ ruff = " * "
46+ mypy = " * "
4747isort = " *"
4848creosote = " *"
49- pre-commit = " ^3.6.0 "
50- tomli = " ^2.1.0 "
51- poetry-dynamic-versioning = " ^1.4.1 "
52- pytest = " ^8.0.0 "
53- pytest-cov = " ^5.0.0 "
54- pytest-asyncio = " ^0.24.0 "
55- pytest-mock = " ^3.12.0 "
56- mkdocs = " ^1.5.3 "
57- mkdocs-material = " ^9.5.3 "
58- mkdocstrings = {extras = [" python" ], version = " ^0.24.0 " }
59- black = " ^24.1.1 "
49+ pre-commit = " ^3"
50+ tomli = " ^2"
51+ poetry-dynamic-versioning = " * "
52+ pytest = " * "
53+ pytest-cov = " * "
54+ pytest-asyncio = " * "
55+ pytest-mock = " * "
56+ mkdocs = " * "
57+ mkdocs-material = " * "
58+ mkdocstrings = {extras = [" python" ], version = " * " }
59+ black = " * "
6060numpy = " >=1.24.0,<1.25.0" # Pin numpy version
6161pandas = " >=2.0.0,<2.1.0" # Pin pandas version to be compatible with numpy
6262
You can’t perform that action at this time.
0 commit comments