Skip to content

Commit c7f1c02

Browse files
committed
v0.1.0 - major update to dependencies etc
1 parent 0708d06 commit c7f1c02

File tree

12 files changed

+1488
-90
lines changed

12 files changed

+1488
-90
lines changed

.github/workflows/mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
python-version: '3.9'
2121
- name: Running mkdocs
2222
run: |
23-
python -m pip install --quiet --no-cache-dir --upgrade poetry
24-
poetry install
25-
poetry run mkdocs gh-deploy -m 'Commit {sha} MkDocs {version}'
23+
python -m pip install --quiet --no-cache-dir --upgrade uv
24+
25+
uv run mkdocs gh-deploy -m 'Commit {sha} MkDocs {version}'

.github/workflows/mypy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ jobs:
2020
python-version: '3.12'
2121
- name: Running mypy
2222
run: |
23-
python -m pip install --quiet --no-cache-dir --upgrade poetry
24-
poetry install
25-
poetry run mypy pvoutput tests
23+
python -m pip install --quiet --no-cache-dir --upgrade uv
24+
uv run mypy pvoutput tests

.github/workflows/pylint.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ jobs:
2020
python-version: '3.12'
2121
- name: Running ruff
2222
run: |
23-
python -m pip install --quiet --no-cache-dir --upgrade poetry
24-
poetry install
25-
poetry run ruff check pvoutput tests
23+
python -m pip install --quiet --no-cache-dir --upgrade uv
24+
uv run ruff check pvoutput tests

