Skip to content

Commit

Permalink
Merge branch 'mainline' into add_ksp_bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaseck authored Jul 10, 2024
2 parents c787abd + 29129a2 commit a2d0f61
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 27 deletions.
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sync = "pip install -r requirements-testing.txt"
test = "pytest {args:test}"
typing = "mypy {args:src test}"
style = [
"ruff {args:.}",
"ruff check {args:.}",
"black --check --diff {args:.}",
]
fmt = [
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ module = ["lux.*", "qtpy.*"]
ignore_missing_imports = true

[tool.ruff]
ignore = [
"E501",
]
line-length = 100

[tool.ruff.isort]
[tool.ruff.lint]
ignore = ["E501"]

[tool.ruff.lint.isort]
known-first-party = [
"deadline",
"openjd"
Expand All @@ -104,7 +104,6 @@ known-first-party = [
[tool.black]
line-length = 100


[tool.pytest.ini_options]
xfail_strict = true
addopts = [
Expand Down
16 changes: 8 additions & 8 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
black == 24.*
coverage[toml] == 7.*
pytest ~= 8.2
pytest-cov ~= 5.0
pytest-xdist ~= 3.6
twine ~= 5.1
mypy ~= 1.10
black ~= 24.4
ruff ~= 0.4.8
types-pyyaml ~= 6.0
mypy == 1.*
pytest == 8.*
pytest-cov == 5.*
pytest-xdist == 3.*
ruff == 0.5.*
types-pyyaml == 6.*
twine == 5.*
17 changes: 4 additions & 13 deletions scripts/_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,14 @@ def get_project_dict(project_path: Optional[Path] = None) -> dict[str, Any]:

class Dependency:
name: str
operator: Optional[str]
version: Optional[str]
pip_requirement: str

def __init__(self, dep: str):
components = dep.split(" ")
self.name = components[0]
if len(components) > 2:
self.operator = components[1]
self.version = components[2]
else:
self.operator = None
self.version = None
self.pip_requirement = dep.strip().split(";", maxsplit=1)[0].replace(" ", "")
self.name = dep.strip().split(" ", maxsplit=1)[0]

def for_pip(self) -> str:
if self.operator is not None and self.version is not None:
return f"{self.name}{self.operator}{self.version}"
return self.name
return self.pip_requirement

def __repr__(self) -> str:
return self.for_pip()
Expand Down

0 comments on commit a2d0f61

Please sign in to comment.