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

Convert settings section #149

Merged
merged 12 commits into from
Oct 8, 2023
Merged

Convert settings section #149

merged 12 commits into from
Oct 8, 2023

Conversation

Derstilon
Copy link
Member

image
required for ui pr yaptide/ui#1233

@grzanka
Copy link
Contributor

grzanka commented Oct 3, 2023

The dose-to-water doesn't work as there is a space in the material name.

image

Simulation fails
image

@Derstilon Derstilon force-pushed the convert-settings-section branch 3 times, most recently from d237190 to deeb385 Compare October 6, 2023 16:55
@Derstilon Derstilon force-pushed the convert-settings-section branch from deeb385 to 1077a62 Compare October 6, 2023 17:03
@grzanka
Copy link
Contributor

grzanka commented Oct 6, 2023

Fix deepsource

image

converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
converter/shieldhit/geo.py Outdated Show resolved Hide resolved
Derstilon and others added 2 commits October 6, 2023 21:30
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
@grzanka
Copy link
Contributor

grzanka commented Oct 6, 2023

I've tried to set custom density to water, but got this errror

2023-10-06 22:37:10 Traceback (most recent call last):
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2213, in __call__
2023-10-06 22:37:10     return self.wsgi_app(environ, start_response)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2193, in wsgi_app
2023-10-06 22:37:10     response = self.handle_exception(e)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 298, in error_router
2023-10-06 22:37:10     return original_handler(e)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
2023-10-06 22:37:10     response = self.full_dispatch_request()
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
2023-10-06 22:37:10     rv = self.handle_user_exception(e)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 298, in error_router
2023-10-06 22:37:10     return original_handler(e)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
2023-10-06 22:37:10     rv = self.dispatch_request()
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
2023-10-06 22:37:10     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 489, in wrapper
2023-10-06 22:37:10     resp = resource(*args, **kwargs)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 109, in view
2023-10-06 22:37:10     return current_app.ensure_sync(self.dispatch_request)(**kwargs)
2023-10-06 22:37:10   File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
2023-10-06 22:37:10     resp = meth(*args, **kwargs)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/routes/utils/decorators.py", line 24, in wrapper
2023-10-06 22:37:10     return f(user, *args, **kwargs)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/routes/celery_routes.py", line 79, in post
2023-10-06 22:37:10     files_dict, number_of_all_primaries = files_dict_with_adjusted_primaries(payload_dict=payload_dict)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/utils/sim_utils.py", line 145, in files_dict_with_adjusted_primaries
2023-10-06 22:37:10     return check_and_convert_payload_to_files_dict(new_payload_dict), number_of_all_primaries
2023-10-06 22:37:10   File "/usr/local/app/yaptide/utils/sim_utils.py", line 75, in check_and_convert_payload_to_files_dict
2023-10-06 22:37:10     files_dict = convert_editor_dict_to_files_dict(editor_dict=payload_dict["input_json"],
2023-10-06 22:37:10   File "/usr/local/app/yaptide/utils/sim_utils.py", line 63, in convert_editor_dict_to_files_dict
2023-10-06 22:37:10     files_dict = run_parser(parser=conv_parser, input_data=editor_dict)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/converter/converter/api.py", line 28, in run_parser
2023-10-06 22:37:10     parser.parse_configs(input_data)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/converter/converter/shieldhit/parser.py", line 27, in parse_configs
2023-10-06 22:37:10     self._parse_geo_mat(json)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/converter/converter/shieldhit/parser.py", line 305, in _parse_geo_mat
2023-10-06 22:37:10     self._parse_zones(json)
2023-10-06 22:37:10   File "/usr/local/app/yaptide/converter/converter/shieldhit/parser.py", line 381, in _parse_zones
2023-10-06 22:37:10     overridden_material = Material(
2023-10-06 22:37:10 TypeError: Material.__init__() missing 1 required positional argument: 'sanitized_name'
2023-10-06 22:37:24 INFO:werkzeug:172.19.0.6 - - [06/Oct/2023 20:37:24] "GET / HTTP/1.0" 200 -

image

Derstilon and others added 4 commits October 8, 2023 12:51
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
@Derstilon Derstilon requested a review from grzanka October 8, 2023 13:07
@grzanka grzanka merged commit e69ef8f into master Oct 8, 2023
@grzanka grzanka deleted the convert-settings-section branch October 8, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants