Skip to content

Commit

Permalink
fix: correct release
Browse files Browse the repository at this point in the history
BREAKING CHANGE: 1.0
  • Loading branch information
rjdbcm authored Aug 29, 2024
2 parents ad66d31 + 4366ced commit eb199c1
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 23 deletions.
84 changes: 84 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,88 @@
# ozi-core CHANGELOG
## 0.4.0 (2024-08-29)


### Build


* (deps): ozi-templates~=2.10.1 — rjdbcm <[email protected]>
([`8d3db61`](https://github.com/OZI-Project/ozi-core/commit/8d3db61216deab6dd623a03ebeda754744474af2))

* (deps): update ozi-spec requirement from ~=0.8.1 to ~=0.9.1

Updates the requirements on [ozi-spec](https://github.com/OZI-Project/ozi-spec) to permit the latest version.
- [Release notes](https://github.com/OZI-Project/ozi-spec/releases)
- [Changelog](https://github.com/OZI-Project/ozi-spec/blob/0.9.1/CHANGELOG.md)
- [Commits](https://github.com/OZI-Project/ozi-spec/compare/0.8.1...0.9.1)


updated-dependencies:
- dependency-name: ozi-spec
dependency-type: direct:production
... — dependabot[bot] <[email protected]>
([`d570726`](https://github.com/OZI-Project/ozi-core/commit/d57072676e1f2ec2e995c3421183084208c9bffa))

* (deps): update ozi-templates requirement from ~=2.9.3 to ~=2.10.0


updated-dependencies:
- dependency-name: ozi-templates
dependency-type: direct:production
... — dependabot[bot] <[email protected]>
([`a9548da`](https://github.com/OZI-Project/ozi-core/commit/a9548da914b3cef22eb5d1bea35aacead1ed61ea))


### Feature


* feat: OZI.build 1.3 ozi-templates 2.10 ozi-spec 0.9 — rjdbcm <[email protected]>
([`df99c91`](https://github.com/OZI-Project/ozi-core/commit/df99c9126bbf522e47a15cf4d6d96090390ab861))


### 🐛 Fixed Bugs

* Update pyproject.toml tox requirements install — Eden Ross Duff, MSc <[email protected]>
([`c79cac8`](https://github.com/OZI-Project/ozi-core/commit/c79cac8aedd88ad0a97c9cc179743b93503de8de))

* remove requirements — rjdbcm <[email protected]>
([`7835209`](https://github.com/OZI-Project/ozi-core/commit/7835209bcf5c09c7171a2b5a531fcedf3fbb4f00))

* remove requires-python key — rjdbcm <[email protected]>
([`63aed2c`](https://github.com/OZI-Project/ozi-core/commit/63aed2c8808e936865cf24e8a3b063975041db88))

* update wrapfile — rjdbcm <[email protected]>
([`8470c88`](https://github.com/OZI-Project/ozi-core/commit/8470c885dd7a6aafa4e377c88f187b1b346fa8de))


### Performance


* perf: add ``# pragma: no cover`` to previously masked untested code — rjdbcm <[email protected]>
([`024c204`](https://github.com/OZI-Project/ozi-core/commit/024c2041f0c176088b76662b255cd782d99d1f80))

* perf: use main revision of OZI pre-1.20 — rjdbcm <[email protected]>
([`6d81567`](https://github.com/OZI-Project/ozi-core/commit/6d81567553c83234e27e658e8b4b97955273e1a8))

* perf: add install_dependencies postconf script — rjdbcm <[email protected]>
([`1c594c4`](https://github.com/OZI-Project/ozi-core/commit/1c594c450a732b3492aeff6762a05b135ffb4356))


### Unknown


* Update meson.build

BREAKING: 1.0 removes requirements.in — Eden Ross Duff, MSc <[email protected]>
([`b06b8f2`](https://github.com/OZI-Project/ozi-core/commit/b06b8f2a1885b949bc9c11530c43679658c13eff))

* Update README

BREAKING: 1.0 — Eden Ross Duff, MSc <[email protected]>
([`41ddc46`](https://github.com/OZI-Project/ozi-core/commit/41ddc467c5d5cf20c2e96cc314094055b1ba38d7))

* :bug: remove requires-python key — rjdbcm <[email protected]>
([`ef37bfa`](https://github.com/OZI-Project/ozi-core/commit/ef37bfa72bbc9747850f548bb307944a1ad6e66e))

## 0.3.1 (2024-08-23)


Expand Down
8 changes: 8 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ root_files = [
]
pyproject_config = configuration_data()
pyproject_config.set('VCS_TAG', '@VCS_TAG@')
pyproject_config.set(
'PYTHON_VERSION_DIST',
'py'+''.join(python.language_version().split('.'))
)
configure_file(
input: 'pyproject.toml',
output: 'pyproject.toml',
Expand Down Expand Up @@ -67,4 +71,8 @@ if not meson.is_subproject()
endforeach
meson.add_dist_script(dev.get_variable('pip'), 'install', 'tomli>=2.0.0')
meson.add_dist_script(python, '-c', dev.get_variable('meson_dist_setuptools_scm'))
deps = run_command(python, '-c', dev.get_variable('install_dependencies'), check: true).stdout().strip().split('$$')
if deps[0] != ''
meson.add_postconf_script(dev.get_variable('pip'), 'install', deps)
endif
endif
4 changes: 1 addition & 3 deletions ozi_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version

from setuptools_scm import get_version # type: ignore


def current_version() -> str:
"""Returns the currently installed version of OZI.
Expand All @@ -28,7 +26,7 @@ def current_version() -> str:
try:
version_ = version('OZI')
except PackageNotFoundError: # pragma: no cover
version_ = str(get_version(root='..', relative_to=__file__))
version_ = str('1.20')
return version_


Expand Down
16 changes: 8 additions & 8 deletions ozi_core/fix/build_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def inspect_files(
rel_path: Path,
found_files: list[str],
extra_files: list[str],
) -> list[str]:
) -> list[str]: # pragma: no cover
build_files = [str(rel_path / 'meson.build'), str(rel_path / 'meson.options')]
_found_files = []
for file in extra_files: # pragma: no cover
for file in extra_files:
found_literal = query_build_value(
str(target / rel_path),
file,
Expand All @@ -54,7 +54,7 @@ def process(
target: Path,
rel_path: Path,
found_files: list[str] | None = None,
) -> list[str]:
) -> list[str]: # pragma: no cover
"""Process an OZI project build definition's files."""
try:
extra_files = [
Expand All @@ -63,7 +63,7 @@ def process(
if os.path.isfile(target / rel_path / file)
and not os.path.islink(target / rel_path / file)
]
except FileNotFoundError: # pragma: no cover
except FileNotFoundError:
TAP.not_ok('Missing required project directory.')
extra_files = []
found_files = found_files if found_files else []
Expand All @@ -81,10 +81,10 @@ def validate(
rel_path: Path,
subdirs: list[str],
children: set[str] | None,
) -> Generator[Path, None, None]:
) -> Generator[Path, None, None]: # pragma: no cover
"""Validate an OZI standard build definition's directories."""
for directory in subdirs:
match directory, children: # pragma: no cover
match directory, children:
case [directory, _] if directory not in IGNORE_MISSING:
TAP.ok(
str(rel_path / 'meson.build'),
Expand All @@ -99,7 +99,7 @@ def validate(
str(directory),
skip=True,
)
case _: # pragma: no cover
case _:
TAP.diagnostic('build_definition.validate', 'invalid arguments')


Expand All @@ -108,7 +108,7 @@ def walk(
rel_path: Path,
found_files: list[str] | None = None,
project_name: str | None = None,
) -> None:
) -> None: # pragma: no cover
"""Walk an OZI standard build definition directory."""
found_files = process(target, rel_path, found_files)
children = list(
Expand Down
16 changes: 8 additions & 8 deletions ozi_core/fix/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from email.message import Message


def render_requirements(target: Path) -> str:
def render_requirements(target: Path) -> str: # pragma: no cover
"""Render requirements.in as it would appear in PKG-INFO"""
requirements = (
r.partition('\u0023')[0]
Expand Down Expand Up @@ -58,34 +58,34 @@ def render_pkg_info(target: Path, name: str, _license: str) -> Message:
)


def python_support(pkg_info: Message) -> set[tuple[str, str]]:
def python_support(pkg_info: Message) -> set[tuple[str, str]]: # pragma: no cover
"""Check PKG-INFO Message for python support."""
remaining_pkg_info = {
(k, v)
for k, v in pkg_info.items()
if k not in METADATA.spec.python.pkg.info.required
}
for k, v in iter(METADATA.ozi.python_support.classifiers[:4]):
if (k, v) in remaining_pkg_info: # pragma: no cover
if (k, v) in remaining_pkg_info:
TAP.ok(k, v)
else:
TAP.not_ok('MISSING', v) # pragma: defer to good-issue
TAP.not_ok('MISSING', v)
return remaining_pkg_info


def required_extra_pkg_info(pkg_info: Message) -> dict[str, str]:
def required_extra_pkg_info(pkg_info: Message) -> dict[str, str]: # pragma: no cover
"""Check missing required OZI extra PKG-INFO"""
remaining_pkg_info = python_support(pkg_info)
remaining_pkg_info.difference_update(set(iter(METADATA.ozi.python_support.classifiers)))
for k, v in iter(remaining_pkg_info):
TAP.ok(k, v)
extra_pkg_info, errstr = parse_extra_pkg_info(pkg_info)
if errstr not in ('', None): # pragma: no cover
if errstr not in ('', None):
TAP.not_ok('MISSING', str(errstr))
return extra_pkg_info


def required_pkg_info(
def required_pkg_info( # pragma: no cover
target: Path,
) -> tuple[str, dict[str, str]]:
"""Find missing required PKG-INFO"""
Expand Down Expand Up @@ -113,7 +113,7 @@ def required_files(
kind: str,
target: Path,
name: str,
) -> list[str]:
) -> list[str]: # pragma: no cover
"""Count missing files required by OZI"""
found_files = []
match kind:
Expand Down
4 changes: 2 additions & 2 deletions ozi_core/pkg_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def _pkg_info_extra(payload: str, as_message: bool = True) -> dict[str, str] | M

def parse_extra_pkg_info(
pkg_info: Message,
) -> tuple[dict[str, str], str | None]:
) -> tuple[dict[str, str], str | None]: # pragma: defer to good-first-issue
"""Get extra Classifiers tacked onto the PKG-INFO payload by OZI."""
errstr = None
try:
extra_pkg_info = dict(
_pkg_info_extra(str(pkg_info.get_payload())),
) # pyright: ignore
except ParseException as e: # pragma: defer to good-first-issue
except ParseException as e:
extra_pkg_info = {}
newline = '\n'
errstr = str(e).replace(newline, ' ')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
'idna>=2',
'meson[ninja]>=1.1.0',
'ozi-spec~=0.9.1',
'ozi-templates~=2.10.0',
'ozi-templates~=2.10.1',
'packaging~=24.1',
'prompt-toolkit',
'pyparsing~=3.1',
Expand Down
2 changes: 1 addition & 1 deletion subprojects/ozi.wrap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[wrap-git]
url = https://github.com/OZI-Project/ozi.git
revision = release/1.19
revision = main
depth = 1

[provide]
Expand Down

0 comments on commit eb199c1

Please sign in to comment.