Skip to content

Commit

Permalink
Merge branch 'main' into fix_initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
trappitsch committed Feb 21, 2024
2 parents 6cffb91 + 3440f8a commit f45b6b1
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ authors = [
dependencies = [
"click>=8.1.7",
"tomlkit>=0.12.3",
"rich-click>=1.7.3",
]
requires-python = ">= 3.8"
license = { text = "MIT" }
Expand Down Expand Up @@ -56,3 +57,4 @@ markers = [

[tool.box]
builder = "rye"
app_entry = "box.cli:cli"
13 changes: 13 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,32 @@
-e file:.
click==8.1.7
# via box
# via rich-click
coverage==7.4.1
# via pytest-cov
iniconfig==2.0.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
packaging==23.2
# via pytest
pluggy==1.4.0
# via pytest
pygments==2.17.2
# via rich
pytest==8.0.0
# via pytest-cov
# via pytest-mock
pytest-cov==4.1.0
pytest-mock==3.12.0
rich==13.7.0
# via rich-click
rich-click==1.7.3
# via box
ruff==0.1.15
tomlkit==0.12.3
# via box
typing-extensions==4.9.0
# via rich-click
13 changes: 13 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,18 @@
-e file:.
click==8.1.7
# via box
# via rich-click
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
pygments==2.17.2
# via rich
rich==13.7.0
# via rich-click
rich-click==1.7.3
# via box
tomlkit==0.12.3
# via box
typing-extensions==4.9.0
# via rich-click
2 changes: 1 addition & 1 deletion src/box/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
import shutil

import click
import rich_click as click

from box.config import PyProjectParser

Expand Down
2 changes: 1 addition & 1 deletion src/box/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import click
import rich_click as click

from box.cleaner import CleanProject
from box.initialization import InitializeProject
Expand Down
2 changes: 1 addition & 1 deletion src/box/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import List

import click
import rich_click as click

from box.config import PyProjectParser, pyproject_writer

Expand Down
2 changes: 1 addition & 1 deletion src/box/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tarfile
import urllib.request

import click
import rich_click as click

from box import BUILD_DIR_NAME, RELEASE_DIR_NAME
from box.config import PyProjectParser
Expand Down
6 changes: 3 additions & 3 deletions tests/func/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import tarfile
import urllib.request

import click
import rich_click as click
import pytest

from box.packager import PackageApp, PYAPP_SOURCE
Expand Down Expand Up @@ -40,7 +40,7 @@ def create_pyapp_source(project_path: Path) -> Path:
# TESTS #


def test_cargo_not_found(mocker):
def test_cargo_not_found(rye_project, mocker):
"""Test that cargo not found raises an exception."""
# mock $PATH to remove cargo
mocker.patch.dict(os.environ, {"PATH": ""})
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_get_pyapp_extraction_multiple_folders(rye_project, mocker):
"""Raise a warning if multiple pyapp folders are found."""
mocker.patch.object(urllib.request, "urlretrieve")
mocker.patch("tarfile.open")
echo_mock = mocker.patch("click.echo")
echo_mock = mocker.patch("rich_click.echo")

# create two pyapp folders in the build folder
rye_project.joinpath("build/pyapp-v1.2.3").mkdir(parents=True)
Expand Down

0 comments on commit f45b6b1

Please sign in to comment.