Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
#299-feature/presentation submission dynamic handler #314
base: refac
Are you sure you want to change the base?
#299-feature/presentation submission dynamic handler #314
Changes from 8 commits
52682cd
df31213
1eb207b
35d23c8
68a81d5
384813a
6ae5b6c
6b4a1f9
72fe694
6c6a456
345006e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing
Dict
is deprecated since Python 3.9 and this project officially supports Python 3.10+ only - usedict
instead (no import required).https://docs.python.org/3/library/typing.html#aliases-to-built-in-types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go ahead using dict without any import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of having a class configurable by editing an obscure configuration file in the installed class project that is available who-knows-where based on what
pip
(or other build tool) is doing and might possibly be inside a container? Just use aconfig.py
file at this point - it is functionally the same thing.@peppelinux @LadyCodesItBetter I'm not sure here what is the intended design goal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the intended propose is for a generic python package, not necessarly used in the iam proxy context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point still stands. Assume I am using the project as a package, that is, I am using it with
pip install pyeudiw
as a part of my project.To change the configuration of this class, I have to go in the location where pip placed
config.yaml
(which is usually inside thesite-packages
) and and edit it. This is IMO very convoluted and only doable by technically advanced users.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK the fact that each handler is a class initialized with an empty constructor implies that handlers are functionally just namespace for static methods. It's impossible to known what they should do without doing introspection on what aforementioned namespace contains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List
is also deprecated: uselist
insteadThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go ahead using list without any import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe I'm wrong but if a test file name does not start with
test_
or ends with_test.py
thenpytest
will NOT execute it for unit tests (altough ci-cd pipeline might change this behaviour - I'm not 100% sure how unit tests are configured here).In doubt, this file should be named
test_presentation_submission.py
https://docs.pytest.org/en/stable/explanation/goodpractices.html#test-discovery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that _test doesn't get loaded