Skip to content

Commit 134d6e1

Browse files
committed
tidy up the command mess
1 parent 914d442 commit 134d6e1

6 files changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
run: uv sync
2020
- if: ${{ github.ref == 'refs/heads/master' }}
2121
name: Build data
22-
run: uv run python -m pyvecorg.build
22+
run: make build
2323
env:
2424
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
2525
- name: Run tests
26-
run: uv run pytest -v
26+
run: make test
2727
- name: Build HTML
28-
run: uv run python -m pyvecorg freeze
28+
run: make freeze
2929
- if: ${{ github.ref == 'refs/heads/master' }}
3030
name: Deploy
31-
run: uv run python -m pyvecorg deploy
31+
run: make deploy
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: serve freeze deploy build test
2+
3+
serve:
4+
uv run python -m pyvecorg serve
5+
6+
freeze:
7+
uv run python -m pyvecorg freeze
8+
9+
deploy:
10+
uv run python -m pyvecorg deploy --push
11+
12+
build:
13+
uv run python -m pyvecorg.build
14+
15+
test:
16+
uv run pytest -v

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ $ uv sync
1515
The site uses [elsa](https://github.com/pyvec/elsa).
1616

1717
- Installation: `uv sync`
18-
- Download data from external sources: `uv run python -m pyvecorg.build`
19-
- Tests: `uv run pytest`
20-
- Development server: `uv run python -m pyvecorg serve`
18+
- Download data from external sources: `make build`
19+
- Tests: `make test`
20+
- Development server: `make serve`
2121

2222
### Data and tests
2323

@@ -39,15 +39,15 @@ logical rules which cannot be easily expressed by JSON Schema.
3939
### External sources
4040

4141
Some data cannot be stored statically in a YAML file. There is a command
42-
`uv run python -m pyvecorg.build`, which downloads them from external sources and generates
42+
`make build`, which downloads them from external sources and generates
4343
respective static YAML files. This is a separate step, which needs to be done
4444
before developing or deploying the site, otherwise it won't work properly.
4545

4646
### Members
4747

4848
Pyvec members are tracked in an internal Google Spreadsheet. The future
4949
intention is to have the list of members public, but we're not there yet (GDPR).
50-
So far only board members are being listed publicly. The `uv run python -m pyvecorg.build`
50+
So far only board members are being listed publicly. The `make build`
5151
command downloads the spreadsheet as CSV and generates the `members_list.yml`
5252
file. It also downloads and caches avatars.
5353

src/pyvecorg/build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ def generate_yaml(data):
6565
yaml_contents = dedent('''\
6666
#
6767
# This file has been generated from external sources
68-
# using `uv run python -m pyvecorg.build`. Do not edit
69-
# it manually!
68+
# using `make build`. Do not edit it manually!
7069
#
7170
''')
7271
return yaml_contents + yaml.dump(data, allow_unicode=True)

src/pyvecorg/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ <h3>{{ members.note.heading }}</h3>
269269
{% else %}
270270
<p class="note">
271271
{{ members.list.failure_text }}
272-
<!-- To fix this, you need to run 'uv run python -m pyvecorg.build' -->
272+
<!-- To fix this, you need to run 'make build' -->
273273
</p>
274274
{% endif %}
275275
</div>

tests/test_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
)
2121
DATA = load_data()
2222

23-
# If you run 'uv run python -m pyvecorg.build', memebers_list.yml
24-
# gets generated and it will be tested. If you don't have the file
25-
# present, the relevant tests will be skipped
23+
# If you run 'make build', memebers_list.yml gets generated and it
24+
# will be tested. If you don't have the file present, the relevant
25+
# tests will be skipped
2626
DATA_BOARD = DATA.get('members_list', {}).get('board', [])
2727
DATA_PUBLIC_MEMBERS = DATA.get('members_list', {}).get('public_members', [])
2828
DATA_ALL_MEMBERS = DATA_BOARD + DATA_PUBLIC_MEMBERS

0 commit comments

Comments
 (0)