Skip to content

Commit

Permalink
Merge pull request #13 from Ericsson/uv
Browse files Browse the repository at this point in the history
switch from hatch to uv, resolve #7 and #8
  • Loading branch information
Godsmith authored Nov 13, 2024
2 parents c460faf + f7c689a commit 74b4251
Show file tree
Hide file tree
Showing 4 changed files with 604 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
echo "PLANTUML_JAR=plantuml.jar" > .env
- name: Install dependencies
run: |
python -m pip install hatch
python -m pip install uv==0.4.9
- name: Test with pytest
run: |
hatch run pytest
uv run pytest
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,16 @@ pip install .
python -m plantuml_gui
```


## Development

### Pre-requisites

- hatch
- uv

### Setup

Commands to be run in the hatch shell, started by typing `hatch shell`.

```
pre-commit install -t pre-commit -t pre-push
uv run pre-commit install -t pre-commit -t pre-push
```

### Running tests
Expand All @@ -63,16 +60,16 @@ pre-commit install -t pre-commit -t pre-push
##### Without coverage

```
pytest
uv run pytest
```

##### With coverage

```
python -m pytest --cov --cov-report=html
uv run python -m pytest --cov --cov-report=html
```

#### Javascript

1. Run `python -m http.server` and open the server in a browser
1. Run `uv run python -m http.server` and open the server in a browser
2. In the browser, open tests/js/SpecRunner.html
25 changes: 12 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,35 @@ classifiers = [
]
dependencies = [
"flask==3.0.3",
"pytest==8.3.3",
"pyquery==2.0.1",
"ruff==0.7.3",
"pre-commit==4.0.1",
"mypy==1.13.0",
"pytest-cov==6.0.0",
"python-dotenv==1.0.1",
"loguru==0.7.2",
"pyquery==2.0.1",
]
description = ''
dynamic = ["version"]
keywords = []
license = "MIT"
name = "plantuml-gui"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.11"
dynamic = ["version"]

[project.urls]
Documentation = "https://github.com/Bertil Varenhorst/plantuml-gui#readme"
Issues = "https://github.com/Bertil Varenhorst/plantuml-gui/issues"
Source = "https://github.com/Bertil Varenhorst/plantuml-gui"

[tool.uv]
dev-dependencies = [
"pytest==8.3.3",
"ruff==0.7.3",
"pre-commit==4.0.1",
"mypy==1.13.0",
"pytest-cov==6.0.0",
]

[tool.hatch.version]
path = "src/plantuml_gui/__about__.py"

[tool.hatch.envs.types]
extra-dependencies = ["mypy>=1.0.0"]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/plantuml_gui tests}"

[tool.hatch.build.targets.wheel]
packages = ["src/plantuml_gui"]

Expand Down
Loading

0 comments on commit 74b4251

Please sign in to comment.