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

Applied black to python files and clang-format to c++ #128

Merged
merged 4 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
21 changes: 21 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: clang-format Check

on: [push, pull_request]

jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'examples'
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v4.8.0
with:
clang-format-version: '13'
check-path: ${{ matrix.path }}
fallback-style: 'Google'
104 changes: 54 additions & 50 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../../tacs/'))

sys.path.insert(0, os.path.abspath("../../tacs/"))
import tacs
from tacs import TACS


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

project = u'TACS'
copyright = u'2018, Graeme Kennedy'
author = u'Graeme Kennedy'
project = "TACS"
copyright = "2018, Graeme Kennedy"
author = "Graeme Kennedy"

# The short X.Y version
version = u''
version = ""
# The full version, including alpha/beta/rc tags
release = u''
release = ""


# -- General configuration ---------------------------------------------------
Expand All @@ -40,49 +41,51 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['breathe',
'sphinxcontrib.programoutput',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.mathjax',
'sphinx.ext.autosectionlabel']
extensions = [
"breathe",
"sphinxcontrib.programoutput",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.ifconfig",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinx.ext.mathjax",
"sphinx.ext.autosectionlabel",
]

# Breathe configuration
breathe_projects = {'tacs': '../xml'}
breathe_default_project = 'tacs'
breathe_projects = {"tacs": "../xml"}
breathe_default_project = "tacs"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'python'
language = "python"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

autosectionlabel_prefix_document = True

Expand All @@ -91,7 +94,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinxdoc'
html_theme = "sphinxdoc"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -104,7 +107,7 @@
# 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 = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -121,7 +124,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'TACSdoc'
htmlhelp_basename = "TACSdoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -130,15 +133,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

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

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -148,19 +148,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'TACS.tex', u'TACS Documentation',
u'Graeme Kennedy', 'manual'),
(master_doc, "TACS.tex", "TACS Documentation", "Graeme Kennedy", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'tacs', u'TACS Documentation',
[author], 1)
]
man_pages = [(master_doc, "tacs", "TACS Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -169,9 +165,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'TACS', u'TACS Documentation',
author, 'TACS', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"TACS",
"TACS Documentation",
author,
"TACS",
"One line description of project.",
"Miscellaneous",
),
]


Expand All @@ -190,23 +192,25 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None,
'numpy [stable]': ('https://numpy.org/doc/stable/', None),
'pynastran [latest]': ('https://pynastran-git.readthedocs.io/en/latest/', None),
'mpi4py [stable]': ('https://mpi4py.readthedocs.io/en/stable/', None),
'paropt': ('https://smdogroup.github.io/paropt/' ,None)}
intersphinx_mapping = {
"https://docs.python.org/": None,
"numpy [stable]": ("https://numpy.org/doc/stable/", None),
"pynastran [latest]": ("https://pynastran-git.readthedocs.io/en/latest/", None),
"mpi4py [stable]": ("https://mpi4py.readthedocs.io/en/stable/", None),
"paropt": ("https://smdogroup.github.io/paropt/", None),
}

#-----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Document both class docstring and init docstring
autoclass_content = 'both'
autoclass_content = "both"

# Order members by source and not alphabetical order
autodoc_member_order = 'bysource'
autodoc_member_order = "bysource"
Loading