.github/workflows/pytest.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ jobs:
2020
python-version: '3.12'
2121
- name: Running pytest
2222
run: |
23-
python -m pip install --quiet --no-cache-dir --upgrade poetry
24-
poetry install
25-
poetry run python -m pytest
23+
python -m pip install --quiet --no-cache-dir --upgrade uv
24+
uv run python -m pytest

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ sonarqube-test.sh
116116
# IDE
117117
.idea
118118
/examples/pvoutput.json
119-
pvoutput.json
120-
poetry.lock
119+
pvoutput.json

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ PVOutput.org python API module. Works with the R2 [API version spec here](https:
44

55
Get your API key from [the account page on PVOutput](https://pvoutput.org/account.jsp)
66

7-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8-
97
## Example usage
108

119
Here's a quick code example:
@@ -29,21 +27,21 @@ Will give you output like this:
2927
}
3028
```
3129

32-
There are more example code snippets in the [examples](examples/) directory.
30+
There are more example code snippets in the examples directory.
3331

3432
## Installing
3533

3634
### Prod-ish usage
3735

38-
`python -m pip install pvoutput` to install from pypi
36+
`pip install pvoutput` to install from pypi
3937

4038
### Dev Install Things
4139

4240
```shell
43-
python -m venv venv
44-
source venv/bin/activate
45-
python -m pip install --upgrade pip flit
46-
python -m flit install
41+
python -m virtualenv .venv
42+
source .venv/bin/activate
43+
pip install uv
44+
uv venv
4745
```
4846

4947
## Input validation
@@ -79,7 +77,7 @@ An example configuration
7977

8078
## Contributing / Testing
8179

82-
`ruff`, `black` and `mypy` should all pass before submitting a PR.
80+
`ruff`, and `mypy` should all pass before submitting a PR.
8381

8482
## License
8583

mkdocs.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ site_name: PVOutput
22
theme:
33
name: material
44
plugins:
5-
- search:
6-
- mkdocstrings:
7-
default_handler: python
8-
handlers:
9-
python:
10-
rendering:
11-
show_source: true
12-
watch:
13-
- pvoutput/
5+
- search:
6+
- mkdocstrings:
7+
default_handler: python
8+
handlers:
9+
# python:
10+
# rendering:
11+
# show_source: true
12+
watch:
13+
- "pvoutput/"
1414
nav:
15-
- Home: README.md
16-
- API Documentation: api.md
15+
- Home: README.md
16+
- API Documentation: api.md
1717
repo_name: yaleman/pvoutput
1818
repo_url: https://github.com/yaleman/pvoutput
1919
site_url: https://yaleman.github.io/pvoutput/

pvoutput/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ async def getstatus(self) -> Dict[str, Any]:
266266
# if we're fancy, we get more data
267267
if extras:
268268
for i in range(1, 7):
269-
responsedata[f"v{i+6}"] = None if extras[i - 1] == "NaN" else float(extras[i - 1])
269+
responsedata[f"v{i + 6}"] = None if extras[i - 1] == "NaN" else float(extras[i - 1])
270270
return responsedata
271271

272272
async def register_notification(self, appid: str, url: str, alerttype: int) -> aiohttp.ClientResponse:

pyproject.toml

Lines changed: 40 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,32 @@
1-
# [project]
2-
# name = "pvoutput"
3-
# authors = [
4-
# {name = "James Hodgkinson", email = "james@terminaloutcomes.com"}
5-
# ]
6-
# classifiers = [
7-
# "License :: OSI Approved :: MIT License",
8-
# "Programming Language :: Python :: 3.8",
9-
# "Programming Language :: Python :: 3.9",
10-
# "Programming Language :: Python :: 3.10",
11-
# "Operating System :: OS Independent",
12-
# ]
13-
14-
# dependencies = [
15-
# "requests",
16-
# "aiohttp"
17-
# ]
18-
19-
# keywords = [
20-
# "api",
21-
# "solar",
22-
# "pvoutput",
23-
# ]
24-
# readme = "README.md"
25-
26-
[tool.poetry]
1+
[project]
272
name = "pvoutput"
28-
version = "0.0.12"
29-
authors = ["James Hodgkinson <james@terminaloutcomes.com>"]
3+
authors = [{ name = "James Hodgkinson", email = "james@terminaloutcomes.com" }]
4+
classifiers = [
5+
"License :: OSI Approved :: MIT License",
6+
"Programming Language :: Python :: 3.10",
7+
"Programming Language :: Python :: 3.11",
8+
"Programming Language :: Python :: 3.12",
9+
"Programming Language :: Python :: 3.13",
10+
"Operating System :: OS Independent",
11+
]
12+
license = { text = "MIT" }
13+
requires-python = ">=3.10"
14+
dependencies = [
15+
"requests>=2.27.1",
16+
"aiohttp>=3.8.1",
17+
]
18+
version = "0.1.0"
3019
description = "Interface to the PVOutput API"
31-
homepage = "https://yaleman.github.io/pvoutput/"
32-
license = "MIT"
3320
readme = "README.md"
34-
repository = "https://github.com/yaleman/pvoutput/"
3521

36-
[tool.poetry.dependencies]
37-
python = "^3.8"
38-
requests = "^2.27.1"
39-
aiohttp = "^3.8.1"
40-
mkdocs = { version = "^1.3.0", extras = ["docs"] }
41-
mkdocstrings = { version = ">=0.18.1,<0.27.0", extras = ["docs"] }
42-
mkdocs-material = { version = ">=8.2.9,<10.0.0", extras = ["docs"] }
43-
ruff = ">=0.5.1,<0.11.13"
22+
[project.urls]
23+
homepage = "https://yaleman.github.io/pvoutput/"
24+
repository = "https://github.com/yaleman/pvoutput/"
4425

45-
[tool.poetry.group.dev.dependencies]
46-
mypy = "^1.0"
47-
black = "^24.1.0"
48-
pytest = "^8.0.0"
49-
types-requests = "^2.28.11"
50-
aiofiles = "^24.1.0"
51-
pylint-pytest = "^1.1.2"
52-
pytest-asyncio = "^0.24.0"
53-
requests-mock = "^1.10.0"
54-
types-aiofiles = "^24.1.0"
55-
mkdocstrings-python = "^1.0.0"
56-
freezegun = "^1.5.2"
5726

5827
[build-system]
59-
requires = ["poetry-core>=1.0.0"]
60-
build-backend = "poetry.core.masonry.api"
28+
requires = ["pdm-backend"]
29+
build-backend = "pdm.backend"
6130

6231
[tool.pylint.MASTER]
6332
load-plugins = "pylint_pytest"
@@ -70,3 +39,21 @@ asyncio_default_fixture_loop_scope = "function"
7039

7140
[tool.ruff]
7241
line-length = 200
42+
43+
[dependency-groups]
44+
dev = [
45+
"mypy==1.16.0",
46+
"pytest>=8.0.0",
47+
"types-requests>=2.32.0.20250515",
48+
"aiofiles>=24.1.0",
49+
"pylint-pytest>=1.1.8",
50+
"pytest-asyncio>=1.0.0",
51+
"requests-mock>=1.10.0",
52+
"types-aiofiles>=24.1.0",
53+
"mkdocstrings-python>=1.16.11",
54+
"freezegun>=1.5.2",
55+
"mkdocs>=1.3.0",
56+
"mkdocstrings>=0.29.1",
57+
"mkdocs-material>=9.6.14",
58+
"ruff>=0.11.12",
59+
]

run_mkdocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
python -m mkdocs serve --livereload
3+
uv run mkdocs serve --livereload

0 commit comments

Comments
 (0)