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

Use REST API to retrieve defects #74

Merged
merged 203 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
8c020fc
Delete Sevice class; add new functions to CoverityConfigurationServic…
JokeWaumans Jul 10, 2024
effd14f
Add GET and POST functions to use in other functions
JokeWaumans Jul 11, 2024
facc938
Retrieve checker via GET request; save in property
JokeWaumans Jul 11, 2024
6aa5821
Use urls directly in functions
JokeWaumans Jul 11, 2024
4fc67c1
Delete function get_checkers
JokeWaumans Jul 11, 2024
809c5c0
Delete default values; Initialize with transport, hostname and port t…
JokeWaumans Jul 11, 2024
049a80b
Delete Service inheritance
JokeWaumans Jul 11, 2024
d048e52
Extent base url with /api/v2
JokeWaumans Jul 11, 2024
bf867d1
Store column keys in property
JokeWaumans Jul 12, 2024
a0ad7cc
Init column_keys as None
JokeWaumans Jul 12, 2024
9ece168
Use project name instead of stream; Initialize by retrieving column k…
JokeWaumans Jul 12, 2024
21cc9e4
Combine CoverityDefectService and CoverityConfigurationService
JokeWaumans Jul 12, 2024
4c37930
Use a list of only the keys of checkerAttributedata as checkers
JokeWaumans Jul 12, 2024
d565263
Return filter_list to add them to JSON request data
JokeWaumans Jul 12, 2024
e3e1042
Add self.filters; update arguments of functions
JokeWaumans Jul 12, 2024
28b49fb
Add TODO
JokeWaumans Jul 12, 2024
ba90861
Add arguments app to retrieve username and password
JokeWaumans Jul 12, 2024
dd0f57e
Update .env.example
JokeWaumans Jul 12, 2024
0e273fa
Update base url regex
JokeWaumans Jul 15, 2024
2660e19
Add filters based on the type of matcher (nameMatcher, idMatcher or k…
JokeWaumans Jul 16, 2024
27ef111
Format all Python files
JokeWaumans Jul 16, 2024
7c107a7
Delete unused import
JokeWaumans Jul 16, 2024
9e320ff
Delete unused custom filter
JokeWaumans Jul 16, 2024
4e81051
Get all checkers to pass as valid list
JokeWaumans Jul 16, 2024
540e17f
Add snapshotScope compareTo; use scope last() (same as via SOAP)
JokeWaumans Jul 16, 2024
3b8486c
Move data to bottum; remove classification filter
JokeWaumans Jul 16, 2024
7014825
Use f-string to create base_url instead of url_join
JokeWaumans Jul 17, 2024
ec465f2
Don't use urljoin
JokeWaumans Jul 17, 2024
27071fd
Port is not needed anymore; use https instead of http
JokeWaumans Jul 17, 2024
4c8bf59
Delete custum argument from get_defects function
JokeWaumans Jul 17, 2024
bf4cde1
Get the column keys base on the column names
JokeWaumans Jul 17, 2024
ac06da6
Fix filtering; add matchers instead of filters
JokeWaumans Jul 18, 2024
fc0d183
Retrieve lineNumber and displayFile by default to use it later when c…
JokeWaumans Jul 18, 2024
b2e882a
Add more default columns
JokeWaumans Jul 18, 2024
f7fdad7
Add more parameters to the issue search url
JokeWaumans Jul 18, 2024
ae0dc18
Update port and transport in README
JokeWaumans Jul 18, 2024
5c49dea
Update get_defect_url to get url with given product and cid
JokeWaumans Jul 18, 2024
ec62956
CID will not be used if it is no column
JokeWaumans Jul 18, 2024
ec0027e
Use set for column_keys to remove if statements
JokeWaumans Jul 18, 2024
bb38ada
Delete stream from perform_replacement function; use rows as total am…
JokeWaumans Jul 18, 2024
326168b
Simplify the defect to use it in other functions (instead of with "ke…
JokeWaumans Jul 18, 2024
af0e795
Keep using stream instead of project name
JokeWaumans Jul 18, 2024
d59ceef
Fix 405 response code by using https
JokeWaumans Jul 22, 2024
357d3ab
Rename variable to a more appropriate name
JokeWaumans Jul 22, 2024
5d43aaf
Set retrieveGroupByColumns to false to retrieve CID
JokeWaumans Jul 22, 2024
10136f3
Add default cid to use in function create_paragraph_with_links
JokeWaumans Jul 22, 2024
5aa7f0c
Refactor filling the table
JokeWaumans Jul 23, 2024
1a4ddeb
Refactor functions when chart is used
JokeWaumans Jul 23, 2024
0f25a7f
Use regex
JokeWaumans Jul 23, 2024
4021d96
Change Service class to CoverityDefectService in tests
JokeWaumans Jul 23, 2024
5b10205
Use CoverityDefectService class instead of CoverityConfigurationServi…
JokeWaumans Jul 23, 2024
67cf190
Login once by using a session
JokeWaumans Jul 23, 2024
90c1e4c
Change the first test (login)
JokeWaumans Jul 24, 2024
2544193
Add test to retrieve checkers
JokeWaumans Jul 25, 2024
e235cab
Add warning (not found in traceability collection) to warnings config
JokeWaumans Aug 1, 2024
f2975ee
Update warnings to exclude
JokeWaumans Aug 1, 2024
a461f06
Use a more readable yml file as warnings config
JokeWaumans Aug 1, 2024
68d7881
Add warning to exclude
JokeWaumans Aug 1, 2024
89abbab
Fix warning
JokeWaumans Aug 1, 2024
78975b3
Use pyproject.toml file; Build source distribution and wheel with 'bu…
JokeWaumans Aug 1, 2024
60d3726
Update MANIFEST
JokeWaumans Aug 1, 2024
6bc95ee
Fix flake8
JokeWaumans Aug 1, 2024
55ffd18
Update docstrings of coverity_services
JokeWaumans Aug 1, 2024
ac62421
Delete unused functions
JokeWaumans Aug 1, 2024
a839fa5
Use get_defect_url to get url when column is CID
JokeWaumans Aug 1, 2024
6b18e0b
Use always transport https; does not work otherwise
JokeWaumans Aug 1, 2024
e945b6e
Delete transport in coverity.py
JokeWaumans Aug 1, 2024
c5e5b97
Use hostname property to create url of defect; rename function
JokeWaumans Aug 1, 2024
375d1ee
Delete unused global variables
JokeWaumans Aug 1, 2024
5caaf9d
Delete unused suds-py3
JokeWaumans Aug 1, 2024
e21a93e
Update docstrings
JokeWaumans Aug 1, 2024
2b35840
Get more info about failure
JokeWaumans Aug 2, 2024
9827fcf
Delete argument
JokeWaumans Aug 2, 2024
ad79ce8
Delete unused functions
JokeWaumans Aug 2, 2024
5e66000
Validate stream name
JokeWaumans Aug 2, 2024
3cd0975
Add test to get defects using requests_mock
JokeWaumans Aug 2, 2024
334e133
Fix typo
JokeWaumans Aug 2, 2024
2d376d3
Do not request columns more times when retrieve_column_keys is called…
JokeWaumans Aug 2, 2024
bc6438b
Update test to get defects with more assertions
JokeWaumans Aug 2, 2024
c6eec23
Fix json.decoder.JSONDecodeError when the respons is just a string
JokeWaumans Aug 2, 2024
30520db
Validate stream in the initialization
JokeWaumans Aug 2, 2024
601fb3b
Update test with validate stream
JokeWaumans Aug 2, 2024
bb0cd2d
Test failed login
JokeWaumans Aug 2, 2024
c1cb908
Use `response` instead of `req`; remove indentation after return
JokeWaumans Aug 5, 2024
d912b06
Combine _post_request and _get_request to _request
JokeWaumans Aug 5, 2024
516e2ab
Add data argurment to the docstring
JokeWaumans Aug 5, 2024
411c7ee
Update warning; make url more general
JokeWaumans Aug 5, 2024
45191cd
Update arguments docstring
JokeWaumans Aug 5, 2024
809179b
Fix flake8
JokeWaumans Aug 5, 2024
a2a78b9
Improve docstring's wording
JasperCraeghs Aug 8, 2024
b7561d0
Add traceback to console when failing
JokeWaumans Aug 8, 2024
e8e9098
Use docname from item instead of passing through functions
JokeWaumans Aug 8, 2024
08aced8
Fix error when filter is used with chart without specifying col
JokeWaumans Aug 8, 2024
5a415c9
Do not continue with perform_replacement when error occurs; Show erro…
JokeWaumans Aug 8, 2024
f4efe17
Merge branch 'REST-API' of github.com:melexis/sphinx-coverity-extensi…
JokeWaumans Aug 8, 2024
f4619a6
Rephrase some arguments of docstrings
JokeWaumans Aug 9, 2024
f50f5ea
Move line in manifest to group where it belongs
JokeWaumans Aug 9, 2024
6669cf3
Update example env
JokeWaumans Aug 9, 2024
c28f72b
Delete warning
JokeWaumans Aug 11, 2024
23bb1c1
Delete stream and coverity_service from SphinxCoverityConnector
JokeWaumans Aug 11, 2024
59dd9be
Delete self.stream
JokeWaumans Aug 11, 2024
a5f5533
Use urlencode of urllib.parse to use parameters in url
JokeWaumans Aug 11, 2024
0fa4020
Add more documentation
JokeWaumans Aug 11, 2024
842a4a6
Fix TypeError: string indices must be integers, not 'str'; item has …
JokeWaumans Aug 12, 2024
6114849
Fix type in docstring
JokeWaumans Aug 12, 2024
3474661
Add arguments to docstring
JokeWaumans Aug 12, 2024
718c3e4
Revert "Delete warning"
JokeWaumans Aug 12, 2024
7ef1fbf
Refactoring
JasperCraeghs Aug 13, 2024
0f8db45
Use `item_id` instead of `item` to avoid confusion
JokeWaumans Aug 13, 2024
0a5aedd
Delete setter of base_url
JokeWaumans Aug 13, 2024
a55c29c
Delete hostname and use properties base_url and api_endpoint
JokeWaumans Aug 13, 2024
458e93f
Use f-string formatting
JokeWaumans Aug 13, 2024
3695438
Use urlencode with f-string formatting
JokeWaumans Aug 13, 2024
9ccd42c
Initialize column_keys with "cid"
JokeWaumans Aug 13, 2024
9eaafca
Delete self.filters
JokeWaumans Aug 13, 2024
7591e84
Delete validated CSV list; rename function validate_filter_option
JokeWaumans Aug 13, 2024
aab7864
Simplify the self.columns property by making a dict where the key is …
JokeWaumans Aug 13, 2024
edff312
Use column_name instead of column_key to obtain column key for the qu…
JokeWaumans Aug 13, 2024
c55316c
Update docstring
JokeWaumans Aug 13, 2024
e937df8
Update docstring
JokeWaumans Aug 13, 2024
3980719
Use self. instead of connector.
JokeWaumans Aug 13, 2024
1ef512e
Fix test
JokeWaumans Aug 13, 2024
9d89df3
Merge branch 'REST-API' of github.com:melexis/sphinx-coverity-extensi…
JokeWaumans Aug 13, 2024
b46058a
Issue Kind is column name instead of Kind
JokeWaumans Aug 13, 2024
cce5b77
Fix file name
JokeWaumans Aug 13, 2024
d742291
Format files
JokeWaumans Aug 13, 2024
cb94127
Update return in docstring
JokeWaumans Aug 13, 2024
884d154
column_keys.json is the mock response value
JokeWaumans Aug 13, 2024
61bae26
Fix typo
JokeWaumans Aug 13, 2024
7728cee
Cleanup use of str.strip
JasperCraeghs Aug 13, 2024
a110fca
Test 7728cee1849b2b5350b4fec681a3b0c1ab790525
JasperCraeghs Aug 13, 2024
559b6b9
Merge branch 'REST-API' of https://github.com/melexis/sphinx-coverity…
JasperCraeghs Aug 13, 2024
72d6be1
Use column_keys.json as response and columns.json the return value of…
JokeWaumans Aug 13, 2024
00ff922
Merge branch 'REST-API' of github.com:melexis/sphinx-coverity-extensi…
JokeWaumans Aug 13, 2024
ca12134
Do not set column names in lowercase
JokeWaumans Aug 13, 2024
bb21581
Fix flake8 W503
JokeWaumans Aug 13, 2024
568b2e2
Use urlencode in tests
JokeWaumans Aug 13, 2024
72d02ae
Use CaseInsensitiveDict for self.columns; add function to obtain colu…
JokeWaumans Aug 13, 2024
2293e4a
Update class docstring
JokeWaumans Aug 13, 2024
7451f7d
Make actual lists
JokeWaumans Aug 13, 2024
140fcf2
Rename argument
JokeWaumans Aug 13, 2024
d6e5dd6
Merge branch 'REST-API' of github.com:melexis/sphinx-coverity-extensi…
JokeWaumans Aug 13, 2024
64f226b
Remove over-indentation
JokeWaumans Aug 13, 2024
8dfd842
Use namedtuple to shrink the amount of if statements
JokeWaumans Aug 13, 2024
8ffe90c
Fix line too long
JokeWaumans Aug 14, 2024
4b86490
Change `list` to more descriptive name `values`
JokeWaumans Aug 14, 2024
2c012cd
Use function `validate_filter_option` directly in `handle_attribute_f…
JokeWaumans Aug 14, 2024
1ab9fa0
Use empty list instead of None to avoid error
JokeWaumans Aug 14, 2024
db357d5
Update docstring
JokeWaumans Aug 14, 2024
b48d82a
Use set to delete checking uniqueness in if statement
JokeWaumans Aug 14, 2024
d095768
Update docstring
JokeWaumans Aug 16, 2024
a6f0fb6
Update docstring
JokeWaumans Aug 16, 2024
d7e4675
Update docstring
JokeWaumans Aug 16, 2024
2f8bbf1
Merge branch 'master' into REST-API
JokeWaumans Aug 16, 2024
49c2580
Use the new walrus operator
JokeWaumans Aug 16, 2024
e31b716
Add parentheses around the walrus assignment expression to make it va…
JokeWaumans Aug 16, 2024
e10b404
Use walrus operator in other if statement
JokeWaumans Aug 16, 2024
00d7c6c
Use more indentation; fix flake8
JokeWaumans Aug 16, 2024
7ddc617
Use seperate function to login and get the correct urls in tests
JokeWaumans Aug 16, 2024
38e9745
Read file at begin of test
JokeWaumans Aug 16, 2024
13cbd66
Add test that uses the get_filtered_defects function
JokeWaumans Aug 16, 2024
bd3249f
Add warning if column name does not exist in the columns property
JokeWaumans Aug 16, 2024
30bddc5
Delete breakpoint
JokeWaumans Aug 19, 2024
7206240
Delete variable
JokeWaumans Aug 19, 2024
17750dc
Use 1 indent for the dict
JokeWaumans Aug 19, 2024
fb3f407
Simplification of test suite and testing what matters
JasperCraeghs Aug 19, 2024
1f2b7ad
Sort imports
JasperCraeghs Aug 19, 2024
f53db84
Update type in docstring
JokeWaumans Aug 19, 2024
7b78da6
Use parameterized to test get_defects; Add filters.py with all variab…
JokeWaumans Aug 19, 2024
ac4a0e0
Update test get_filtered_defects
JokeWaumans Aug 20, 2024
cfc07be
Delete CoverityDefect
JokeWaumans Aug 20, 2024
5614a04
Add test_retrieve_checkers
JokeWaumans Aug 20, 2024
2abc4bf
Use pathlib
JokeWaumans Aug 20, 2024
19843d3
Add test_retrieve_columns
JokeWaumans Aug 20, 2024
1555331
Update test_retrieve_checkers
JokeWaumans Aug 20, 2024
568e76f
Add test_stream_validation
JokeWaumans Aug 20, 2024
9178a53
Use coverity_service instead of coverity_conf_service
JokeWaumans Aug 20, 2024
894239e
Update session test to validate the headers by using validate_stream
JokeWaumans Aug 20, 2024
9a56861
Use last_request instead of history[0]
JokeWaumans Aug 20, 2024
e2c2376
Delete unused fake_json file
JokeWaumans Aug 20, 2024
349e5e6
Add Python package parameterized to tox.ini
JokeWaumans Aug 20, 2024
9ff51df
Add some more test for get_defects
JokeWaumans Aug 20, 2024
eee1bc1
Format filters.py
JokeWaumans Aug 20, 2024
51bc568
Delete unused import
JokeWaumans Aug 20, 2024
fe88d92
Add blank line
JokeWaumans Aug 20, 2024
1fdb830
Delete unused variable
JokeWaumans Aug 20, 2024
18a54df
Cleanup test suite
JasperCraeghs Aug 21, 2024
4e8c858
Use more readable mocker.last_request instead of mocker.request_history
JokeWaumans Aug 22, 2024
b51936e
Use Filter named tuple directly instead of the arguments
JokeWaumans Aug 22, 2024
5436634
Merge branch 'REST-API' of github.com:melexis/sphinx-coverity-extensi…
JokeWaumans Aug 22, 2024
bfd8fbf
Make key and value of fake checkers different; Only the keys will be …
JokeWaumans Aug 22, 2024
61ae104
Delete unused column_keys
JokeWaumans Aug 22, 2024
1a495ce
Make key and value of fake_checkers not equal to each other
JokeWaumans Aug 22, 2024
7096447
Add info to the tests
JokeWaumans Aug 22, 2024
5e964aa
Set logging level default to WARNING in conf.py
JokeWaumans Aug 22, 2024
542d4bb
Check if chart_attribute adds name to column names
JokeWaumans Aug 22, 2024
3364edd
Add warning Errno -3
JokeWaumans Aug 22, 2024
89ae364
Update test with a node that has chart_attribute or not
JokeWaumans Aug 22, 2024
5e97c3b
Define logger as global variable with level set to WARNING; it can be…
JasperCraeghs Aug 23, 2024
57b267b
Overwrite loglevel of mlx.coverity_logging by setting LOGLEVEL env va…
JokeWaumans Aug 23, 2024
8331672
Add DEBUG; when set to 1 traceback will be shown
JokeWaumans Aug 23, 2024
3ff6123
Fix export
JokeWaumans Aug 23, 2024
391e5fb
Use export in make recipe
JokeWaumans Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ recursive-include example Makefile
recursive-include tests *.py
recursive-include tests *.rst
recursive-include tests *.txt
recursive-include tests *.json

exclude example/.env.example
exclude .pylintrc
Expand Down
4 changes: 0 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ Example of custom credentials for the plugin:

coverity_credentials = {
'hostname': 'scan.coverity.com',
'port': '8080',
'transport': 'http',
'username': 'reporter',
'password': 'coverity',
'stream': 'some_coverity_stream',
Expand Down Expand Up @@ -134,8 +132,6 @@ The plugin itself holds a default config that can be used for any Coverity proje

coverity_credentials = {
'hostname': 'scan.coverity.com',
'port': '8080',
'transport': 'http',
'username': 'reporter',
'password': 'coverity',
'stream': 'some_coverity_stream',
Expand Down
8 changes: 8 additions & 0 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ PYTHONWARNINGS?= default::DeprecationWarning
PAPER ?=
BUILDDIR ?= _build

# logging variables
DEBUG ?= 0
LOGLEVEL =? WARNING

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -E -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ifeq (${DEBUG}, 1)
ALLSPHINXOPTS += -T
endif
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

Expand Down Expand Up @@ -43,6 +50,7 @@ clean:
-rm -rf $(BUILDDIR)/*

html:
export LOGLEVEL=$(LOGLEVEL)
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Expand Down
108 changes: 59 additions & 49 deletions example/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
import mlx.coverity
import mlx.traceability
from decouple import config
import logging
from sphinx.util.logging import getLogger
from pkg_resources import get_distribution

pkg_version = get_distribution('mlx.coverity').version
pkg_version = get_distribution("mlx.coverity").version

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../mlx'))
sys.path.insert(0, os.path.abspath("../mlx"))

# -- General configuration -----------------------------------------------------

Expand All @@ -34,34 +36,34 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.graphviz',
'mlx.traceability',
'mlx.coverity',
'sphinx_selective_exclude.eager_only',
'sphinx_selective_exclude.modindex_exclude',
'sphinx_selective_exclude.search_auto_exclude'
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.coverage",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.graphviz",
"mlx.traceability",
"mlx.coverity",
"sphinx_selective_exclude.eager_only",
"sphinx_selective_exclude.modindex_exclude",
"sphinx_selective_exclude.search_auto_exclude",
]

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

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The encoding of source files.
#source_encoding = 'utf-8-sig'

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

# General information about the project.
project = u'Example'
copyright = u'2017, Stein Heselmans'
project = "Example"
copyright = "2017, Stein Heselmans"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -84,7 +86,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
Expand All @@ -101,7 +103,7 @@
#show_authors = False

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

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
Expand All @@ -111,7 +113,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# 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 Down Expand Up @@ -140,8 +142,8 @@
# 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.append(os.path.join(os.path.dirname(mlx.traceability.__file__), 'assets'))
html_static_path = ["_static"]
html_static_path.append(os.path.join(os.path.dirname(mlx.traceability.__file__), "assets"))

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -185,25 +187,22 @@
#html_file_suffix = None

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

# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'a4paper',

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

"pointsize": "10pt",
# Additional stuff for the LaTeX preamble.
'preamble': r'\setcounter{tocdepth}{3}\usepackage{pdflscape}',
"preamble": r"\setcounter{tocdepth}{3}\usepackage{pdflscape}",
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Example.tex', u'Example Documentation',
u'Crt Mori', 'manual'),
("index", "Example.tex", "Example Documentation", "Crt Mori", "manual"),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -231,10 +230,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'example', u'Example Documentation',
[u'Crt Mori'], 1)
]
man_pages = [("index", "example", "Example Documentation", ["Crt Mori"], 1)]

# If true, show URL addresses after external links.
#man_show_urls = False
Expand All @@ -246,9 +242,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Example', u'Example Documentation',
u'Crt Mori', 'Example', 'One line description of project.',
'Miscellaneous'),
(
"index",
"Example",
"Example Documentation",
"Crt Mori",
"Example",
"One line description of project.",
"Miscellaneous",
),
]

# Documents to append as an appendix to all manuals.
Expand All @@ -264,10 +266,10 @@
# -- Options for Epub output ---------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = u'Example'
epub_author = u'Crt Mori'
epub_publisher = u'Melexis'
epub_copyright = u'2018, Crt Mori'
epub_title = "Example"
epub_author = "Crt Mori"
epub_publisher = "Melexis"
epub_copyright = "2018, Crt Mori"

# The language of the text. It defaults to the language option
# or en if the language is not set.
Expand Down Expand Up @@ -305,17 +307,25 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {"http://docs.python.org/": None}

# -- Options for coverity extension ----------------------------------------
coverity_credentials = {
'transport': 'http',
'port': '8080',
'hostname': 'coverity.melexis.com',
'username': config('COVERITY_USERNAME'),
'password': config('COVERITY_PASSWORD'),
'stream': config('COVERITY_STREAM'),
"hostname": "coverity.melexis.com",
"username": config("COVERITY_USERNAME"),
"password": config("COVERITY_PASSWORD"),
"stream": config("COVERITY_STREAM"),
}
JasperCraeghs marked this conversation as resolved.
Show resolved Hide resolved

TRACEABILITY_ITEM_ID_REGEX = r"([A-Z_]+-[A-Z0-9_]+)"
TRACEABILITY_ITEM_RELINK = {}

log_level = os.environ.get('LOGLEVEL', None)
if log_level:
try:
numeric_level = getattr(logging, log_level.upper(), None)
logger = getLogger("mlx.coverity_logging")
logger.setLevel(level=numeric_level)
except:
raise ValueError(f"Invalid log level: {log_level}")

2 changes: 1 addition & 1 deletion mlx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
Loading
Loading