File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .PHONY : compress-images
1+ # Help
2+ .DEFAULT_GOAL := help
23
3- compress-images :
4+ .PHONY : help
5+
6+ compress-images : # # Compress and optimize images throughout the repository. Requires optipng, svgo, and jpeg-recompress.
47 @./scripts/compress_images.bash
8+
9+ eslint : # # Run eslint against the project directory. Requires node, npm, and project dependencies.
10+ @npm run eslint
11+
12+ fix-eslint : # # Run eslint --fix against the project directory. Requires node, npm, and project dependencies.
13+ @npm run eslint:fix
14+
15+ fix-isort : # # Run isort against python files in the project directory.
16+ @docker-compose exec web isort -rc --atomic .
17+
18+ fix : fix-eslint fix-isort # # Attempt to run all fixes against the project directory.
19+
20+ fresh : # # Completely destroy all compose assets and start compose with a fresh build.
21+ @docker-compose down -v; docker-compose up -d --build;
22+
23+ logs : # # Print and actively tail the docker compose logs.
24+ @docker-compose logs -f
25+
26+ pytest : # # Run pytest (Backend)
27+ @docker-compose exec web pytest -p no:ethereum
28+
29+ tests : pytest eslint # # Run the full test suite.
30+
31+ help :
32+ @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Original file line number Diff line number Diff line change @@ -66,3 +66,50 @@ This can be useful if you'd like data to test with:
6666``` shell
6767docker-compose exec web python3 app/manage.py sync_geth mainnet 40 99999999999
6868```
69+
70+ ### FAQ
71+
72+ #### Running Tests
73+
74+ ` Q: How can I run the tests locally? `
75+
76+ You can ensure your project will pass all Travis tests by running:
77+
78+ ``` shell
79+ make tests # docker-compose exec web pytest -p no:ethereum; npm run eslint;
80+ ```
81+
82+ The above make command will run ` eslint ` and ` pytest ` .
83+
84+ #### Fresh rebuild
85+
86+ ` Q: My environment is erroring out due to missing modules/packages or postgresql errors. How can I fix it? `
87+
88+ ``` shell
89+ make fresh # docker-compose down -v; docker-compose up -d --build;
90+ ```
91+
92+ #### Create superuser
93+
94+ ` Q: How can I access the django administration login? `
95+
96+ ``` shell
97+ make superuser # docker-compose exec web python3 app/manage.py createsuperuser
98+ open http://localhost:8000/_administration
99+ ```
100+
101+ #### Fix local test issues
102+
103+ ` Q: How can I attempt automatic remediation of eslint and isort test failures? `
104+
105+ ``` shell
106+ make fix # npm run eslint:fix; docker-compose exec web isort -rc --atomic .;
107+ ```
108+
109+ #### Makefile Help
110+
111+ ` Q: How can I see a complete list of Makefile commands and descriptions? `
112+
113+ ``` shell
114+ make # make help
115+ ```
You can’t perform that action at this time.
0 commit comments