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

Added pytest_saas as sub project #12

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ cython_debug/


.lint.*

# Emacs
TAGS
11 changes: 7 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECTS := "pytest-itde"
PROJECTS := "pytest-saas pytest-itde"

# Default target
default:
Expand All @@ -12,10 +12,9 @@ test +projects=PROJECTS:
poetry -C ${p}/ run nox -f ${p}/noxfile.py -s coverage
done


# Create a release
release project version:
@echo "This currently is a stub, in the future the workflow probably will look somthing like this:"
@echo "This currently is a stub, in the future the workflow probably will look something like this:"
@echo ""
ckunki marked this conversation as resolved.
Show resolved Hide resolved
@echo "poetry -C {{project}} run -f {{project}}/noxfile -s release {{ version }}"
@echo ""
Expand All @@ -29,4 +28,8 @@ release project version:
@echo "* create & publish github release"
@echo "* create & publish pypi release"
@echo "* create/output slack announcement and print to terminal"

@echo ""
@echo "ensure environment variables are set: POETRY_HTTP_BASIC_PYPI_USERNAME and POETRY_HTTP_BASIC_PYPI_PASSWORD"
#!/usr/bin/env bash
echo poetry -C {{project}}/ build
echo poetry -C {{project}}/ publish
10 changes: 5 additions & 5 deletions pytest-itde/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pytest-itde Plugin
==================
pytest-exasol-itde Plugin
=========================
ckunki marked this conversation as resolved.
Show resolved Hide resolved

The `pytest-itde` plugin is a pytest plugin designed to facilitate the integration testing of projects using the Exasol Integration Test Docker Environment (ITDE).
The `pytest-exasol-itde` plugin is a pytest plugin designed to facilitate the integration testing of projects using the Exasol Integration Test Docker Environment (ITDE).
This plugin was originally a part of `ITDE <https://github.com/exasol/integration-test-docker-environment>`_, offering its functionalities directly within the test environment.

Features
Expand All @@ -13,9 +13,9 @@ Features
Installation
------------

To install the pytest-itde plugin, you can use pip:
To install the pytest-exasol-itde plugin, you can use pip:

.. code-block:: bash

pip install pytest-itde
pip install pytest-exasol-itde

1 change: 1 addition & 0 deletions pytest-saas/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.html-documentation
17 changes: 17 additions & 0 deletions pytest-saas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# pytest-saas Plugin
ckunki marked this conversation as resolved.
Show resolved Hide resolved

The `pytest-exasol-saas` plugin is a pytest plugin designed to facilitate the integration
testing of projects using the [exasol-saas-api](https://github.com/exasol/saas-api-python).

## Features

* **Integration with exasol-saas-api**: Designed to work closely with the exasol-saas-api.
* **Ease of Use:** Simplifies the configuration and execution of tests by leveraging the pytest framework, making it accessible to developers familiar with pytest conventions.

## Installation

To install the pytest-exasol-saas plugin, you can use pip:

```shell
pip install pytest-exasol-saas
```
12 changes: 12 additions & 0 deletions pytest-saas/doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changes

* [unreleased](unreleased.md)

<!--- This MyST Parser Sphinx directive is necessary to keep Sphinx happy. We need list here all release letters again, because release droid and other scripts assume Markdown --->
```{toctree}
---
hidden:
---
unreleased

```
11 changes: 11 additions & 0 deletions pytest-saas/doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Unreleased

## Summary

🚀 Initial Release of the pytest-saas Plugin

This version introduces the `pytest-saas` plugin providing pytest functionalities for the API to Exasol SaaS instances provided by [exasol-saas-api](https://github.com/exasol/saas-api-python).
ckunki marked this conversation as resolved.
Show resolved Hide resolved

## Features

* #9: Added sub-project for exasol-saas-api
10 changes: 10 additions & 0 deletions pytest-saas/exasol/pytest_saas/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ATTENTION:
# This file is generated by exasol/toolbox/pre_commit_hooks/package_version.py when using:
# * either "poetry run nox -s fix"
# * or "poetry run version-check <path/version.py> --fix"
# Do not edit this file manually!
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
MAJOR = 0
MINOR = 1
PATCH = 0
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"
39 changes: 39 additions & 0 deletions pytest-saas/noxconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""Configuration for nox based task runner"""
from __future__ import annotations

from dataclasses import dataclass
from pathlib import Path
from typing import (
Any,
Iterable,
MutableMapping,
)

from nox import Session


@dataclass(frozen=True)
class Config:
"""Project specific configuration used by nox infrastructure"""

root: Path = Path(__file__).parent
doc: Path = Path(__file__).parent / "doc"
version_file: Path = Path(__file__).parent / "exasol" / "pytest_saas" / "version.py"
path_filters: Iterable[str] = ("dist", ".eggs", "venv", "metrics-schema")

@staticmethod
def pre_integration_tests_hook(
_session: Session, _config: Config, _context: MutableMapping[str, Any]
) -> bool:
"""Implement if project specific behaviour is required"""
return True

@staticmethod
def post_integration_tests_hook(
_session: Session, _config: Config, _context: MutableMapping[str, Any]
) -> bool:
"""Implement if project specific behaviour is required"""
return True


PROJECT_CONFIG = Config()
11 changes: 11 additions & 0 deletions pytest-saas/noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""defines nox tasks/targets for this project"""
import sys

import nox

print(sys.path)
# imports all nox task provided by the toolbox
from exasol.toolbox.nox.tasks import * # pylint: disable=wildcard-import disable=unused-wildcard-import

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