Skip to content

Commit 17874de

Browse files
authored
Merge pull request #2400 from yarikoptic/enh-dev-instructions
Give explicit instructions on where to get code and check/set port for django DB
2 parents 6a10b63 + 886ba0b commit 17874de

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

DEVELOPMENT.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Development Guidelines
22

3+
## Getting Started
4+
5+
You would need a local clone of the `dandi-archive` repository to develop on it.
6+
7+
1. Run `git clone https://github.com/dandi/dandi-archive`
8+
2. Run `cd dandi-archive`
9+
3. Make sure your PostgreSQL port (5432) is available (recommended), or
10+
export `DOCKER_POSTGRES_PORT` environment variable to point to an alternative port.
11+
312
## Develop with Docker (recommended quickstart)
413
This is the simplest configuration for developers to start with.
514

@@ -43,7 +52,7 @@ but allows developers to run Python code on their native system.
4352
pip install psycopg2
4453
```
4554
5. Create and activate a new Python virtualenv
46-
6. Run `pip install -e .[dev]`
55+
6. Run `pip install -e ".[dev]"`
4756
7. Run `source ./dev/export-env.sh`
4857
8. Run `./manage.py migrate`
4958
9. Run `./manage.py createcachetable`
@@ -85,7 +94,7 @@ the appropriate `dev/.env.docker-compose*` file as a baseline for overrides.
8594
### Initial Setup
8695
tox is used to execute all tests.
8796
tox is installed automatically with the `dev` package extra.
88-
To install the tox pytest dependencies into your environment, run `pip install -e .[test]`.
97+
To install the tox pytest dependencies into your environment, run `pip install -e ".[test]"`.
8998
These are useful for IDE autocompletion or if you want to run `pytest` directly (not recommended).
9099

91100
When running the "Develop with Docker" configuration, all tox commands must be run as

dev/.env.docker-compose

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DJANGO_CONFIGURATION=DevelopmentConfiguration
2-
DJANGO_DATABASE_URL=postgres://postgres:postgres@postgres:5432/django
2+
DJANGO_DATABASE_URL=postgres://postgres:postgres@postgres:${DOCKER_POSTGRES_PORT-5432}/django
33
DJANGO_CELERY_BROKER_URL=amqp://rabbitmq:5672/
44
DJANGO_MINIO_STORAGE_ENDPOINT=minio:9000
55
DJANGO_MINIO_STORAGE_ACCESS_KEY=minioAccessKey

dev/.env.docker-compose-native

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DJANGO_CONFIGURATION=DevelopmentConfiguration
2-
DJANGO_DATABASE_URL=postgres://postgres:postgres@localhost:5432/django
2+
DJANGO_DATABASE_URL=postgres://postgres:postgres@localhost:${DOCKER_POSTGRES_PORT-5432}/django
33
DJANGO_CELERY_BROKER_URL=amqp://localhost:5672/
44
DJANGO_MINIO_STORAGE_ENDPOINT=localhost:9000
55
DJANGO_MINIO_STORAGE_ACCESS_KEY=minioAccessKey

0 commit comments

Comments
 (0)