From afc5e2a45380693420226ca332b9fa3d80faab74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B4=94=E4=B8=BA=E4=B9=8B?= <560397@gree.com.cn>
Date: Tue, 31 Oct 2023 11:05:22 +0800
Subject: [PATCH] Update project

---
 .editorconfig | 33 +++++++++++++++++++++++++++++++++
 .travis.yaml  | 14 ++++++++++++++
 CHANGELOG.md  |  6 ++++++
 Makefile      | 39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 92 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .travis.yaml
 create mode 100644 CHANGELOG.md
 create mode 100644 Makefile

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..f5c89b5
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,33 @@
+# EditorConfig is awesome: https://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+# Matches multiple files with brace expansion notation
+# Set default charset
+[*.{js,py}]
+charset = utf-8
+
+# 4 space indentation
+[*.py]
+indent_style = space
+indent_size = 4
+
+# Tab indentation (no size specified)
+[Makefile]
+indent_style = tab
+
+# Indentation override for all JS under lib directory
+[lib/**.js]
+indent_style = space
+indent_size = 2
+
+# Matches the exact files either package.json or .travis.yml
+[{package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.travis.yaml b/.travis.yaml
new file mode 100644
index 0000000..78d93d0
--- /dev/null
+++ b/.travis.yaml
@@ -0,0 +1,14 @@
+language: python
+
+python: "3.11"
+
+install:
+  - pip install -r requirements.txt
+  - pip install coveralls
+
+script:
+  - pytest -p no:warnings
+  - coverage run -m pytest -p no:warnings
+
+after_script:
+  - coveralls
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..35056f7
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,6 @@
+# elp ChangeLog
+
+All notable changes to this project will be documented in this file.
+
+## [0.1.0] - 2023-10-31
+- [x] 第一个版本
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..97c71f3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,39 @@
+.PHONY: init init-migration build run db-migrate test tox
+
+init:  build run
+	docker-compose exec web flask db init
+	docker-compose exec web flask db migrate
+	docker-compose exec web flask db upgrade
+	docker-compose exec web flask init
+	@echo "Init done, containers running"
+
+build:
+	docker-compose build
+
+run:
+	@mkdir -p db
+	docker-compose up -d
+
+db-init:
+	docker-compose exec web flask db init
+
+db-migrate:
+	docker-compose exec web flask db migrate
+
+db-upgrade:
+	docker-compose exec web flask db upgrade
+
+test:
+	docker-compose stop celery # stop celery to avoid conflicts with celery tests
+	docker-compose start rabbitmq redis # ensuring both redis and rabbitmq are started
+	docker-compose run -v $(PWD)/tests:/code/tests:ro web tox -e test
+	docker-compose start celery
+
+tox:
+	docker-compose stop celery # stop celery to avoid conflicts with celery tests
+	docker-compose start rabbitmq redis # ensuring both redis and rabbitmq are started
+	docker-compose run -v $(PWD)/tests:/code/tests:ro web tox -e y
+	docker-compose start celery
+
+lint:
+	docker-compose run web tox -e lint
-- 
GitLab