Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
Provide storage directory to store logs, coverage reports and so on
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Aug 29, 2021
1 parent f647000 commit 1996eda
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ precision = 2
show_missing = True

[html]
directory = htmlcov
directory = storage/coverage/htmlcov

[xml]
output = coverage.xml
output = storage/coverage/coverage.xml

[run]
branch = True
parallel = True
data_file = coverage.db
data_file = storage/coverage/coverage.db
# A list of file name patterns, the files to leave
# out of measurement or reporting.
omit =
Expand Down
3 changes: 2 additions & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ CSRF_COOKIE_SECURE=False
# SMTP configuration
EMAIL_URL=smtp+tls://user@gmail.com:password@smtp.gmail.com:587

# The front end domain of the site.
DOMAIN=serghei.blog
USE_SSL=False

Expand Down Expand Up @@ -96,4 +97,4 @@ RECAPTCHA_PUBLIC_KEY=MyRecaptchaKey123
RECAPTCHA_PRIVATE_KEY=MyRecaptchaPrivateKey456

# Logging
LOG_FILE=/var/log/branch.log
LOG_FILE=./storage/logs/app.log
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/build
/*.egg-info
/node_modules
/htmlcov
/static

# Python cache.
Expand All @@ -37,9 +36,3 @@ __pycache__
*.sqlite3
.env
build.py
*.log

# Ignore codecoverage stuff.
coverage.db.*
coverage.db
coverage.xml
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ disable=
duplicate-code,
import-outside-toplevel,
unused-argument,
attribute-defined-outside-init
attribute-defined-outside-init,

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Features
^^^^^^^^

* Tune up comments page on admin site.
* Provided ``storage`` directory to store logs, coverage reports and so on.


Trivial/Internal Changes
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ clean:
$(RM) -r ./build ./dist ./*.egg-info
$(RM) -r ./node_modules
$(RM) -r ./.cache ./.pytest_cache
$(RM) -r ./htmlcov
$(RM) ./coverage.*
$(RM) -r ./storage/coverage/htmlcov
$(RM) ./storage/coverage/coverage.*
$(RM) ./storage/logs/*.log
$(RM) ./storage/pids/*.pid
@echo

.PHONY: maintainer-clean
Expand All @@ -101,7 +103,7 @@ maintainer-clean: clean
@echo

.PHONY: lint
lint: export LOG_FILE=$(PKG_NAME).log
lint: export LOG_FILE=storage/logs/app.log
lint: $(VENV_PYTHON)
@echo $(CS)Running linters$(CE)
-$(VENV_BIN)/flake8 $(FLAKE8_FLAGS) ./
Expand Down Expand Up @@ -161,7 +163,8 @@ test: export RECAPTCHA_PRIVATE_KEY='Naive and not very secret key used for tests
test: export DATABASE_URL=sqlite://:memory:
test: export DEBUG=False
test: export USE_SSL=False
test: export LOG_FILE=$(PKG_NAME).log
test: export LOG_FILE=storage/logs/app.log
test: export WORKER_LOGLEVEL=info
test: build.py $(VENV_PYTHON)
@echo $(CS)Running tests$(CE)
$(VENV_BIN)/coverage erase
Expand Down
2 changes: 2 additions & 0 deletions storage/coverage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions storage/db/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions storage/logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions storage/pids/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 1996eda

Please sign in to comment.