Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,49 @@ name: robotframework-cache CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.10", "3.12", "3.x"]
robot-version: ["~5", "~6", "~7"]
python-version: ["3.10", "3.12", "3.14"]
dependency-resolution: ["lowest-direct", "highest"]
fail-fast: false
env:
UV_RESOLUTION: ${{ matrix.dependency-resolution }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '${{ matrix.python-version }}'
cache: poetry
- name: Poetry install
run: poetry install --with test
- name: Install robotframework ${{ matrix.robot-version }}
run: poetry add robotframework=${{ matrix.robot-version }}

- name: Integration tests - robot
run: poetry run robot test/integration
- name: Integration tests - pabot suitelevel
run: poetry run pabot --pabotlib test/integration
- name: Integration tests - pabot testlevel
run: poetry run pabot --testlevelsplit --pabotlib test/integration

- name: Acceptance tests - robot
run: poetry run robot test/acceptance/run.robot
- name: Acceptance tests - pabot suitelevel
run: poetry run pabot --pabotlib test/acceptance/run.robot
- name: Acceptance tests - pabot testlevel
run: poetry run pabot --testlevelsplit --pabotlib test/acceptance/run.robot
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: |
uv sync --dev
uv tree --depth 1 --no-dev

- name: Lint
run: |
uv run invoke lint

- name: Test
run: |
uv run invoke test
43 changes: 18 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ All CacheLibrary tests are run with Pabot to ensure that the above statements ar

1. Install CacheLibrary with pip. Run the following command:

```shell
pip install robotframework-cache
```
```shell
pip install robotframework-cache
```

2. Import it from your `.robot` or `.resource` file. Add the following line to the `Settings`
section:
section:

```robotframework
Library CacheLibrary
```
```robotframework
Library CacheLibrary
```

3. Add the cache file to `.gitignore`. If you use the default file path, add the following to your
`.gitignore`:
`.gitignore`:

```plain
robotframework-cache.json
```
```plain
robotframework-cache.json
```

## Examples

Expand Down Expand Up @@ -158,19 +158,12 @@ Contributions are always welcome :)

1. Install the dependencies with `poetry`.

```shell
poetry install --with test
```
```shell
uv sync --with dev
```

2. Run the following commands in the repository root.
2. Run the following command in the repository root.

```shell
robot test/integration
robot test/acceptance/run.robot

pabot --pabotlib test/integration
pabot --pabotlib test/acceptance/run.robot

pabot --testlevelsplit --pabotlib test/integration
pabot --testlevelsplit --pabotlib test/acceptance/run.robot
```
```shell
uv run invoke test
```
234 changes: 0 additions & 234 deletions poetry.lock

This file was deleted.

2 changes: 0 additions & 2 deletions poetry.toml

This file was deleted.

90 changes: 74 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,84 @@
[tool.poetry]
[project]
name = "robotframework-cache"
version = "1.0.1"
description = "Robot Framework libary for caching values across tests and test runs"
authors = ["Sander van Beek <lakitna@gmail.com>"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "CacheLibrary", from = "src" }
authors = [{ name = "Sander van Beek" }]
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Framework :: Robot Framework",
"Framework :: Robot Framework :: Library",
"Development Status :: 5 - Production/Stable",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = ["robotframework (>=5.0.1)", "robotframework-pabot (>=2.2.0)"]

[tool.poetry.dependencies]
python = ">=3.10"
robotframework = ">=5.0.1"
robotframework-pabot = ">2"
[dependency-groups]
dev = [
"ruff (>=0.9.1,<0.10.0)",
"robotframework-robocop (>=7.0.0,<8.0.0)",
"robotframework-faker (>=5.0.0)",
"invoke (>=2.2.1)",
# Required for faker <6.0.0
"setuptools (>=80.0.0,<81.0.0)",
]

[tool.poetry.group.test]
optional = true
[tool.uv.build-backend]
module-name = "CacheLibrary"

[tool.poetry.group.test.dependencies]
robotframework-faker = "^5.0.0"
setuptools = ">=75.6,<79.0"
[project.urls]
Homepage = "https://github.com/Lakitna/robotframework-cache"
Repository = "https://github.com/Lakitna/robotframework-cache"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.10.8,<0.11.0"]
build-backend = "uv_build"

[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
norecursedirs = ['robot', 'src', 'test/projects']
python_files = ['test/**/*.py']

[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = ["ALL"]
ignore = [
"FIX", # flake8-fixme. Superseeded by TD

# Ruleset: flake8-annotations
"ANN201",

# Ruleset: pydocstyle
# Docstring presence
"D100",
"D107", # Prefer class docstring over __init__ docstring
# Docstring contents
"D200",
"D203",
"D212", # conflicts with D213
"D400",
"D415",

# Ruleset: tryceratops
"TRY003",

# Ruleset: flake8-todos
"TD002", # Use issue code instead

# Ruleset: perflint
"PERF401", # Readability > micro performance

# Ruleset: flake8-datetimez
"DTZ005", # Not relevant for this project

# Ruleset: pep8-naming
"N999", # Not always relevant for Robot Libraries
]

[tool.ruff.lint.per-file-ignores]
"test/**" = ['D101', 'D102', 'INP001']
"./tasks.py" = ['T201', 'D103']
Loading
Loading