Skip to content

Commit

Permalink
✨ Remove kernel (#379)
Browse files Browse the repository at this point in the history
* Deleted the error message for deleting kernel.

* Made it possible to create project without templates.

* Doesn't compile when no Kernel

* Apply Kernel on new Project

---------

Co-authored-by: naitikrambhia <[email protected]>
  • Loading branch information
NaitikRambhia and naitikrambhia authored Nov 15, 2024
1 parent fb9e846 commit f62164d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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

0 comments on commit f62164d

Please sign in to comment.