-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
179 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[{*.yaml, *.yml}] | ||
indent_size = 2 | ||
|
||
[*.py] | ||
# See Ruff config | ||
max_line_length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: CI | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: eifinger/setup-rye@v4 | ||
id: setup-rye | ||
with: | ||
enable-cache: true | ||
cache-prefix: ${{ matrix.python-version }} | ||
- name: Pin python-version ${{ matrix.python-version }} | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
run: rye pin ${{ matrix.python-version }} | ||
- name: Format check | ||
run: rye fmt --check | ||
- name: Lint check | ||
run: rye lint | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: eifinger/setup-rye@v4 | ||
id: setup-rye | ||
with: | ||
enable-cache: true | ||
cache-prefix: ${{ matrix.python-version }} | ||
- name: Pin python-version ${{ matrix.python-version }} | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
run: rye pin ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
run: | | ||
rye sync --no-lock | ||
- name: Test | ||
run: rye test -- --cov-report term-missing | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
- uses: eifinger/setup-rye@v4 | ||
id: setup-rye | ||
with: | ||
enable-cache: true | ||
cache-prefix: ${{ matrix.python-version }} | ||
- name: Pin python-version ${{ matrix.python-version }} | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
run: rye pin ${{ matrix.python-version }} | ||
- name: Build | ||
run: rye build --clean | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ dist/ | |
wheels/ | ||
*.egg-info | ||
|
||
.coverage* | ||
htmlcov | ||
|
||
# venv | ||
.venv | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: rye-lint | ||
name: rye-lint | ||
description: "Lint Python via 'rye lint'" | ||
entry: rye lint --fix | ||
language: system | ||
types_or: [python, pyi] | ||
args: [] | ||
require_serial: true | ||
additional_dependencies: [] | ||
minimum_pre_commit_version: "2.9.2" | ||
- id: rye-format | ||
name: rye-format | ||
description: "Format Python via 'rye fmt'" | ||
entry: rye fmt | ||
language: system | ||
types_or: [python, pyi] | ||
args: [] | ||
require_serial: true | ||
additional_dependencies: [] | ||
minimum_pre_commit_version: "2.9.2" | ||
- id: rye-test | ||
name: rye-test | ||
description: "Test Python via 'rye test'" | ||
entry: rye test | ||
language: system | ||
types_or: [python, pyi] | ||
args: [] | ||
pass_filenames: false | ||
require_serial: true | ||
additional_dependencies: [] | ||
minimum_pre_commit_version: "2.9.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from simpy_playground.__main__ import main | ||
|
||
|
||
def test_main(): | ||
main() |