Skip to content

Commit 14db8df

Browse files
authored
Merge pull request #473 from pyvec/honzajavorek/uv
Use uv
2 parents 2b4ff0a + 36de591 commit 14db8df

84 files changed

Lines changed: 885 additions & 1067 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python 3.9
13-
uses: actions/setup-python@v2
11+
- uses: actions/checkout@v4
12+
- name: Set up Python 3.14
13+
uses: actions/setup-python@v5
1414
with:
15-
python-version: 3.9
15+
python-version: "3.14"
16+
- name: Set up uv
17+
uses: astral-sh/setup-uv@v6
1618
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pipenv
19-
pipenv install --dev
19+
run: uv sync
2020
- if: ${{ github.ref == 'refs/heads/master' }}
2121
name: Build data
22-
run: pipenv run build
22+
run: uv run pyvecorg build
2323
env:
2424
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
2525
- name: Run tests
26-
run: pipenv run test -v
26+
run: uv run pytest -v
2727
- name: Build HTML
28-
run: pipenv run freeze
28+
run: uv run pyvecorg freeze
2929
- if: ${{ github.ref == 'refs/heads/master' }}
3030
name: Deploy
31-
run: pipenv run deploy
31+
run: uv run pyvecorg deploy
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
.pytest_cache
1212

1313
# Generated
14-
/pyvecorg/_build
15-
/pyvecorg/data/members_list.yml
16-
/pyvecorg/static/img/avatars
14+
/src/pyvecorg/_build
15+
/src/pyvecorg/data/members_list.yml
16+
/src/pyvecorg/static/img/avatars
1717

1818
# Private
19-
google_service_account.json
19+
/src/pyvecorg/google_service_account.json

Pipfile

Lines changed: 0 additions & 34 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 990 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 10 deletions

pyproject.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[project]
2+
name = "pyvecorg"
3+
version = "0.0.0"
4+
description = "Pyvec homepage"
5+
readme = "README.md"
6+
requires-python = ">=3.14"
7+
dependencies = [
8+
"elsa",
9+
"flask",
10+
"gspread",
11+
"markdown",
12+
"markupsafe",
13+
"oauth2client",
14+
"pillow",
15+
"python-slugify",
16+
"pyyaml",
17+
"requests",
18+
"werkzeug<3",
19+
]
20+
21+
[project.scripts]
22+
pyvecorg = "pyvecorg.__main__:main"
23+
24+
[dependency-groups]
25+
dev = [
26+
"jsonschema",
27+
"pytest-ruff",
28+
"pytest",
29+
"ruff",
30+
]
31+
32+
[tool.pytest.ini_options]
33+
addopts = "--ruff"
34+
35+
[tool.uv]
36+
default-groups = ["dev"]
37+
38+
[build-system]
39+
requires = ["uv-build>=0.11.15,<0.12.0"]
40+
build-backend = "uv_build"

pyvecorg/__main__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/pyvecorg/__main__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from elsa import cli
2+
3+
from pyvecorg import app
4+
5+
6+
def main():
7+
cli(app, base_url='http://pyvec.org')
8+
9+
10+
if __name__ == '__main__':
11+
main()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_gravatar_url(email):
3131
try:
3232
requests.head(url).raise_for_status()
3333
return url
34-
except:
34+
except requests.RequestException:
3535
return None
3636

3737

0 commit comments

Comments
 (0)