Skip to content

Commit

Permalink
fixed PEP8 F633, and PEP8 problems in the documentation build (#501)
Browse files Browse the repository at this point in the history
* fixed PEP8 F633
* ignore emacs backup files
* fixed PEP8 warnings in documentation conf.py
  • Loading branch information
edwardhartnett authored Sep 24, 2024
1 parent bd31e78 commit 07a73fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest_flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors
flake8 . --count --select=E9,F7 --show-source --statistics
flake8 . --count --select=E9,F7,F6 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: pytest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ ush/python_utils/__pycache__/

__pycache__
*.swp
.venv
*~
15 changes: 7 additions & 8 deletions doc/UsersGuide/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import sys
sys.path.insert(0, os.path.abspath('.'))



# -- Project information -----------------------------------------------------

project = 'RRFS-Workflow Users Guide'
Expand Down Expand Up @@ -56,7 +54,7 @@
]

bibtex_bibfiles = ['references.bib']
#bibtex_bibfiles = ['refs.bib']
# bibtex_bibfiles = ['refs.bib']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -104,10 +102,11 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = []
# html_static_path = []
html_static_path = ['_static']
html_context = {}


def setup(app):
app.add_css_file('custom.css') # may also be an URL
app.add_css_file('theme_overrides.css') # may also be a URL
Expand All @@ -134,19 +133,19 @@ def setup(app):
latex_engine = 'pdflatex'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'letterpaper',
'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
'pointsize': '11pt',
'pointsize': '11pt',

# Additional stuff for the LaTeX preamble.
'preamble': r'''
'preamble': r'''
\usepackage{charter}
\usepackage[defaultsans]{lato}
\usepackage{inconsolata}
''',
# Release name prefix
'releasename': ' ',
'releasename': ' ',

# Latex figure (float) alignment
#
Expand Down
6 changes: 3 additions & 3 deletions ush/rocoto/rocoto_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def sigwinch_handler(signum, frame):

def usage(message=None):
curses.endwin()
print>>sys.stderr, '''
print('''
Usage: rocoto_status_viewer.py -w workflow.xml -d database.db [--listtasks]\n [--html=filename.html]\n [--perfmetrics={True,False}]
Mandatory arguments:
Expand All @@ -128,10 +128,10 @@ def usage(message=None):
--listtasks --- print out a list of all tasks
--html=filename.html --- creates an HTML document of status
--perfmetrics=True --- turn on/off extra columns for performance metrics
--help --- print this usage message'''
--help --- print this usage message''', file=sys.stderr)

if message is not None:
print>>sys.stderr,'\n'+str(message).rstrip()+'\n'
print('\n'+str(message).rstrip()+'\n', file=sys.stderr)
sys.exit(-1)

def augment_SQLite3(filename):
Expand Down

0 comments on commit 07a73fa

Please sign in to comment.