Skip to content

Commit

Permalink
Update dependencies (#45)
Browse files Browse the repository at this point in the history
* update everything

* version bump

* fix a typo
  • Loading branch information
dontseyit committed Apr 2, 2024
1 parent b59d62b commit e465be1
Show file tree
Hide file tree
Showing 8 changed files with 457 additions and 860 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
- id: no-commit-to-branch
args: [--branch, dev, --branch, int, --branch, main]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
8 changes: 4 additions & 4 deletions .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "ghga_datasteward_kit"
version = "1.2.1"
version = "2.0.0"
description = "GHGA Data Steward Kit - A utils package for GHGA data stewards."
dependencies = [
"crypt4gh >=1.6, <2",
"hexkit[s3]~=1.0.0",
"ghga-transpiler~=1.4.0",
"metldata~=1.1.0",
"hexkit[s3] >=2.1.1, <3",
"ghga-transpiler >=2, <3",
"metldata~=1.2.1",
]

[project.urls]
Expand Down
3 changes: 2 additions & 1 deletion lock/requirements-dev-template.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jsonschema2md>=1.0.0
setuptools>=69.1.0

# required since switch to pyproject.toml and pip-tools
pip-tools>=7.4.0
tomli>=2.0.1
tomli_w>=1.0.0

uv>=0.1.21
601 changes: 240 additions & 361 deletions lock/requirements-dev.txt

Large diffs are not rendered by default.

658 changes: 185 additions & 473 deletions lock/requirements.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ classifiers = [
"Intended Audience :: Developers",
]
name = "ghga_datasteward_kit"
version = "1.2.1"
version = "2.0.0"
description = "GHGA Data Steward Kit - A utils package for GHGA data stewards."
dependencies = [
"crypt4gh >=1.6, <2",
"hexkit[s3]~=1.0.0",
"ghga-transpiler~=1.4.0",
"metldata~=1.1.0",
"hexkit[s3] >=2.1.1, <3",
"ghga-transpiler >=2, <3",
"metldata~=1.2.1",
]

[project.license]
Expand Down
35 changes: 20 additions & 15 deletions scripts/update_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import os
import re
import subprocess
from itertools import zip_longest
from pathlib import Path
from tempfile import TemporaryDirectory

Expand Down Expand Up @@ -63,22 +64,25 @@ def fix_temp_dir_comments(file_path: Path):
def is_file_outdated(old_file: Path, new_file: Path) -> bool:
"""Compares two lock files and returns True if there is a difference, else False"""

header_comment = "# pip-compile"
outdated = False

with open(old_file, encoding="utf-8") as old:
with open(new_file, encoding="utf-8") as new:
old_lines = old.readlines()
new_lines = new.readlines()
if len(old_lines) != len(new_lines):
outdated = True
if not outdated:
for old_line, new_line in zip(old_lines, new_lines):
if old_line.startswith(header_comment):
continue
if old_line != new_line:
outdated = True
break
outdated = any(
old_line != new_line
for old_line, new_line in zip_longest(
(
line
for line in (line.strip() for line in old)
if line and not line.startswith("#")
),
(
line
for line in (line.strip() for line in new)
if line and not line.startswith("#")
),
)
)
if outdated:
cli.echo_failure(f"{str(old_file)} is out of date!")
return outdated
Expand All @@ -97,10 +101,11 @@ def compile_lock_file(
print(f"Updating '{output.name}'...")

command = [
"pip-compile",
"--rebuild",
"uv",
"pip",
"compile",
"--refresh",
"--generate-hashes",
"--annotate",
]

if upgrade:
Expand Down
2 changes: 1 addition & 1 deletion src/ghga_datasteward_kit/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def transform_metadata(*, config: MetadataConfig) -> None:
run_workflow_on_all_source_events(
event_config=config,
workflow_definition=GHGA_ARCHIVE_WORKFLOW,
worflow_config=config.workflow_config,
workflow_config=config.workflow_config,
original_model=config.metadata_model,
)
)
Expand Down

0 comments on commit e465be1

Please sign in to comment.