Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
122 changed files
with
1,273 additions
and
630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.coveragerc | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Other ignores | ||
.github/ | ||
.idea/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
.editorconfig | ||
.env | ||
.travis.yml | ||
AUTHORS | ||
CODE_OF_CONDUCT.md | ||
dev | ||
eventsourcing/tests/djangoproject/db.sqlite3 | ||
README.md | ||
README_example_with_axon.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
COMPOSE_FILE=dev/docker-compose.yaml | ||
COMPOSE_PROJECT_NAME=eventsourcing | ||
|
||
CASSANDRA_HOSTS=127.0.0.1 | ||
|
||
MYSQL_HOST=127.0.0.1 | ||
MYSQL_DATABASE=eventsourcing | ||
MYSQL_PASSWORD=eventsourcing | ||
MYSQL_ROOT_PASSWORD=eventsourcing_root | ||
MYSQL_USER=eventsourcing | ||
|
||
POSTGRES_HOST=127.0.0.1 | ||
POSTGRES_PASSWORD=eventsourcing | ||
POSTGRES_USER=eventsourcing | ||
|
||
REDIS_HOST=127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# applied imports sorting and black formatting | ||
1190c2fe4cf3f9b233b61f8f9a857c1007d11345 | ||
6f5bf49327b66055f1ff865285543d070856c602 | ||
53cfd70288051457999074479ddbfbaecb052f10 | ||
6d9ec698a6310b701ffbcdf987ff5a3675f6e943 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
python: | ||
version: 3 | ||
pip_install: true | ||
extra_requirements: | ||
- docs | ||
version: 3 | ||
pip_install: true | ||
extra_requirements: | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
.EXPORT_ALL_VARIABLES: | ||
DOTENV_FILE ?= .env | ||
|
||
-include $(DOTENV_FILE) | ||
|
||
.PHONY: install | ||
install: | ||
CASS_DRIVER_NO_CYTHON=1 | ||
@pip install -e ".[cassandra,sqlalchemy,axonserver,axon,ray,django,testing,dev,docs]" | ||
|
||
.PHONY: docker-pull | ||
docker-pull: | ||
@docker-compose pull | ||
|
||
.PHONY: docker-build | ||
docker-build: | ||
@docker-compose build | ||
|
||
.PHONY: docker-up | ||
docker-up: | ||
@docker-compose up -d | ||
@docker-compose ps | ||
|
||
.PHONY: docker-stop | ||
docker-stop: | ||
@docker-compose stop | ||
|
||
.PHONY: docker-down | ||
docker-down: | ||
@docker-compose down -v --remove-orphans | ||
|
||
|
||
.PHONY: docker-logs | ||
docker-logs: | ||
@docker-compose logs --follow --tail=1000 | ||
|
||
|
||
.PHONY: lint-black | ||
lint-black: | ||
@black --check --diff . | ||
|
||
.PHONY: lint-flake8 | ||
lint-flake8: | ||
@flake8 eventsourcing | ||
|
||
.PHONY: lint-isort | ||
lint-isort: | ||
@isort --check-only --diff --recursive . | ||
|
||
.PHONY: lint-mypy | ||
lint-mypy: | ||
@mypy --ignore-missing-imports eventsourcing | ||
|
||
.PHONY: lint-dockerfile | ||
lint-dockerfile: | ||
@docker run --rm -i replicated/dockerfilelint:ad65813 < ./dev/Dockerfile_eventsourcing_requirements | ||
|
||
.PHONY: lint | ||
lint: lint-black lint-flake8 lint-isort lint-mypy lint-dockerfile | ||
|
||
|
||
.PHONY: fmt-isort | ||
fmt-isort: | ||
@isort -y --recursive . | ||
|
||
.PHONY: fmt-black | ||
fmt-black: | ||
@black . | ||
|
||
.PHONY: fmt | ||
fmt: fmt-black fmt-isort | ||
|
||
|
||
.PHONY: test | ||
test: | ||
@coverage run \ | ||
--concurrency=multiprocessing \ | ||
-m unittest discover \ | ||
eventsourcing.tests -vv --failfast | ||
@coverage combine | ||
@coverage report | ||
@coverage html | ||
|
||
|
||
.PHONY: quick-test | ||
quick-test: | ||
QUICK_TESTS_ONLY=1 python -m unittest discover eventsourcing.tests -vv | ||
|
||
|
||
.PHONY: docs | ||
docs: | ||
cd docs && make html | ||
|
||
|
||
.PHONY: brew-services-start | ||
brew-services-start: | ||
brew services start mysql | ||
brew services start postgresql | ||
brew services start redis | ||
~/axonserver/axonserver.jar & | ||
cassandra -f & | ||
|
||
|
||
.PHONY: brew-services-stop | ||
brew-services-stop: | ||
brew services stop mysql | ||
brew services stop postgresql | ||
brew services stop redis | ||
pkill -15 java | ||
|
||
|
||
.PHONY: prepare-distribution | ||
prepare-distribution: | ||
python ./dev/prepare-distribution.py | ||
|
||
|
||
.PHONY: release-distribution | ||
release-distribution: | ||
python ./dev/release-distribution.py | ||
|
||
|
||
.PHONY: test-distribution | ||
test-distribution: | ||
python ./dev/test-released-distribution.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
This document describes how to setup MacOS with databases needed to run the test suite: | ||
|
||
- MySQL | ||
- PostgreSQL | ||
- Redis | ||
- Cassandra | ||
- Axon Server | ||
|
||
|
||
To setup MySQL: | ||
|
||
$ brew install mysql | ||
$ brew services start mysql | ||
$ mysql -u root | ||
mysql> CREATE DATABASE EVENTSOURCING; | ||
mysql> CREATE USER 'eventsourcing'@'localhost' IDENTIFIED BY 'eventsourcing'; | ||
mysql> GRANT ALL PRIVILEGES ON eventsourcing.* TO 'eventsourcing'@'localhost'; | ||
|
||
To setup PostgreSQL: | ||
|
||
$ brew install postgresql | ||
$ brew services start postgresql | ||
|
||
|
||
To setup Redis: | ||
|
||
$ brew install redis | ||
$ brew services start redis | ||
|
||
|
||
To setup Cassandra: | ||
|
||
$ brew install cassandra | ||
$ brew services start cassandra | ||
|
||
If that doesn't actually start Cassandra, then try this in a terminal: | ||
$ cassandra -f | ||
|
||
|
||
To setup Axon: | ||
$ ./dev/download_axon_server.sh | ||
$ ./axonserver/axonserver.jar | ||
|
||
|
||
After this, the databases can be stopped with: | ||
|
||
$ make brew-services-stop | ||
|
||
|
||
The database can be started with: | ||
|
||
$ make brew-services-start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.