-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: housekeeping #3
Open
RedRoserade
wants to merge
13
commits into
main
Choose a base branch
from
chore-housekeeping
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6ab55c4
chore: Add isort and configure black and pylint
RedRoserade 8c37be6
chore: Apply isort and black
RedRoserade f40d717
chore: Add file to ignore certain revisions
RedRoserade 49fd72d
chore: Split docker-compose config files into two to allow for local …
RedRoserade 7c634f7
chore: Update README.md to add links to pypi and other useful things
RedRoserade 5ba8d95
Add devcontainer-specific configuration
RedRoserade 56309c6
chore: Add mypy
RedRoserade 1e9c808
chore: Mypy in strict mode
RedRoserade 3d4c86c
chore: Add flake8
RedRoserade 9b2768c
chore: Add linting and testing on CI
RedRoserade 3fa5c9b
chore: Fix issues on CI
RedRoserade a475679
chore: Turn off matrix
RedRoserade 5f94b2a
chore: Use matrix again, to see if Docker only runs once
RedRoserade File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,17 @@ | ||
{ | ||
"result_backend": { | ||
"redis": { | ||
"url": "redis://redis:6379/0" | ||
} | ||
}, | ||
"state_backend": { | ||
"redis": { | ||
"url": "redis://redis:6379/0" | ||
} | ||
}, | ||
"broker": { | ||
"amqp": { | ||
"url": "amqp://rabbitmq:5672" | ||
} | ||
} | ||
} |
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,35 @@ | ||
version: "2.4" | ||
|
||
services: | ||
mognet: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
args: | ||
VARIANT: "3.8" | ||
INSTALL_NODE: "false" | ||
|
||
mem_limit: 4g | ||
cpus: 2 | ||
working_dir: /workspaces/project-mognet | ||
volumes: | ||
- ..:/workspaces/project-mognet:cached | ||
- vscode_server_data:/home/vscode/.vscode-server | ||
- cache:/home/vscode/.cache | ||
|
||
environment: | ||
- MOGNET_CONFIG_FILE=/workspaces/project-mognet/.devcontainer/config.json | ||
|
||
command: | ||
- bash | ||
- -c | ||
- | | ||
set -e | ||
sudo chown -R vscode:vscode /home/vscode/.vscode-server | ||
sudo chown -R vscode:vscode /home/vscode/.cache | ||
exec sleep infinity | ||
|
||
volumes: | ||
results_backend_data: {} | ||
vscode_server_data: {} | ||
cache: {} |
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,56 +1,30 @@ | ||
version: "2.4" | ||
|
||
services: | ||
mognet: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
args: | ||
VARIANT: "3.8" | ||
INSTALL_NODE: "false" | ||
|
||
mem_limit: 4g | ||
cpus: 2 | ||
working_dir: /workspaces/project-mognet | ||
volumes: | ||
- ..:/workspaces/project-mognet:cached | ||
- vscode_server_data:/home/vscode/.vscode-server | ||
- cache:/home/vscode/.cache | ||
|
||
command: | ||
- bash | ||
- -c | ||
- | | ||
set -e | ||
sudo chown -R vscode:vscode /home/vscode/.vscode-server | ||
sudo chown -R vscode:vscode /home/vscode/.cache | ||
exec sleep infinity | ||
|
||
redis: | ||
image: redis | ||
mem_limit: 128m | ||
mem_reservation: 32m | ||
cpus: 0.25 | ||
volumes: | ||
- results_backend_data:/data | ||
networks: | ||
default: | ||
aliases: | ||
- cps-results-backend | ||
ports: | ||
- 6379:6379 | ||
|
||
rabbitmq: | ||
image: rabbitmq:management | ||
mem_limit: 512m | ||
mem_limit: 1024m | ||
mem_reservation: 128m | ||
cpus: 0.5 | ||
cpus: 1 | ||
# Prevent huge memory usage by limiting the number | ||
# of file descriptors | ||
ulimits: | ||
nofile: | ||
soft: 8192 | ||
hard: 8192 | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
|
||
volumes: | ||
results_backend_data: {} | ||
vscode_server_data: {} | ||
cache: {} |
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,4 @@ | ||
[flake8] | ||
ignore = E501,W503 | ||
exclude = .git,__pycache__,docs/,build,dist,demo | ||
# max-complexity = 10 |
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,3 @@ | ||
# Apply black and isort to project | ||
# See https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html | ||
bc7b568fe0f925558718a71fdd42b5289a20cab8 |
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
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,49 @@ | ||
|
||
DOCKER_COMPOSE_FILE=.devcontainer/docker-compose.yaml | ||
|
||
.PHONY: format-black | ||
format-black: | ||
@poetry run black . | ||
|
||
.PHONY: format-isort | ||
format-isort: | ||
@poetry run isort . | ||
|
||
.PHONY: format | ||
format: format-isort format-black | ||
|
||
.PHONY: lint-isort | ||
lint-isort: | ||
@poetry run isort --check . | ||
|
||
.PHONY: lint-black | ||
lint-black: | ||
@poetry run black --check . | ||
|
||
lint-pylint: | ||
@poetry run pylint mognet | ||
|
||
lint-flake8: | ||
@poetry run flake8 | ||
|
||
lint-mypy: | ||
@poetry run mypy mognet | ||
|
||
.PHONY: lint | ||
lint: lint-isort lint-black lint-flake8 lint-pylint lint-mypy | ||
|
||
.PHONY: docker-up | ||
docker-up: | ||
@docker-compose \ | ||
-f $(DOCKER_COMPOSE_FILE) \ | ||
up -d | ||
|
||
.PHONY: docker-down | ||
docker-down: | ||
@docker-compose \ | ||
-f $(DOCKER_COMPOSE_FILE) \ | ||
down | ||
|
||
.PHONY: test | ||
test: | ||
@poetry run pytest test/ |
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
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this; it would be nice for the tests to wait for RabbitMQ to actually be ready. Also, for some reason the tests didn't do anything for 10 minutes on 3 runs, so maybe this should be disabled?
Suggestions welcome.