{"id":26936122,"url":"https://github.com/vecnet/simulation-manager","last_synced_at":"2025-04-02T12:32:35.121Z","repository":{"id":27944160,"uuid":"31436778","full_name":"vecnet/simulation-manager","owner":"vecnet","description":"VecNet Simulation Manager","archived":false,"fork":false,"pushed_at":"2015-06-24T21:39:40.000Z","size":239,"stargazers_count":1,"open_issues_count":14,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-03-27T03:40:11.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vecnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-27T20:03:14.000Z","updated_at":"2024-03-27T03:40:11.076Z","dependencies_parsed_at":"2022-08-07T13:01:22.710Z","dependency_job_id":null,"html_url":"https://github.com/vecnet/simulation-manager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vecnet%2Fsimulation-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vecnet%2Fsimulation-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vecnet%2Fsimulation-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vecnet%2Fsimulation-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vecnet","download_url":"https://codeload.github.com/vecnet/simulation-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815566,"owners_count":20838462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-02T12:31:53.252Z","updated_at":"2025-04-02T12:32:35.095Z","avatar_url":"https://github.com/vecnet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simulation Manager for VecNet\n## Initial Deployment\n1. Configure web server.\n\n2. Obtain copy of the source code.\n\t`git clone https://github.com/vecnet/simulation-manager.git`\n\n3. Setup virtual environment for Python 2.6 or 2.7.\n\n4. Activate the virtual environment and install requirements based on\n    the Python version:\n\n\tPython *2.7*: `pip install -r requirements.txt`\n\n\tPython *2.6*: `pip install -r requirements-py26.txt`\n\n5. Set project settings.  There are two groups of settings:\n\n  * Django settings which are specified by the DJANGO_SETTINGS_MODULE\n\tenvironment variable.  The available modules are in the settings/\n\tpackage:\n\n\t\u003esettings.development\n\n\t\u003esettings.production\n\n\tNOTE: if that environment variable is not set, then the manage.py\n\tscript uses the development settings by default.  Therefore, if you\n\tdon't set that environment variable and want to use the production\n\tsettings, then you must use the --settings option.\n\tFor example:\n\n\t`./manage.py --settings=settings.production`\n\n\tIf deploying a production instance of this project, then these\n\tadditional configuration steps are required:\n\n    * Create a secrets.py module in the settings/ package by running\n\t  this script in the virtual environment:\n\n\t  `python settings/make-secrets.py`\n\n    * If this is the first deployment on the current host, then the\n\t  host-specific settings for the current host need to be set.\n\t  These settings are:\n\n\t  \u003ePYTHON_FOR_SCRIPTS in settings/common.py\n\n\t  \u003eALLOWED_HOSTS      in settings/production.py\n\n  * Settings for the command-line scripts; these are in the\n\tsim_manager/scripts/conf.py module.  This module includes the paths\n\tto the various versions of simulation models available on the server.\n\n6. Create the database, and apply migrations for those Django applications\n    that have them:\n\n\t`./manage.py syncdb --noinput --migrate`\n\n    The --noinput option is required to prevent the creation of an admin user\n    during this step.  If this option is omitted, then the syncdb will fail\n    with an error about missing tables for Tastypie.  The Tastypie application\n    needs to be migrated before an admin user can be created.\n\n7. Create an admin user:\n\n   `./manage.py createsuperuser`\n\n8. Create the special user that's used by the command-line scripts to\n    interact with Simulation Manager's REST API to create and update database\n    records.\n\n\t`./manage.py scriptuser create`\n\n    For more information about that management command, enter:\n\n    `./manage.py scriptuser --help`\n\n## Working Directories\nBy default, the working directories for simulation groups and individual\nsimulations are created in the \"working-dirs\" subdirectory:\n\n\u003e working-dirs/sim-groups/\n\n\u003e working-dirs/simulations/\n\n## Run Local Tests\nSome of the tests use Django's live server.  It's highly recommended that\nyou specify a range of ports for the live test server.  If a test fails,\nthen the default port will remain assigned; subsequent test executions\nwill fail with errors about the port in use.  A range of ports is specified\nwith this environment variable:\n\n`export DJANGO_LIVE_TEST_SERVER_ADDRESS=\"localhost:8000-8010,8080,9200-9300\"`\n\nSpecify the Simulation Manager's application when running the tests:\n\n`./manage.py test sim_manager`\n\nIf \"sim_manager\" is omitted above, then manage.py will also run tests in the\nvecnet_utils project.  Some of them are currently broken.\n\nSome tests for the sim_manager application create output files, but they do\nso in special folders (named \"tests/output/\").  The working directories are\nnot used during tests.\n\n## Create a User for Each Client System\nEach client system that will be submitting simulations needs a user account.\nCreate the accounts in the Django admin interface. \n**Note**: Do **NOT** put spaces in a username; it'll break authentication \n(the authorization header is split on spaces).\n\nYou may want to consider creating a special user account for test purposes.\nThe remote tests (see below) can be run with any user name, but they default\nto using the \"test-user\" username.\n\nEach user has an API key that is automatically generated.  The keys are\navailable under the Tastypie application.  Copy a client's username and API\nkey to the client's secrets location.\n\n## Remote Tests\nThe remote_tests/ package contains tests that can be run with a remote server.\nIn other words, the tests interact with Simulation Manager on another system.\nThey are typically run from a developer's machine.\n\nThe package is independent of the rest of the project.  It does not depend\nupon the Django application.  It can be downloaded (e.g., svn checkout)\nby itself.  All it requires is the requests and vecnet.simulation libraries.\n\n*TODO*: Put a requirements.txt file into the package \u0026 its own README.txt ??\n\nHelp for the tests is available:\n\nPython *2.7*: `python -m remote_tests --help`\n\nPython *2.6*: `python -m remote_tests.main --help`\n\n**NOTE**: The main module in the remote_tests/ package has to be specified when using\n      Python 2.*6*.  In the examples below in this section, replace the package\n      name \"remote_tests\" with the module path \"remote_tests.main\".\n\nTo test authentication credentials, run the auth_tests module:\n\n`python -m remote_tests -u CLIENT_USERNAME -k $API_KEY -s client.server.com:8080 auth_tests`\n\nThere is a module for simple mock simulations using a Mock simulation model\n(which is available on all deployments):\n\n`python -m remote_tests -u CLIENT_USERNAME -k $API_KEY -s client.server.com:8080 mock_tests`\n\n**NOTE**: These tests are partially done; they don't check everything.\n\n## Updating a Deployment (with newer source code)\n1. Obtain the latest version of the source code.\n\t`git clone https://github.com/vecnet/simulation-manager.git`\n\n2. Create any new database tables:\n\n\t`./manage.py syncdb`\n\n\t**Note**: this project uses the South package for database migrations.  South\n          modifies the `syncdb` command so it only runs on the installed\n          applications that are not configured for database migrations (e.g.,\n          tastypie).\n\n2. Check if there are database migrations by reviewing the list of known\n    migrations:\n\n\t`./manage.py migrate --list`\n\n\tMigrations that have been applied are listed as \"(*)\", so you're looking\n    for migrations that have not yet been applied, which are listed as \"( )\".\n\n3. If there are outstanding migrations for the sim_manager application, apply\n    them:\n\n\t`./manage.py migrate sim_manager`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvecnet%2Fsimulation-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvecnet%2Fsimulation-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvecnet%2Fsimulation-manager/lists"}