-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into psb2_examples
- Loading branch information
Showing
6 changed files
with
112 additions
and
92 deletions.
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 |
---|---|---|
|
@@ -15,43 +15,48 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
python-version: [ "3.10", "3.11", "3.12" ] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest mypy | ||
if [ -f requirements.pip ]; then pip install -r requirements.pip; fi | ||
- name: Lint with mypy | ||
run: | | ||
mypy aeon | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Check install | ||
run: | | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
- name: Run Aeon Core Files | ||
run: | | ||
files=$(find examples/core -type f -name '*_main.ae') | ||
for file in $files; do | ||
python aeon $file --core --log INFO ERROR TYPECHECKER CONSTRAINT | ||
done | ||
- name: Run Aeon Sugar Files | ||
run: | | ||
files=$(find examples/sugar -type f -name '*_main.ae') | ||
for file in $files; do | ||
python aeon $file --log INFO ERROR TYPECHECKER CONSTRAINT | ||
done | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set env | ||
run: echo "VIRTUAL_ENV=$(python -c 'import sys; print(sys.prefix)')">> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade uv | ||
uv pip install flake8 pytest mypy pre-commit | ||
if [ -f requirements.pip ]; then uv pip install -r requirements.pip; fi | ||
#- name: Lint with pre-commit | ||
# run: | | ||
# pre-commit run --all-files | ||
- name: Lint with mypy | ||
run: | | ||
mypy aeon --no-strict-optional --ignore-missing-imports | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 --extend-exclude .venv . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 --extend-exclude .venv . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Check install | ||
run: | | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
- name: Run Aeon Core Files | ||
run: | | ||
files=$(find examples/core -type f -name '*_main.ae') | ||
for file in $files; do | ||
python aeon $file --core --log INFO ERROR TYPECHECKER CONSTRAINT | ||
done | ||
- name: Run Aeon Sugar Files | ||
run: | | ||
files=$(find examples/sugar -type f -name '*_main.ae') | ||
for file in $files; do | ||
python aeon $file --log INFO ERROR TYPECHECKER CONSTRAINT | ||
done |
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 |
---|---|---|
@@ -1,36 +1,42 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-docstring-first | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- id: mixed-line-ending | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v1.20.0 | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-docstring-first | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- id: mixed-line-ending | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v2.5.0 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/hadialqattan/pycln | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v2.1.2 | ||
hooks: | ||
- id: pycln | ||
- id: pycln | ||
args: [--config=pyproject.toml] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.991 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
args: [--no-strict-optional, --ignore-missing-imports, --explicit-package-bases] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
- id: mypy | ||
args: | ||
[ | ||
--no-strict-optional, | ||
--ignore-missing-imports, | ||
--explicit-package-bases, | ||
] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.2 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: https://github.com/regebro/pyroma | ||
args: [--fix, --exit-zero] | ||
- id: ruff-format | ||
- repo: https://github.com/regebro/pyroma | ||
rev: "4.2" | ||
hooks: | ||
- id: pyroma | ||
- id: pyroma |
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 |
---|---|---|
|
@@ -3,17 +3,17 @@ name = "Aeon" | |
version = "4.0.0a" | ||
description = "Language with Refinement Types" | ||
authors = [ | ||
{name = "Alcides Fonseca", email = "[email protected]"} | ||
{ name = "Alcides Fonseca", email = "[email protected]" } | ||
] | ||
readme = "Readme.md" | ||
requires-python = "~=3.10" | ||
|
||
keywords = ["programming language, liquid types"] | ||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
] | ||
|
||
[project.urls] | ||
|
@@ -50,9 +50,8 @@ all = true | |
[tool.ruff] | ||
line-length = 120 | ||
|
||
# Enable Pyflakes `E` and `F` codes by default. | ||
select = ["E", "F"] | ||
ignore = ["E741", "E501"] | ||
# Assume Python 3.10. | ||
target-version = "py310" | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
|
@@ -76,21 +75,24 @@ exclude = [ | |
"node_modules", | ||
"venv", | ||
] | ||
per-file-ignores = {} | ||
|
||
[tool.ruff.lint] | ||
# Enable Pyflakes `E` and `F` codes by default. | ||
select = ["E", "F"] | ||
ignore = ["E741", "E501"] | ||
per-file-ignores = { } | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
# Assume Python 3.10. | ||
target-version = "py310" | ||
|
||
[tool.ruff.flake8-import-conventions.aliases] | ||
[tool.ruff.lint.flake8-import-conventions.aliases] | ||
altair = "alt" | ||
"matplotlib.pyplot" = "plt" | ||
numpy = "np" | ||
pandas = "pd" | ||
seaborn = "sns" | ||
|
||
[tool.ruff.mccabe] | ||
[tool.ruff.lint.mccabe] | ||
# Unlike Flake8, default to a complexity level of 10. | ||
max-complexity = 10 |
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