Commit cf77e1e4 authored by Siddhartha Laghuvarapu's avatar Siddhartha Laghuvarapu
Browse files

Merge branch 'add-utils-scripts' into 'master'

Add submission script and gitignore

See merge request siddhartha/neuralmmo-starter-kit!3
parents 968d719c 1c9f25e0
.gradle/
*.pyc
.idea
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
Metadata-Version: 1.0
Name: gym-neuralmmo
Version: 0.0.1
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
setup.py
gym_neuralmmo.egg-info/PKG-INFO
gym_neuralmmo.egg-info/SOURCES.txt
gym_neuralmmo.egg-info/dependency_links.txt
gym_neuralmmo.egg-info/requires.txt
gym_neuralmmo.egg-info/top_level.txt
\ No newline at end of file
#!/bin/bash
log_info() {
echo -e "\033[0;36m$@\033[0m"
}
log_success() {
echo -e "\033[0;32m$@\033[0m"
}
log_normal() {
echo -e "$@"
}
log_error() {
echo -e "\033[0;31m$@\033[0m"
}
#!/bin/bash
set -e
REPO_ROOT_DIR=$(git rev-parse --show-toplevel)
SCRIPTS_DIR="${REPO_ROOT_DIR}/utility"
source "${SCRIPTS_DIR}/logging.sh"
print_usage() {
cat << USAGE
Usage: ./utility/submit.sh "impala-ppo-v0.1"
USAGE
}
bad_remote_message() {
log_normal "AIcrowd remote not found"
log_error "Please run \`git remote add aicrowd git@gitlab.aicrowd.com:<username>/<repo>.git\` and rerun this command"
exit 1
}
check_remote() {
log_info Checking git remote settings...
bad_remotes=(
git@gitlab.aicrowd.com:neural-mmo/neural-mmo-starter-kit.git
http://gitlab.aicrowd.com/neural-mmo/neural-mmo-starter-kit.git
)
for bad_remote in $bad_remotes; do
if git remote -v | grep "$bad_remote" > /dev/null; then
bad_remote_message
fi
done
if ! git remote -v | grep "gitlab.aicrowd.com"; then
bad_remote_message
fi
}
setup_lfs() {
git lfs install
HTTPS_REMOTE=$(git remote -v | grep gitlab.aicrowd.com | head -1 | awk '{print $2}' | sed 's|git@gitlab.aicrowd.com:|https://gitlab.aicrowd.com|g')
git config lfs.$HTTPS_REMOTE/info/lfs.locksverify false
find . -type f -size +5M -exec git lfs track {} &> /dev/null \;
git add .gitattributes
}
setup_commits() {
REMOTE=$(git remote -v | grep gitlab.aicrowd.com | head -1 | awk '{print $1}')
TAG=$(echo "$@" | sed 's/ /-/g')
git add --all
git commit -m "Changes for submission-$TAG" || true # don't exit when no new commits are there
git tag -am "submission-$TAG" "submission-$TAG" || (log_error "There is another submission with the same description. Please give a different description." && exit 1)
git push -f $REMOTE master
git push -f $REMOTE "submission-$TAG"
}
submit() {
check_remote
setup_lfs "$@"
setup_commits "$@"
}
if [[ $# -lt 1 ]]; then
print_usage
exit 1
fi
submit "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment