Skip to content
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

feat: add development flag to scripts/configure.py #511

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
node_modules/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -134,6 +135,9 @@ dmypy.json
# Pyre type checker
.pyre/

# vi
*.swp

# emacs
*~
\#*\#
Expand Down
6 changes: 4 additions & 2 deletions scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def add_tests(env, progress) -> List[Task]:

def install(os_deps=True, python_deps=True, web=True, restart_updater=False,
display=True, audiodetector=True, firmware=True, password=True,
progress=print_task_results) -> bool:
progress=print_task_results, development=False) -> bool:
""" Install and configure AmpliPi's dependencies """
# pylint: disable=too-many-return-statements
tasks = [Task('setup')]
Expand All @@ -893,7 +893,7 @@ def failed():
return False

env = _check_and_setup_platform()
if not env['platform_supported']:
if not env['platform_supported'] and not development:
tasks[0].output = f'untested platform: {platform.platform()}. Please fix this script and make a PR to github.com/micro-nova/AmpliPi'
else:
tasks[0].output = str(env)
Expand Down Expand Up @@ -980,6 +980,8 @@ def failed():
help="Flash the latest firmware")
parser.add_argument('--password', action='store_true', default=False,
help="Generate and set a new default password for the pi user.")
parser.add_argument('--development', action='store_true', default=False,
help="Enable development mode.")
flags = parser.parse_args()
print('Configuring AmpliPi installation')
has_args = flags.python_deps or flags.os_deps or flags.web or flags.restart_updater or flags.display or flags.firmware
Expand Down
Loading