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
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dynamic = ["version"]
description = "StrictDoc is open-source software for technical documentation and requirements management."
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Stanislav Pankevich", email = "s.pankevich@gmail.com" },
{ name = "Maryna Balioura", email = "mettta@gmail.com" },
Expand All @@ -34,7 +34,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -54,7 +53,7 @@ dependencies = [
"toml",

# Parsing and rendering RST.
"docutils >= 0.16, == 0.*",
"docutils >= 0.22.2, == 0.*",

# Tree Sitter is used for language/AST-aware parsing of Python, C and other files.
"tree-sitter",
Expand Down
3 changes: 1 addition & 2 deletions strictdoc/core/file_traceability_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from strictdoc.helpers.exception import StrictDocException
from strictdoc.helpers.google_test import convert_function_name_to_gtest_macro
from strictdoc.helpers.ordered_set import OrderedSet
from strictdoc.helpers.removeprefix import removeprefix

if TYPE_CHECKING:
from strictdoc.core.traceability_index import (
Expand Down Expand Up @@ -259,7 +258,7 @@ def validate_and_resolve(

functions: List[Function]
if test_function.startswith("#GTEST#"):
test_function = removeprefix(test_function, "#GTEST#")
test_function = test_function.removeprefix("#GTEST#")
possible_gtest_functions = (
convert_function_name_to_gtest_macro(test_function)
)
Expand Down
12 changes: 0 additions & 12 deletions strictdoc/helpers/removeprefix.py

This file was deleted.

2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ def lint_mypy(context):
--warn-unreachable
--warn-unused-ignores

--python-version=3.8
--python-version=3.9
""",
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: cd %T && gcc --coverage -g -O0 -o main %S/src/main.c

RUN: cd %T && ./main | filecheck %s --check-prefix CHECK-C
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

# Create a separate input folder to ensure clear management of the SDoc files.
RUN: %mkdir %S/sandbox
RUN: %cp %S/strictdoc.toml %S/sandbox/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

# Create a separate input folder to ensure clear management of the SDoc files.
RUN: %mkdir %S/sandbox
RUN: %cp %S/strictdoc.toml %S/sandbox/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER
REQUIRES: PLATFORM_IS_NOT_WINDOWS
REQUIRES: TEST_HTML2PDF

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-139, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

# This test ensures that the entire file marker is correctly displayed as
# covering the file from its first line and until the last line.
# It fixes this issue:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-138, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-145, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-139, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, SDOC-SRS-137, SDOC-SRS-145, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Reproducer

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# @relation(SDOC-SRS-146, scope=file)
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-146, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-138, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-145, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-145, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-140, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-139, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T
| filecheck %s --dump-input=fail
CHECK: Published: Hello world doc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @relation(SDOC-SRS-147, SDOC-SRS-137, scope=file)

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: Published: Hello world doc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# @relation(SDOC-SRS-33, scope=file)
#

REQUIRES: PYTHON_39_OR_HIGHER

# invalid_file.* was created with echo "00 08 00 00" | xxd -r -p > file.bin
RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
CHECK: warning: Skip tracing binary file {{.*}}invalid_file.bin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s

CHECK: Published: Hello world doc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s

CHECK: Published: Hello world doc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s

CHECK: Published: Hello world doc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# specifications is not written back to file system when auto-uid command
# is executed.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: cp -r %S/* ./
RUN: %strictdoc manage auto-uid .

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: cp -r %S/* ./
RUN: %strictdoc manage auto-uid .

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This test mainly verifies that the test results are resolved for multiple test
# cases and multiple files.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This test mainly verifies that the test results are resolved for multiple test
# cases and multiple files.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This test mainly verifies that the test results are resolved for multiple test
# cases and multiple files.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This test mainly verifies that the test results are resolved for multiple test
# cases and multiple files.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail

# Ensure that the test report document is generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# FIXME: Migrate this test to %T.

REQUIRES: PYTHON_39_OR_HIGHER

RUN: cd %S && PYTHONPATH=$(pwd) pytest tests/ --junit-xml=%T/tests_unit.pytest.junit.xml --rootdir=%S
RUN: mkdir -p reports/ && cp %T/tests_unit.pytest.junit.xml reports/tests_unit.pytest.junit.xml
RUN: %strictdoc export %S --output-dir %T | filecheck %s --dump-input=fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# FIXME: Migrate this test to %T.

REQUIRES: PYTHON_39_OR_HIGHER

# Failing test will exit with a non-zero code. Use "true" to make LIT continue running.
RUN: cd %S && PYTHONPATH=$(pwd) pytest tests/ --junit-xml=%T/tests_unit.pytest.junit.xml --rootdir=%S ; true
RUN: mkdir -p reports/ && cp %T/tests_unit.pytest.junit.xml reports/tests_unit.pytest.junit.xml
Expand Down
Loading
Loading