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

Enhancements #6

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open

Conversation

BikeMikeAU
Copy link

These are most of my enhancements uplifted from 3.2.

Mike GRIFFIN and others added 30 commits January 14, 2021 20:58
Replaced media/admin with a new version from Django, this fixes a lot of upgrade issues. 1.8 will be minimum version supported now. Also created a few new svg icons in the images folder to replace the old gifs.
Found during testing
syntax error indent
fix ini key for daily logging to match botsinit.py
print to console all severe errors
First ran 2to3, then made some manual fixes.
There is some code to allow backwards compatibility with python 2 but unlikely it will fully work. Need to decide if Py2 is really wanted. If not, some code can be removed or improved.
Submit_line needed to be replaced from later version of Django, I added cancel button mack in.
confirm.py fix missing %}
paramiko dependency error mention version > 2.0
RSA keyfile and passphrase can be configured in channel without user script needed
1. match variable names to the settings - less confusing reading the code :-)
2. maxconnectiontries applies to both in and out channels.
3. fix the try-except-else-finally (i had to read python docs again... break in finally clause was no good)
4. new python 3 exception context adds confusion to the trace when there is a connection error; fix that to just re-raise the original (raise exc from exc)
Mike GRIFFIN added 28 commits February 12, 2021 14:52
Also check for exceptions and default to no indenting
cleanup was already added but setting was not in bots.ini
Also fix help link to open new window/tab
although environment is not used by CherryPy now, it is useful to keep this setting. Can be referred to in mapping scripts etc to take different action in development (such as not sending emails)
was hard-coded as 2 seconds, this did not work well for me on windows.
Config startup delay to allow for automated windows patching and reboots.
Config to allow duplicate jobs on queue
Config to kill process after maxruntime timer expires
Can configure named groups of routes, and run those routes by passing -g<group name> to engine
Use to filter attachments based on filename
Major version should increment due to backwards incompatible changes
https://semver.org/
Django updated jquery, so need to also update jquery-ui and timepicker to get the widget working again
There are many online discussions and articles on removal of terms with racist connotations in software. Looks like this small change is the only one in Bots code.
Clearer help text on screen. Allow deletion by making rightcode blank in csv
base.html and submit_line.html templates are refreshed from Django so show a lot if diffs. remove images not needed.
py3 does not need to import cPickle, cDecimal, cElementtre etc
simplejson/json
StringIO/io
ConfigParser/configparser
persistfilters remove from settings, now default behavior in Django
got errors when processing edifact files containing UNA because this was not skipped.
CONTRL sender and recipient were not set.
@BikeMikeAU
Copy link
Author

I'm going to continue using this "Enhancements" branch for any bug fixes too. In hindsight it was too complex managing multiple branches for different changes.

I got this error:
Traceback (most recent call last):
  File "C:\D\PythonEnv\Bots330_Py39\lib\site-packages\bots\transform.py", line 81, in _translate_one_file
    for inn_splitup in edifile.nextmessage():   #for each message in parsed edifile (one message might get translation multiple times via 'alt'
  File "C:\D\PythonEnv\Bots330_Py39\lib\site-packages\bots\inmessage.py", line 363, in nextmessage
    ta_info.update(eachmessage.queries[-1])
AttributeError: 'list' object has no attribute 'queries'

Don't fully understand the code but deduced that this was the fix needed :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant