Skip to content

Commit 93ac90e

Browse files
authored
Merge pull request #4 from quant-aq/dmcc/project-config-updates
Fix setup issues discovered with aeromancy-demo-housing
2 parents 1b7b10a + 99380ac commit 93ac90e

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

copier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ python_package_import_name:
9393
python_package_requires_python:
9494
type: str
9595
help: The python version range your project supports
96-
default: ">=3.11"
96+
default: ">=3.10"

project/.github/workflows/ci.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- "**.md"
88
push:
99
branches:
10-
- master
1110
- main
1211
paths-ignore:
1312
- "docs/**"
@@ -21,23 +20,18 @@ jobs:
2120
python-version: ['3.10']
2221
os: [ubuntu-latest]
2322

24-
steps:
25-
- name: Checkout branch
26-
uses: actions/checkout@v3
23+
steps:
24+
- name: Checkout branch
25+
uses: actions/checkout@v3
2726

28-
- name: Set up PDM
29-
uses: pdm-project/setup-pdm@main
30-
with:
31-
python-version: ${{ matrix.python-version }}
32-
cache: true
27+
- name: Set up PDM
28+
uses: pdm-project/setup-pdm@main
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: true
3332

34-
- name: Setup ssh key
35-
uses: webfactory/ssh-agent@v0.5.1
36-
with:
37-
ssh-private-key: ${{ secrets.SSH_KEY }}
33+
- name: Install dependencies
34+
run: pdm install
3835

39-
- name: Install dependencies
40-
run: pdm install
41-
42-
- name: Run Tests
43-
run: pdm test
36+
- name: Run Tests
37+
run: pdm test

project/pyproject.toml.jinja

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ readme = "README.md"
1313
requires-python = "{{ python_package_requires_python }}"
1414
dependencies = [
1515
# keep-sorted start
16-
"aeromancy @ git+ssh://git@github.com/quant-aq/aeromancy.git",
16+
"aeromancy @ git+https://github.com/quant-aq/aeromancy@v0.3.0",
1717
] # keep-sorted end
1818
dynamic = ["version"]
1919

@@ -65,6 +65,10 @@ doc.shell = "cd docs && mkdocs serve -a localhost:8010"
6565
lint.help = "Run linters over all files"
6666
lint.cmd = "pre-commit run --all-files"
6767

68+
# PDM hook to automatically sort dependencies when they change.
69+
# "true" is there since GitHub Actions will fail if this returns a non-zero exit code.
70+
post_install.shell = "pre-commit run keep-sorted --files pyproject.toml > /dev/null 2> /dev/null; true"
71+
6872
#
6973
# Standard Aeromancy scripts.
7074
#
@@ -87,11 +91,7 @@ help.help = "Show the combined help menu (Aeromancy runtime + job selection + pr
8791
help.cmd = "python src/main.py --help"
8892

8993
aeroset.help = "Use a specific reference/tag/version of Aeromancy"
90-
aeroset.shell = """pdm remove aeromancy ;
91-
pdm add 'git+ssh://git@github.com/quant-aq/aeromancy.git@{args}' &&
92-
pdm install &&
93-
pre-commit run keep-sorted --files pyproject.toml > /dev/null
94-
"""
94+
aeroset.shell = "pdm add 'git+https://github.com/quant-aq/aeromancy@{args}' && pdm install"
9595

9696
[tool.black]
9797
line-length = 88

0 commit comments

Comments
 (0)