Skip to content

Commit

Permalink
Attempt at fixing python versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
haz committed Mar 4, 2024
1 parent 1a14bcf commit 537628e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9, 3.10, 3.11, 3.12]

steps:
- uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
pip install -e .[dev]
sudo apt install gringo
sudo apt-get install graphviz
- if: ${{ matrix.python-version == '3.9' }}
- if: ${{ matrix.python-version == '3.12' }}
name: Get branch name
run: |
REF=${{ github.ref }}
Expand All @@ -35,7 +35,7 @@ jobs:
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}"
echo $BRANCH_NAME
echo "BRANCH=$(echo ${BRANCH_NAME})" >> $GITHUB_ENV
- if: ${{ matrix.python-version == '3.9' }}
- if: ${{ matrix.python-version == '3.12' }}
name: Create placeholder coverage badge
uses: schneegans/[email protected]
with:
Expand All @@ -51,15 +51,15 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Tests
run: pytest
run: python -m pytest
# Only get coverage once
- if: ${{ matrix.python-version == '3.9' }}
- if: ${{ matrix.python-version == '3.12' }}
name: Get coverage
run: |
REPORT="$(pytest --cov=macq)"
REPORT="$(python -m pytest --cov=macq)"
for line in "${REPORT[@]}"; do echo "$line"; done
echo "COVERAGE=$(echo $REPORT | tail -c85 | head -c3)" >> $GITHUB_ENV
- if: ${{ matrix.python-version == '3.9' }}
- if: ${{ matrix.python-version == '3.12' }}
name: Create coverage badge
uses: schneegans/[email protected]
with:
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
"Topic :: Scientific/Engineering :: Mathematics",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand All @@ -60,7 +61,7 @@
keywords="planning model acquisition trace",
url="https://github.com/ai-planning/macq",
classifiers=CLASSIFIERS,
python_requires=">=3.7",
python_requires=">=3.9",
install_requires=DEPENDENCIES,
extras_require={"dev": DEV_DEPENDENCIES},
)
4 changes: 2 additions & 2 deletions tests/extract/test_amdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_tokenization_error():
trace.tokenize(Token=NoisyPartialDisorderedParallelObservation)


def test_tracelist():
def gen_tracelist():
# define objects
red_truck = PlanningObject("", "red_truck")
blue_truck = PlanningObject("", "blue_truck")
Expand Down Expand Up @@ -230,7 +230,7 @@ def test_amdn():
).traces

# use the simple truck domain for debugging
# traces = test_tracelist()
# traces = gen_tracelist()

# use the simple door domain for debugging
# dom = str((base / "pddl_testing_files/door_dom.pddl").resolve())
Expand Down

0 comments on commit 537628e

Please sign in to comment.