Skip to content

Commit

Permalink
Fixed PTB workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Nov 28, 2024
1 parent b0c894b commit 1ed66a0
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 17 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ on:

jobs:

# This job can be removed if certain preconditions are met. See
# https://exasol.github.io/python-toolbox/user_guide/workflows.html#pr-merge-workflow

ci-job:
name: Checks
uses: ./.github/workflows/checks.yml
secrets: inherit

publish-docs:
name: Publish Documentation
uses: ./.github/workflows/gh-pages.yml

metrics:
needs: [ ci-job ]
uses: ./.github/workflows/report.yml
Empty file.
19 changes: 10 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@
import os
import sys

# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath("../"))


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

project = "Exasol BucketFS"
copyright = "2021, Exasol"
copyright = "2024, Exasol"
author = "Exasol"


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

# 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.todo",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinx_copybutton",
"myst_parser",
"sphinx_design",
"sphinx_inline_tabs",
"sphinx_copybutton",
"sphinx.ext.autosectionlabel",
"exasol.toolbox.sphinx.multiversion",
]

intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# Make sure the target is unique
autosectionlabel_prefix_document = True
source_suffix = {
".rst": "restructuredtext",
".txt": "markdown",
Expand All @@ -60,20 +60,21 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".build-docu"]


# -- Options for HTML output -------------------------------------------------

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

# 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_title = f"Bucketfs"
html_title = "Bucketfs"
html_theme_options = {
"light_logo": "light-exasol-logo.svg",
"dark_logo": "dark-exasol-logo.svg",
"github_url": "https://github.com/exasol/bucketfs-python",
"accent_color": "grass",
}
12 changes: 6 additions & 6 deletions doc/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Basic's
The Bucketfs Service
--------------------
In the On-Prem database, a single bucketfs service can host multiple buckets. In order to interact with a
bucketfs service one can use the :ref:`exasol.bucketfs.Service <api:exasol.bucketfs.Service>` class.
bucketfs service one can use the ``exasol.bucketfs.Service`` class.

List buckets
++++++++++++
Expand All @@ -25,7 +25,7 @@ Get a Bucket reference
Bucket class
------------
A Bucket contains a set of files which may be restricted, depending on the credentials of the requester.
The Bucket class for an On-Prem database is :ref:`exasol.bucketfs.Bucket <api:exasol.bucketfs.Bucket>`.
The Bucket class for an On-Prem database is ``exasol.bucketfs.Bucket``.
The correspondent class for a SaaS database is exasol.bucketfs.SaaSBucket.
Using these classes the user can interact with the files in the bucket (download, upload, list and delete them).

Expand Down Expand Up @@ -60,13 +60,13 @@ Download files from a Bucket
Available Converters
____________________

* :ref:`exasol.bucketfs.as_bytes <api:exasol.bucketfs.as_bytes>`
* ``exasol.bucketfs.as_bytes``

* :ref:`exasol.bucketfs.as_string <api:exasol.bucketfs.as_string>`
* ``exasol.bucketfs.as_string``

* :ref:`exasol.bucketfs.as_hash <api:exasol.bucketfs.as_hash>`
* ``exasol.bucketfs.as_hash``

* :ref:`exasol.bucketfs.as_file <api:exasol.bucketfs.as_file>`
* ``exasol.bucketfs.as_file``

.. literalinclude:: /examples/download.py
:language: python3
Expand Down
19 changes: 19 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

# imports all nox task provided by the toolbox
from exasol.toolbox.nox.tasks import *
from noxconfig import PROJECT_CONFIG

# default actions to be run if nothing is explicitly specified with the -s option
nox.options.sessions = ["project:fix"]

def _coverage(session, config, context) -> None:
# Overrides default implementation of PTB
# in order to only run unit tests for coverage
from exasol.toolbox.nox._test import _unit_tests
command = ["poetry", "run", "coverage", "report", "-m"]
coverage_file = config.root / ".coverage"
coverage_file.unlink(missing_ok=True)
_unit_tests(session, config, context)
session.run(*command)

@nox.session(name="test:coverage", python=False)
def coverage(session) -> None:
from exasol.toolbox.nox._shared import _context
"""Runs all tests (unit + integration) and reports the code coverage"""
context = _context(session, coverage=True)
_coverage(session, PROJECT_CONFIG, context)

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ source = [
]

[tool.coverage.report]
fail_under = 15
fail_under = 77


[tool.black]
Expand All @@ -69,7 +69,7 @@ force_grid_wrap = 2


[tool.pylint.master]
fail-under = 7.0
fail-under = 7.4
output-format = "colorized,json:.lint.json,text:.lint.txt"

[tool.pylint.format]
Expand Down

0 comments on commit 1ed66a0

Please sign in to comment.