-
-
Notifications
You must be signed in to change notification settings - Fork 294
Pull request dedicated to support analysis and integration of the functional modules designed for ANAC project 2024 #4393
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
base: anac/wb2024/start
Are you sure you want to change the base?
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
…criber.organization_name Change necessary to anticipate fix on migration 69 to properly handle the situation
7d49b79
to
92e203e
Compare
…/handlers/test_accreditation.py
7e993d2
to
50018b4
Compare
except ValueError: | ||
return False | ||
|
||
def find_statistical_info(session, tid:str, answers:dict, default_language:str): |
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.
@alessiofranceschini @joeman65: this function should probably be recursive or it will ignore statistical questions that are part of a group or subgroup.
def find_statistical_info(session, tid:str, answers:dict, default_language:str): | ||
answers_dict = dict() | ||
for k, v in answers.items(): | ||
field = db_get(session, models.Field, (models.Field.id == k, models.Field.tid == tid)) |
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.
@alessiofranceschini @joeman65: this query, defined inside a For loop, will be probably cause of significant inefficient on questionnaires with a lot of questions. Probably it should be optimized parsing the dictionary and then performing one single query.
try: | ||
with sf.open('rb') as encrypted_file, \ | ||
GCE.streaming_encryption_open('ENCRYPT', key, dest_path) as seo: | ||
id_file = dest_path.split('/')[-1] | ||
chunk = encrypted_file.read(abstract.FileDescriptor.bufferSize) |
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.
@alessiofranceschini : still this appear to read a file of 1GB chunk by chunk and analyze a single chunk. This will result in failure in recognizing viruses.
In case you will need to fix this, you will find the fix in our merge as we are proceeding fixing this in our integration.
logging.info(file_name) | ||
try: | ||
cd = pyclamd.ClamdNetworkSocket(self._host, int(self._port)) | ||
result = cd.scan_stream(data_bytes) |
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.
@alessiofranceschini : still is the usage of a streaming API but externally it will block till all the bytes are processed so this _scan_file function should be run in a deferredThread to not block the process when running it.
In case you will need to fix this, you will find the fix in our merge as we are proceeding fixing this in our integration.
Pull request to continue the analysis of the possible integration of the following independent functional units:
The analysis move forward previous analysis #4313 for work aimed to be integrated in milestone https://github.com/globaleaks/globaleaks-whistleblowing-software/milestone/59