You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+44-25Lines changed: 44 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,40 +44,59 @@ That's it! You're now ready to start contributing. See [Poetry Scripts Reference
44
44
45
45
## Setting up dev environment 💻
46
46
47
-
Make sure you have Python>=3.9 installed. We use [Poetry](https://python-poetry.org/) for dependency management.
47
+
Make sure you have Python>=3.9 and <3.13 installed.
48
48
49
-
### Using Poetry (Recommended)
49
+
[Fork and clone](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repo, then set up your development environment using one of the methods below.
50
50
51
-
1.[Fork and clone](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repo
51
+
### Option 1: Using venv (recommended)
52
52
53
-
2. Create and activate a virtual environment:
54
-
```bash
55
-
python3 -m venv .venv
56
-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
57
-
```
53
+
Create and activate a virtual environment:
58
54
59
-
3. Install Poetry and dependencies:
60
-
```bash
61
-
pip install poetry
62
-
poetry install --with dev
63
-
```
55
+
```bash
56
+
# Create venv with Python 3.12 (or any version 3.9-3.12)
57
+
python3.12 -m venv .venv
64
58
65
-
4. Install the package in editable mode:
66
-
```bash
67
-
poetry run dev install-dev
68
-
```
59
+
# Activate the virtual environment
60
+
source .venv/bin/activate # On macOS/Linux
61
+
# .venv\Scripts\activate # On Windows
69
62
70
-
5. Start TerminusDB server (required for integration tests):
# Install the package in editable mode with dev dependencies
64
+
pip install -e ".[dev]"
65
+
66
+
# Install pytest for running tests
67
+
pip install pytest
68
+
```
69
+
70
+
### Option 2: Using pipenv
71
+
72
+
We also support [pipenv](https://pipenv-fork.readthedocs.io/en/latest/) for dev environment:
73
+
74
+
```bash
75
+
pip install pipenv --upgrade
76
+
pipenv install --dev --pre
77
+
```
78
+
79
+
Or simply run `make init`.
80
+
81
+
To "editable" install the local Terminus Client Python:
82
+
83
+
`pip install -e .`
84
+
85
+
### Running a local TerminusDB server
86
+
87
+
**To run integration tests, you need either Docker or a local TerminusDB server.**
88
+
89
+
For integration tests, you can either:
90
+
91
+
1.**Use Docker** (automatic): Tests will automatically start a Docker container if no server is detected
92
+
2.**Use a local server**: Start the TerminusDB test server from the main terminusdb repository:
76
93
```bash
77
-
docker stop terminusdb
78
-
docker rm terminusdb
94
+
cd /path/to/terminusdb
95
+
./tests/terminusdb-test-server.sh start
79
96
```
80
97
98
+
The test configuration will automatically detect and use an available server.
99
+
81
100
**To run integration tests, Docker must be installed locally.**
82
101
83
102
We use [shed](https://pypi.org/project/shed/) to lint our code. You can run it manually with `poetry run dev lint`, or set up a pre-commit hook (requires Python 3.10+):
0 commit comments