diff --git a/.gitignore b/.gitignore index 980fbab9c..67e57d23c 100644 --- a/.gitignore +++ b/.gitignore @@ -75,11 +75,11 @@ test-bin/ aimmo-game/.hypothesis # Unity Build -players/static/unity/** +aimmo/static/unity/** # Frontend generated files -players/static/react/ -players/templates/players/game_ide.html +aimmo/static/react/ +aimmo/templates/players/game_ide.html # Mac Generated Files .DS_Store diff --git a/MANIFEST.in b/MANIFEST.in index 567570b8d..c81452245 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -graft players/static -graft players/templates +graft aimmo/static +graft aimmo/templates diff --git a/aimmo-game-creator/service.py b/aimmo-game-creator/service.py index 0617be6ce..158583c63 100755 --- a/aimmo-game-creator/service.py +++ b/aimmo-game-creator/service.py @@ -9,7 +9,7 @@ def main(): logging.basicConfig(level=logging.DEBUG) game_manager_class = GAME_MANAGERS[os.environ.get('GAME_MANAGER', 'local')] game_manager = game_manager_class(os.environ.get('GAME_API_URL', - 'http://localhost:8000/players/api/games/')) + 'http://localhost:8000/aimmo/api/games/')) game_manager.run() diff --git a/aimmo-game-worker/test-initialise.py b/aimmo-game-worker/test-initialise.py index 9a6793ab5..45158d3fd 100755 --- a/aimmo-game-worker/test-initialise.py +++ b/aimmo-game-worker/test-initialise.py @@ -8,7 +8,7 @@ if len(sys.argv) > 1: avatar_file = sys.argv[1] else: - avatar_file = '../players/avatar_examples/dumb_avatar.py' + avatar_file = '../aimmo/avatar_examples/dumb_avatar.py' with open(avatar_file) as avatar_fileobj: avatar_data = avatar_fileobj.read() diff --git a/aimmo-game/service.py b/aimmo-game/service.py index 45c646cd3..75ee2ee72 100644 --- a/aimmo-game/service.py +++ b/aimmo-game/service.py @@ -104,7 +104,7 @@ def run_game(port): print("Running game...") settings = pickle.loads(os.environ['settings']) - api_url = os.environ.get('GAME_API_URL', 'http://localhost:8000/players/api/games/') + api_url = os.environ.get('GAME_API_URL', 'http://localhost:8000/aimmo/api/games/') generator = getattr(map_generator, settings['GENERATOR'])(settings) player_manager = AvatarManager() game_state = generator.get_game_state(player_manager) diff --git a/players/__init__.py b/aimmo/__init__.py similarity index 100% rename from players/__init__.py rename to aimmo/__init__.py diff --git a/players/_version.py b/aimmo/_version.py similarity index 99% rename from players/_version.py rename to aimmo/_version.py index ebb3b9ed2..3b184e05f 100644 --- a/players/_version.py +++ b/aimmo/_version.py @@ -38,7 +38,7 @@ def get_config(): cfg.style = "pep440" cfg.tag_prefix = "" cfg.parentdir_prefix = "aimmo-" - cfg.versionfile_source = "players/_version.py" + cfg.versionfile_source = "aimmo/_version.py" cfg.verbose = False return cfg diff --git a/players/admin.py b/aimmo/admin.py similarity index 100% rename from players/admin.py rename to aimmo/admin.py diff --git a/players/app_settings.py b/aimmo/app_settings.py similarity index 100% rename from players/app_settings.py rename to aimmo/app_settings.py diff --git a/players/autoconfig.py b/aimmo/autoconfig.py similarity index 99% rename from players/autoconfig.py rename to aimmo/autoconfig.py index cd0712208..6128af460 100644 --- a/players/autoconfig.py +++ b/aimmo/autoconfig.py @@ -34,7 +34,7 @@ # copyright notice and these terms. You must not misrepresent the origins of this # program; modified versions of the program must be marked as such and not # identified as the original program. -'''Players autoconfig''' +'''aimmo autoconfig''' DEFAULT_SETTINGS = { 'AUTOCONFIG_INDEX_VIEW': 'aimmo/home', diff --git a/players/avatar_examples/__init__.py b/aimmo/avatar_examples/__init__.py similarity index 100% rename from players/avatar_examples/__init__.py rename to aimmo/avatar_examples/__init__.py diff --git a/players/avatar_examples/attacking_avatar.py b/aimmo/avatar_examples/attacking_avatar.py similarity index 100% rename from players/avatar_examples/attacking_avatar.py rename to aimmo/avatar_examples/attacking_avatar.py diff --git a/players/avatar_examples/dumb_avatar.py b/aimmo/avatar_examples/dumb_avatar.py similarity index 100% rename from players/avatar_examples/dumb_avatar.py rename to aimmo/avatar_examples/dumb_avatar.py diff --git a/players/avatar_examples/health_seeker_avatar.py b/aimmo/avatar_examples/health_seeker_avatar.py similarity index 100% rename from players/avatar_examples/health_seeker_avatar.py rename to aimmo/avatar_examples/health_seeker_avatar.py diff --git a/players/avatar_examples/winner_avatar.py b/aimmo/avatar_examples/winner_avatar.py similarity index 100% rename from players/avatar_examples/winner_avatar.py rename to aimmo/avatar_examples/winner_avatar.py diff --git a/players/forms.py b/aimmo/forms.py similarity index 94% rename from players/forms.py rename to aimmo/forms.py index 1a5a414f4..0a023a0d6 100644 --- a/players/forms.py +++ b/aimmo/forms.py @@ -1,6 +1,6 @@ from django.forms import ModelForm -from players.models import Game +from aimmo.models import Game class AddGameForm(ModelForm): diff --git a/players/game_renderer.py b/aimmo/game_renderer.py similarity index 97% rename from players/game_renderer.py rename to aimmo/game_renderer.py index 07e29ed31..3ae0fdd7d 100644 --- a/players/game_renderer.py +++ b/aimmo/game_renderer.py @@ -3,7 +3,7 @@ """ from django.shortcuts import render -from players import app_settings +from aimmo import app_settings def render_game(request, game): diff --git a/players/management/__init__.py b/aimmo/management/__init__.py similarity index 100% rename from players/management/__init__.py rename to aimmo/management/__init__.py diff --git a/players/management/commands/__init__.py b/aimmo/management/commands/__init__.py similarity index 100% rename from players/management/commands/__init__.py rename to aimmo/management/commands/__init__.py diff --git a/players/management/commands/delete_generated_players.py b/aimmo/management/commands/delete_generated_players.py similarity index 100% rename from players/management/commands/delete_generated_players.py rename to aimmo/management/commands/delete_generated_players.py diff --git a/players/management/commands/generate_players.py b/aimmo/management/commands/generate_players.py similarity index 98% rename from players/management/commands/generate_players.py rename to aimmo/management/commands/generate_players.py index 3c310013a..b7bf5bc0c 100644 --- a/players/management/commands/generate_players.py +++ b/aimmo/management/commands/generate_players.py @@ -7,7 +7,7 @@ from importlib import import_module from django.conf import settings from django.contrib.auth.models import User -from players.views import code as code_view +from aimmo.views import code as code_view def _nth_dirname(path, n): diff --git a/players/migrations/0001_initial.py b/aimmo/migrations/0001_initial.py similarity index 100% rename from players/migrations/0001_initial.py rename to aimmo/migrations/0001_initial.py diff --git a/players/migrations/0002_auto_20160601_1914.py b/aimmo/migrations/0002_auto_20160601_1914.py similarity index 90% rename from players/migrations/0002_auto_20160601_1914.py rename to aimmo/migrations/0002_auto_20160601_1914.py index 02a51b18e..2dca33fb1 100644 --- a/players/migrations/0002_auto_20160601_1914.py +++ b/aimmo/migrations/0002_auto_20160601_1914.py @@ -7,7 +7,7 @@ class Migration(migrations.Migration): dependencies = [ - ('players', '0001_initial'), + ('aimmo', '0001_initial'), ] operations = [ diff --git a/players/migrations/0003_auto_20160802_1418.py b/aimmo/migrations/0003_auto_20160802_1418.py similarity index 81% rename from players/migrations/0003_auto_20160802_1418.py rename to aimmo/migrations/0003_auto_20160802_1418.py index 643048009..d47e4208c 100644 --- a/players/migrations/0003_auto_20160802_1418.py +++ b/aimmo/migrations/0003_auto_20160802_1418.py @@ -4,13 +4,13 @@ from django.conf import settings from django.db import migrations, models, transaction, IntegrityError -import players.models +import aimmo.models def migrate_data_forward(apps, schema_editor): - Player = apps.get_model("players", "Player") - Avatar = apps.get_model("players", "Avatar") - Game = apps.get_model("players", "Game") + Player = apps.get_model("aimmo", "Player") + Avatar = apps.get_model("aimmo", "Avatar") + Game = apps.get_model("aimmo", "Game") if Player.objects.count() == 0: return @@ -23,8 +23,8 @@ def migrate_data_forward(apps, schema_editor): def migrate_data_backward(apps, schema_editor): - Player = apps.get_model("players", "Player") - Avatar = apps.get_model("players", "Avatar") + Player = apps.get_model("aimmo", "Player") + Avatar = apps.get_model("aimmo", "Avatar") if Avatar.objects.count() == 0: return @@ -42,7 +42,7 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('players', '0002_auto_20160601_1914'), + ('aimmo', '0002_auto_20160601_1914'), ] operations = [ @@ -51,7 +51,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('code', models.TextField()), - ('auth_token', models.CharField(default=players.models.generate_auth_token, max_length=24)), + ('auth_token', models.CharField(default=aimmo.models.generate_auth_token, max_length=24)), ], ), migrations.CreateModel( @@ -59,7 +59,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=100)), - ('auth_token', models.CharField(default=players.models.generate_auth_token, max_length=24)), + ('auth_token', models.CharField(default=aimmo.models.generate_auth_token, max_length=24)), ('public', models.BooleanField(default=True)), ('can_play', models.ManyToManyField(related_name='playable_games', to=settings.AUTH_USER_MODEL)), ('owner', models.ForeignKey(related_name='owned_games', to=settings.AUTH_USER_MODEL, null=True)), @@ -68,7 +68,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='avatar', name='game', - field=models.ForeignKey(to='players.Game'), + field=models.ForeignKey(to='aimmo.Game'), ), migrations.AddField( model_name='avatar', diff --git a/players/migrations/0004_auto_20160808_1511.py b/aimmo/migrations/0004_auto_20160808_1511.py similarity index 96% rename from players/migrations/0004_auto_20160808_1511.py rename to aimmo/migrations/0004_auto_20160808_1511.py index 57e3903f6..6e5f5089b 100644 --- a/players/migrations/0004_auto_20160808_1511.py +++ b/aimmo/migrations/0004_auto_20160808_1511.py @@ -7,7 +7,7 @@ class Migration(migrations.Migration): dependencies = [ - ('players', '0003_auto_20160802_1418'), + ('aimmo', '0003_auto_20160802_1418'), ] operations = [ diff --git a/players/migrations/0005_auto_20160808_1545.py b/aimmo/migrations/0005_auto_20160808_1545.py similarity index 94% rename from players/migrations/0005_auto_20160808_1545.py rename to aimmo/migrations/0005_auto_20160808_1545.py index 8d1983410..6b4e037a1 100644 --- a/players/migrations/0005_auto_20160808_1545.py +++ b/aimmo/migrations/0005_auto_20160808_1545.py @@ -9,7 +9,7 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('players', '0004_auto_20160808_1511'), + ('aimmo', '0004_auto_20160808_1511'), ] operations = [ @@ -43,7 +43,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='levelattempt', name='game', - field=models.OneToOneField(to='players.Game'), + field=models.OneToOneField(to='aimmo.Game'), ), migrations.AddField( model_name='levelattempt', diff --git a/players/migrations/0006_game_static_data.py b/aimmo/migrations/0006_game_static_data.py similarity index 88% rename from players/migrations/0006_game_static_data.py rename to aimmo/migrations/0006_game_static_data.py index 027e4519f..a50ff9716 100644 --- a/players/migrations/0006_game_static_data.py +++ b/aimmo/migrations/0006_game_static_data.py @@ -7,7 +7,7 @@ class Migration(migrations.Migration): dependencies = [ - ('players', '0005_auto_20160808_1545'), + ('aimmo', '0005_auto_20160808_1545'), ] operations = [ diff --git a/players/migrations/0007_auto_20180515_1300.py b/aimmo/migrations/0007_auto_20180515_1300.py similarity index 95% rename from players/migrations/0007_auto_20180515_1300.py rename to aimmo/migrations/0007_auto_20180515_1300.py index 85d60c242..87d0daed9 100644 --- a/players/migrations/0007_auto_20180515_1300.py +++ b/aimmo/migrations/0007_auto_20180515_1300.py @@ -7,7 +7,7 @@ class Migration(migrations.Migration): dependencies = [ - ('players', '0006_game_static_data'), + ('aimmo', '0006_game_static_data'), ] operations = [ diff --git a/players/migrations/__init__.py b/aimmo/migrations/__init__.py similarity index 100% rename from players/migrations/__init__.py rename to aimmo/migrations/__init__.py diff --git a/players/models.py b/aimmo/models.py similarity index 99% rename from players/models.py rename to aimmo/models.py index 95c31786f..6fa9dfde6 100644 --- a/players/models.py +++ b/aimmo/models.py @@ -4,7 +4,7 @@ from django.contrib.auth.models import User from django.db import models -from players import app_settings +from aimmo import app_settings GAME_GENERATORS = [ ('Main', 'Open World'), # Default diff --git a/players/permissions.py b/aimmo/permissions.py similarity index 100% rename from players/permissions.py rename to aimmo/permissions.py diff --git a/players/static/css/watch.css b/aimmo/static/css/watch.css similarity index 100% rename from players/static/css/watch.css rename to aimmo/static/css/watch.css diff --git a/players/static/images/aimmo_logo.svg b/aimmo/static/images/aimmo_logo.svg similarity index 100% rename from players/static/images/aimmo_logo.svg rename to aimmo/static/images/aimmo_logo.svg diff --git a/players/static/images/cfl_horizontal_logo.svg b/aimmo/static/images/cfl_horizontal_logo.svg similarity index 100% rename from players/static/images/cfl_horizontal_logo.svg rename to aimmo/static/images/cfl_horizontal_logo.svg diff --git a/players/templates/players/add_game.html b/aimmo/templates/players/add_game.html similarity index 100% rename from players/templates/players/add_game.html rename to aimmo/templates/players/add_game.html diff --git a/players/templates/players/base.html b/aimmo/templates/players/base.html similarity index 100% rename from players/templates/players/base.html rename to aimmo/templates/players/base.html diff --git a/players/templates/players/dropdown.html b/aimmo/templates/players/dropdown.html similarity index 100% rename from players/templates/players/dropdown.html rename to aimmo/templates/players/dropdown.html diff --git a/players/templates/players/home.html b/aimmo/templates/players/home.html similarity index 100% rename from players/templates/players/home.html rename to aimmo/templates/players/home.html diff --git a/players/templates/players/statistics.html b/aimmo/templates/players/statistics.html similarity index 100% rename from players/templates/players/statistics.html rename to aimmo/templates/players/statistics.html diff --git a/players/templates/registration/login.html b/aimmo/templates/registration/login.html similarity index 100% rename from players/templates/registration/login.html rename to aimmo/templates/registration/login.html diff --git a/players/templates/registration/success_logout.html b/aimmo/templates/registration/success_logout.html similarity index 100% rename from players/templates/registration/success_logout.html rename to aimmo/templates/registration/success_logout.html diff --git a/players/templatetags/__init__.py b/aimmo/templatetags/__init__.py similarity index 100% rename from players/templatetags/__init__.py rename to aimmo/templatetags/__init__.py diff --git a/players/templatetags/players_utils.py b/aimmo/templatetags/players_utils.py similarity index 92% rename from players/templatetags/players_utils.py rename to aimmo/templatetags/players_utils.py index 98d11aaac..0232e9dd7 100644 --- a/players/templatetags/players_utils.py +++ b/aimmo/templatetags/players_utils.py @@ -1,6 +1,6 @@ from django import template -from players import app_settings +from aimmo import app_settings register = template.Library() diff --git a/players/tests.py b/aimmo/tests.py similarity index 99% rename from players/tests.py rename to aimmo/tests.py index e9645470e..a580bf727 100644 --- a/players/tests.py +++ b/aimmo/tests.py @@ -6,7 +6,7 @@ from django.core.urlresolvers import reverse from django.test import Client, TestCase -from players import models, app_settings +from aimmo import models, app_settings app_settings.GAME_SERVER_URL_FUNCTION = lambda game_id: ('base %s' % game_id, 'path %s' % game_id) app_settings.GAME_SERVER_PORT_FUNCTION = lambda game_id: 0 diff --git a/players/urls.py b/aimmo/urls.py similarity index 98% rename from players/urls.py rename to aimmo/urls.py index 839dc4e36..0ee1e17de 100644 --- a/players/urls.py +++ b/aimmo/urls.py @@ -4,7 +4,7 @@ from django.views.generic import TemplateView from django.views.generic import RedirectView -from players import views +from aimmo import views from app_settings import preview_user_required urlpatterns = [ diff --git a/players/views.py b/aimmo/views.py similarity index 99% rename from players/views.py rename to aimmo/views.py index a9888711b..5764b57f9 100644 --- a/players/views.py +++ b/aimmo/views.py @@ -12,7 +12,7 @@ from django.middleware.csrf import get_token from models import Avatar, Game, LevelAttempt -from players import forms, game_renderer +from aimmo import forms, game_renderer from app_settings import get_users_for_new_game, preview_user_required LOGGER = logging.getLogger(__name__) diff --git a/aimmo_runner/minikube.py b/aimmo_runner/minikube.py index fa783f235..fd32101ef 100644 --- a/aimmo_runner/minikube.py +++ b/aimmo_runner/minikube.py @@ -65,7 +65,7 @@ def create_creator_yaml(): """ orig_path = os.path.join(BASE_DIR, 'aimmo-game-creator', 'rc-aimmo-game-creator.yaml') with open(orig_path) as orig_file: - content = yaml.safe_load(orig_file.read().replace('latest', 'test').replace('REPLACE_ME', 'http://%s:8000/players/api/games/' % get_ip())) + content = yaml.safe_load(orig_file.read().replace('latest', 'test').replace('REPLACE_ME', 'http://%s:8000/aimmo/api/games/' % get_ip())) return content diff --git a/aimmo_runner/setup.cfg b/aimmo_runner/setup.cfg index 278b4dc1e..6f708d394 100644 --- a/aimmo_runner/setup.cfg +++ b/aimmo_runner/setup.cfg @@ -7,7 +7,7 @@ max-line-length = 160 [versioneer] VCS = git style = pep440-pre -versionfile_source = ../players/_version.py -versionfile_build = ../players/_version.py +versionfile_source = ../aimmo/_version.py +versionfile_build = ../aimmo/_version.py tag_prefix = parentdir_prefix = aimmo- diff --git a/aimmo_runner/tests/test_minikube_runner.py b/aimmo_runner/tests/test_minikube_runner.py index 47c506ab8..4a755ce09 100644 --- a/aimmo_runner/tests/test_minikube_runner.py +++ b/aimmo_runner/tests/test_minikube_runner.py @@ -16,4 +16,4 @@ def test_game_creator_function_creates_correct_game_url(self, mocked_get_ip_func """ created_yaml = create_creator_yaml() self.assertEqual(created_yaml['spec']['template']['spec']['containers'][0]['env'][1]['value'], - 'http://127.0.0.1:8000/players/api/games/') + 'http://127.0.0.1:8000/aimmo/api/games/') diff --git a/all_tests.py b/all_tests.py index fd0a61173..75adc28c6 100755 --- a/all_tests.py +++ b/all_tests.py @@ -33,7 +33,7 @@ def main(): def run_tests(compute_coverage): def app_name(app): - return 'players' if app == '' else app + return 'aimmo' if app == '' else app failed_apps = [] for app in APPS: diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 6e84b8285..70f72180e 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -6,7 +6,7 @@ This section describes the whole game architecture and how things are structured ## Components -[The UI (`players` directory)](ui/README.md) +[The UI (`aimmo` directory)](ui/README.md) A Django app used for the front-end and database interaction. There are static Unity build files to render the game in browser. diff --git a/docs/architecture/ui/README.md b/docs/architecture/ui/README.md index 52638c868..e7d5c8c0f 100644 --- a/docs/architecture/ui/README.md +++ b/docs/architecture/ui/README.md @@ -1,4 +1,4 @@ -## The UI (`players` directory) +## The UI (`aimmo` directory) --- diff --git a/docs/deployment/deployment-events.md b/docs/deployment/deployment-events.md index e27e21b8a..975c2524e 100644 --- a/docs/deployment/deployment-events.md +++ b/docs/deployment/deployment-events.md @@ -4,7 +4,7 @@ We use Travis for contiguous integration. Travis CI is the first step in our integration pipeline. Each time a push is made Travis runs all our tests and sends the coverage reports for display to [coveralls.io](https://coveralls.io/). -Our package Django app `players` is deployed to [Pypi](https://pypi.python.org/pypi/aimmo) and we use [Versioneer](https://github.com/warner/python-versioneer) for package versioning. +Our package Django app `aimmo` is deployed to [Pypi](https://pypi.python.org/pypi/aimmo) and we use [Versioneer](https://github.com/warner/python-versioneer) for package versioning. The rest of the components are Dockerized. Travis CI automatically recognizes the **Dockerfiles** inside of each of the modules and pushes the newly created images to the **Docker Hub Registry**. Each of the components are then pulled automatically by the Google Cloud Container Engine. diff --git a/docs/testing/test-plan.md b/docs/testing/test-plan.md index 0a7449de2..a66f50b64 100644 --- a/docs/testing/test-plan.md +++ b/docs/testing/test-plan.md @@ -17,12 +17,12 @@ **Prior to playing the game:** * The level exists already. Check it by navigating to the Watch->Level. * If required, you can login using your details (admin:admin default). -* You are at the correct URL (/players/watch_level/1/). +* You are at the correct URL (/aimmo/watch_level/1/). * It consists of **_five_** square boxes lined horizontally. The leftmost is at (-2,0), the right most at (2,0). * There is no player on the screen. Nothing is happening. **Programming the game:** -* Program the game (Program-> Level1) and end up in the correct URL (players/program_level/1/). +* Program the game (Program-> Level1) and end up in the correct URL (aimmo/program_level/1/). * Ensure the code will be able to move the character to the right 4 times. Default code will suffice (see below to copy). * Click the save button. Now go to Watch->Level1 via the menu (or press the Watch hotlink above the editor). * See the character moving. It should stop when it gets to red box at (2,0). @@ -43,7 +43,7 @@ class Avatar(object): ### Check the following: **Prior to playing the game:** * Ensure there are no custom games running (Watch menu). -* Go to Program->Create a new game (/players/games/new). Select any name, select yourself in the 'Can Play' menu. +* Go to Program->Create a new game (/aimmo/games/new). Select any name, select yourself in the 'Can Play' menu. * Ensure 'Generator' is set to "Open World". Save, watch. * A grid should show with an avatar moving around randomly. * The score location should move randomly from time to time (depending on settings). diff --git a/example_project/example_project/settings.py b/example_project/example_project/settings.py index b002646c6..b66a2f680 100644 --- a/example_project/example_project/settings.py +++ b/example_project/example_project/settings.py @@ -69,7 +69,7 @@ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', - 'players', + 'aimmo', 'django_forms_bootstrap', ) @@ -95,9 +95,9 @@ } } -LOGIN_URL = '/players/accounts/login/' +LOGIN_URL = '/aimmo/accounts/login/' -LOGIN_REDIRECT_URL = '/players/' +LOGIN_REDIRECT_URL = '/aimmo/' MIDDLEWARE_CLASSES = [ 'django.contrib.sessions.middleware.SessionMiddleware', diff --git a/game_frontend/djangoBundler.js b/game_frontend/djangoBundler.js index 0a387959b..d6c0c792d 100644 --- a/game_frontend/djangoBundler.js +++ b/game_frontend/djangoBundler.js @@ -4,7 +4,7 @@ const shell = require('shelljs') const fs = require('fs') const file = Path.join(__dirname, './index.html') -const outDir = Path.join(__dirname, '../players/static/react') +const outDir = Path.join(__dirname, '../aimmo/static/react') const options = { outDir, @@ -16,7 +16,7 @@ const options = { cache: process.env.NODE_ENV === 'production' } -const templateFolder = Path.resolve(Path.join(__dirname, '../players/templates/players')) +const templateFolder = Path.resolve(Path.join(__dirname, '../aimmo/templates/players')) const bundler = new Bundler(file, options) diff --git a/game_frontend/src/redux/api/constants.js b/game_frontend/src/redux/api/constants.js index 081eb89ca..5dee3c7f8 100644 --- a/game_frontend/src/redux/api/constants.js +++ b/game_frontend/src/redux/api/constants.js @@ -1 +1 @@ -export const API_PATH = '/players/api/' +export const API_PATH = '/aimmo/api/' diff --git a/game_frontend/src/redux/features/Editor/epics.js b/game_frontend/src/redux/features/Editor/epics.js index fc0e6e2e0..13f1aacf6 100644 --- a/game_frontend/src/redux/features/Editor/epics.js +++ b/game_frontend/src/redux/features/Editor/epics.js @@ -26,7 +26,7 @@ const postCodeEpic = (action$, store, { api }) => .pipe( ofType(types.POST_CODE_REQUEST), api.post( - `/players/api/code/${store.getState().game.connectionParameters.id}/`, + `/aimmo/api/code/${store.getState().game.connectionParameters.id}/`, () => ({ code: store.getState().editor.code }) ), map(response => actions.postCodeReceived()), diff --git a/integration_tests/tests/connection_api.py b/integration_tests/tests/connection_api.py index d37043be8..2589794a4 100644 --- a/integration_tests/tests/connection_api.py +++ b/integration_tests/tests/connection_api.py @@ -110,7 +110,7 @@ def _log_in_as_a_superuser(): log a user in with the correct credentials and take care of all CSRF token exchange. """ - url = 'http://localhost:8000/players/accounts/login/' + url = 'http://localhost:8000/aimmo/accounts/login/' assert(is_server_healthy(url)) logging.debug("Creating session...") @@ -142,7 +142,7 @@ def create_custom_game_default_settings(name): """ csrftoken, session = _log_in_as_a_superuser() - url = 'http://localhost:8000/players/games/new/' + url = 'http://localhost:8000/aimmo/games/new/' print("is server healthy? ", is_server_healthy(url)) @@ -164,7 +164,7 @@ def create_custom_game_default_settings(name): "start_width": "11", } - headers = {'X-CSRFToken': csrftoken, 'Referer': 'http://localhost:8000/players/accounts/login/'} + headers = {'X-CSRFToken': csrftoken, 'Referer': 'http://localhost:8000/aimmo/accounts/login/'} response = session.post(url, data=data, headers=headers) diff --git a/setup.cfg b/setup.cfg index dabdbb472..12d4eb5db 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,11 +2,11 @@ universal = 1 [coverage:run] -source = players, aimmo-game, aimmo-game-worker, aimmo-game-creator +source = aimmo, aimmo-game, aimmo-game-worker, aimmo-game-creator [coverage:report] omit = - players/_version.py + aimmo/_version.py *test-* */tests/* */python?.?/* @@ -19,7 +19,7 @@ max-line-length = 160 [versioneer] VCS = git style = pep440-pre -versionfile_source = players/_version.py -versionfile_build = players/_version.py +versionfile_source = aimmo/_version.py +versionfile_build = aimmo/_version.py tag_prefix = parentdir_prefix = aimmo- diff --git a/test_settings.py b/test_settings.py index 15993141d..fe7a9e8d2 100644 --- a/test_settings.py +++ b/test_settings.py @@ -9,7 +9,7 @@ INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', - 'players', + 'aimmo', 'integration_tests', 'aimmo_runner', ]