specware 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specware
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Provides utilities to specify software.
5
5
  Keywords: certification,documentation,markdown,qualification,requirements-management,traceability
6
6
  Author: The specware Authors
@@ -20,7 +20,7 @@ Classifier: Topic :: Software Development :: Quality Assurance
20
20
  Classifier: Topic :: Software Development :: Testing :: Acceptance
21
21
  Classifier: Topic :: Text Processing :: Markup
22
22
  Classifier: Typing :: Typed
23
- Requires-Dist: specitems>=1.2.0
23
+ Requires-Dist: specitems>=1.4.5
24
24
  Requires-Python: >=3.11
25
25
  Project-URL: Source Code, https://github.com/specthings/specware
26
26
  Project-URL: Bug Tracker, https://github.com/specthings/specware/issues
@@ -4,7 +4,7 @@
4
4
 
5
5
  [project]
6
6
  name = "specware"
7
- version = "1.2.0"
7
+ version = "1.2.2"
8
8
  description = "Provides utilities to specify software."
9
9
  authors = [
10
10
  {name = "The specware Authors", email = "specthings@embedded-brains.de"}
@@ -13,7 +13,7 @@ license = "BSD-2-Clause"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
15
15
  dependencies = [
16
- "specitems >=1.2.0",
16
+ "specitems >=1.4.5",
17
17
  ]
18
18
  keywords = [
19
19
  "certification",
@@ -51,7 +51,7 @@ specwareverify = "specware.cliverify:cliverify"
51
51
  specwareview = "specware.cliview:cliview"
52
52
 
53
53
  [build-system]
54
- requires = ["uv_build>=0.10.0,<0.11.0"]
54
+ requires = ["uv_build>=0.10.0"]
55
55
  build-backend = "uv_build"
56
56
 
57
57
  [dependency-groups]
@@ -37,7 +37,7 @@ from specitems import (Content, DocumentGlossaryConfig, GlossaryConfig,
37
37
  MarkdownMapper, SpecDocumentConfig, SphinxContent,
38
38
  SphinxMapper, augment_glossary_terms, create_config,
39
39
  generate_glossary, generate_specification_documentation,
40
- item_is_enabled)
40
+ item_is_enabled, monitor_logging)
41
41
 
42
42
  from specware import (MarkdownInterfaceMapper, SpecWareTypeProvider,
43
43
  SphinxInterfaceMapper,
@@ -123,26 +123,30 @@ def _generate_more(item_cache: ItemCache, config: dict,
123
123
  def cliexport(argv: list[str] = sys.argv):
124
124
  """ Export the specification to source and documentation files. """
125
125
  args = _parse_args(argv)
126
- config, working_directory = load_specware_config(args.config_file)
127
- Content.AUTOMATICALLY_GENERATED_WARNING = config.get(
128
- "automatically-generated-warning",
129
- Content.AUTOMATICALLY_GENERATED_WARNING)
130
- with contextlib.chdir(working_directory):
131
- item_cache = ItemCache(create_config(config["spec"], ItemCacheConfig),
132
- type_provider=SpecWareTypeProvider({}),
133
- is_item_enabled=item_is_enabled)
134
- for uid in config["glossary"]["project-groups"]:
135
- group = item_cache[uid]
136
- assert group.type == "glossary/group"
137
- augment_glossary_terms(group, [])
126
+ with monitor_logging() as monitor:
127
+ config, working_directory = load_specware_config(args.config_file)
128
+ Content.AUTOMATICALLY_GENERATED_WARNING = config.get(
129
+ "automatically-generated-warning",
130
+ Content.AUTOMATICALLY_GENERATED_WARNING)
131
+ with contextlib.chdir(working_directory):
132
+ item_cache = ItemCache(create_config(config["spec"],
133
+ ItemCacheConfig),
134
+ type_provider=SpecWareTypeProvider({}),
135
+ is_item_enabled=item_is_enabled)
136
+ for uid in config["glossary"]["project-groups"]:
137
+ group = item_cache[uid]
138
+ assert group.type == "glossary/group"
139
+ augment_glossary_terms(group, [])
138
140
 
139
- if not args.no_code and not args.no_validation_code:
140
- config_validation = config["validation"]
141
- for mapping in config_validation["base-directory-map"]:
142
- for key, value in mapping.items():
143
- mapping[key] = os.path.normpath(
144
- os.path.join(working_directory, value))
145
- generate_validation(config_validation, item_cache, args.targets)
141
+ if not args.no_code and not args.no_validation_code:
142
+ config_validation = config["validation"]
143
+ for mapping in config_validation["base-directory-map"]:
144
+ for key, value in mapping.items():
145
+ mapping[key] = os.path.normpath(
146
+ os.path.join(working_directory, value))
147
+ generate_validation(config_validation, item_cache,
148
+ args.targets)
146
149
 
147
- if not args.targets:
148
- _generate_more(item_cache, config, args)
150
+ if not args.targets:
151
+ _generate_more(item_cache, config, args)
152
+ return monitor.get_status().exit_code()
@@ -3,7 +3,7 @@
3
3
  Provides a command line interface to verify the specification item format.
4
4
  """
5
5
 
6
- # Copyright (C) 2020, 2025 embedded brains GmbH & Co. KG
6
+ # Copyright (C) 2020, 2026 embedded brains GmbH & Co. KG
7
7
  #
8
8
  # Redistribution and use in source and binary forms, with or without
9
9
  # modification, are permitted provided that the following conditions
@@ -51,4 +51,4 @@ def cliverify(argv: list[str] = sys.argv):
51
51
  cache_directory="cache-specware")
52
52
  type_provider = SpecWareTypeProvider({})
53
53
  item_cache = ItemCache(config, type_provider=type_provider)
54
- verify_specification_format(item_cache)
54
+ return verify_specification_format(item_cache).exit_code()
@@ -1,7 +1,7 @@
1
1
  # SPDX-License-Identifier: BSD-2-Clause
2
2
  """ Provides methods to generate C language validation tests. """
3
3
 
4
- # Copyright (C) 2020, 2025 embedded brains GmbH & Co. KG
4
+ # Copyright (C) 2020, 2026 embedded brains GmbH & Co. KG
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
7
7
  # modification, are permitted provided that the following conditions
@@ -29,6 +29,7 @@
29
29
  import itertools
30
30
  import functools
31
31
  import os
32
+ import logging
32
33
  import re
33
34
  from typing import Any, Optional
34
35
 
@@ -1308,9 +1309,10 @@ class _SourceFile:
1308
1309
  """
1309
1310
  base_directory = self._base_directory
1310
1311
  if base_directory is None:
1311
- raise ValueError(
1312
- f"the source file '{self._file}' is not a source file of "
1313
- "an item of type 'build/test-program'")
1312
+ logging.error(
1313
+ "the source file '%s' is not a source file of "
1314
+ "an item of type 'build/test-program'", self._file)
1315
+ return
1314
1316
  content = CContent()
1315
1317
  includes: list[CInclude] = []
1316
1318
  local_includes: list[CInclude] = []
File without changes
File without changes
File without changes
File without changes
File without changes