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

✨ Remove kernel #379

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ out/
*.zip
*_pros_capture.png

venv/

*venv/
.DS_Store
*.pyc
2 changes: 1 addition & 1 deletion pros/cli/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def new_project(ctx: click.Context, path: str, target: str, version: str,
ui.echo('New PROS Project was created:', output_machine=False)
ctx.invoke(info_project, project=project)

if compile_after or build_cache:
if (compile_after or build_cache) and not no_default_libs:
with ui.Notification():
ui.echo('Building project...')
exit_code = project.compile([], scan_build=build_cache)
Expand Down
4 changes: 3 additions & 1 deletion pros/conductor/project/ProjectReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ def __str__(self):
f' ({self.project["name"]})' if self.project["name"] else ''
s += '\n'
rows = [t.values() for t in self.project["templates"]]
headers = [h.capitalize() for h in self.project["templates"][0].keys()]

headers = [h.capitalize() for h in self.project["templates"][0].keys()]if self.project["templates"] else []
s += tabulate.tabulate(rows, headers=headers)

return s

def __getstate__(self):
Expand Down
2 changes: 0 additions & 2 deletions pros/conductor/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ def new_user_filter(new_file: str) -> bool:
def remove_template(self, template: Template, remove_user: bool = False, remove_empty_directories: bool = True):
if not self.template_is_installed(template):
raise ValueError(f'{template.identifier} is not installed on this project.')
if template.name == 'kernel':
raise ValueError(f'Cannot remove the kernel template. Maybe create a new project?')

real_template = LocalTemplate(orig=template, location=self.location)
transaction = Transaction(self.location, set(self.all_files))
Expand Down
Loading