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

Delete square when running cmake #410

Merged
merged 3 commits into from
May 15, 2023
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
1 change: 0 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SET(podio_PYTHON_DIR ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
set(to_install
podio_class_generator.py
podio_schema_evolution.py
figure.txt
EventStore.py)

install(FILES ${to_install} DESTINATION ${podio_PYTHON_INSTALLDIR})
Expand Down
44 changes: 0 additions & 44 deletions python/figure.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is part of the files that are installed, so removing it breaks the installation in some of the CI workflows. We would also have to remove it from the list here:

set(to_install
podio_class_generator.py
podio_schema_evolution.py
figure.txt
EventStore.py)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

This file was deleted.

24 changes: 4 additions & 20 deletions python/podio_class_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
import os
import sys
import subprocess
import pickle
from copy import deepcopy
from enum import IntEnum

from collections.abc import Mapping
from collections import defaultdict

from itertools import zip_longest

import jinja2

from podio.podio_config_reader import PodioConfigReader
Expand All @@ -26,15 +23,8 @@
REPORT_TEXT = """
PODIO Data Model
================
Used
{yamlfile}
to create
{nclasses} classes
in
{installdir}/
Read instructions in
the README.md to run
your first example!
Used {yamlfile} to create {nclasses} classes in {installdir}/
Read instructions in the README.md to run your first example!
"""


Expand Down Expand Up @@ -171,19 +161,13 @@ def print_report(self):
if not self.verbose:
return

with open(os.path.join(THIS_DIR, "figure.txt"), 'rb') as pkl:
figure = pickle.load(pkl)

nclasses = 5 * len(self.datamodel.datatypes) + len(self.datamodel.components)
text = REPORT_TEXT.format(yamlfile=self.yamlfile,
nclasses=nclasses,
installdir=self.install_dir)

print()
for figline, summaryline in zip_longest(figure, text.splitlines(), fillvalue=''):
print(figline + summaryline)
print(" 'Homage to the Square' - Josef Albers")
print()
for summaryline in text.splitlines():
print(summaryline)
print()

def _eval_template(self, template, data):
Expand Down