Skip to content

Commit dcc9149

Browse files
committed
Update assessment
Add Makefile remove pipenv. Remove unused User application. Remove unused dependencies. Update README. Removed .envrc and direnv usage.
1 parent c42117b commit dcc9149

76 files changed

Lines changed: 4218 additions & 6619 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.envrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.readthedocs.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Makefile

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
PIP_REPO_URL := $(shell pip3.11 config get install.find-links 2> /dev/null)
2+
3+
PYTHON=python3.11
4+
ENV_DIR=.env_$(PYTHON)
5+
PROJECT_FOLDERS=src tests
6+
VERBOSITY ?= 1
7+
8+
export PYTHONPATH=.
9+
export DJANGO_SETTINGS_MODULE=propylon_document_manager.site.settings.local
10+
11+
ifeq ($(OS),Windows_NT)
12+
IN_ENV=. $(ENV_DIR)/Scripts/activate &&
13+
else
14+
IN_ENV=. $(ENV_DIR)/bin/activate &&
15+
endif
16+
17+
# ======================
18+
# Environment management
19+
# ======================
20+
$(ENV_DIR):
21+
virtualenv -p $(PYTHON) $(ENV_DIR)
22+
@printf "[install]\nfind-links=$(PIP_REPO_URL)\n" > $(ENV_DIR)/pip.conf
23+
24+
print-install-message:
25+
@printf "Environment installed at $(ENV_DIR), run the following command to activate it: \nsource $(ENV_DIR)/bin/activate\n"
26+
27+
env: $(ENV_DIR) print-install-message
28+
29+
requirements: requirements/main.txt requirements/dev.txt build-reqs
30+
31+
env_update: $(ENV_DIR) requirements
32+
$(IN_ENV) pip install -U -r requirements/dev.txt
33+
34+
# ======================
35+
# Testing and Linting
36+
# ======================
37+
test: build plain-test
38+
39+
plain-test:
40+
$(IN_ENV) py.test
41+
42+
# ====================
43+
# Clean
44+
# ====================
45+
clean:
46+
- @rm -rf src/*.egg-info
47+
- @rm -rf build
48+
- @rm -rf dist
49+
- @rm -f .coverage
50+
- @rm -f test_results.xml
51+
- @rm -f coverage.xml
52+
- @find ./src -name '*.pyc' | xargs -r rm
53+
- @find ./ -name '__pycache__' | xargs rm -rf
54+
55+
56+
env_clean: clean
57+
- @rm -rf $(ENV_DIR)
58+
59+
# ====================
60+
# Developer Utilities
61+
# ====================
62+
shell:
63+
$(IN_ENV) django-admin shell
64+
65+
collectstatic:
66+
$(IN_ENV) django-admin collectstatic
67+
68+
build-reqs: env
69+
$(IN_ENV) pip install -r requirements/dev.txt
70+
71+
build: build-reqs
72+
$(IN_ENV) pip install -e .
73+
74+
plain-serve:
75+
$(IN_ENV) django-admin runserver 0.0.0.0:8001
76+
77+
serve: build makemigrations migrate plain-serve
78+
79+
# ============================
80+
# Database & Fixture Utilities
81+
# ============================
82+
makemigrations:
83+
$(IN_ENV) django-admin makemigrations
84+
85+
migrate:
86+
$(IN_ENV) django-admin migrate
87+
88+
fixture: build makemigrations migrate plain-fixture
89+
90+
plain-fixture:
91+
$(IN_ENV) django-admin load_file_fixtures

Pipfile

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)