Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinzakka committed Mar 17, 2024
1 parent 96bdbc0 commit 2d3d5db
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 64 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --verbose"
28 changes: 0 additions & 28 deletions .github/workflows/build.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci

on:
push:
paths-ignore:
- "**/README.md"
pull_request:
paths-ignore:
- "**/README.md"

jobs:
run-obj2mjcf-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- name: Checkout obj2mjcf
uses: actions/checkout@v4
- 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 wheel
pip install -e ".[test]"
- name: Run tests
run: |
pytest
17 changes: 0 additions & 17 deletions .github/workflows/lint.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2
- name: Checkout obj2mjcf
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -e .
pip install -e "."
pip install mypy
- name: Test with mypy
run: |
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
Expand All @@ -13,9 +8,10 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout obj2mjcf
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.black]
line-length = 88 # Default.
target-version = ["py38", "py39"]

[tool.isort]
profile = "black"
skip_gitignore = true
single_line_exclusions = ["typing"]
target-version = ["py312"]

[tool.mypy]
ignore_missing_imports = true

[tool.ruff]
extend-exclude = ["third_party", "dist", "build"]
lint.select = ["E", "F", "I", "W"]
lint.ignore = ["E501"]
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@

dev_requirements = [
"black",
"isort",
"flake8",
"mypy",
"ruff",
] + testing_requirements

classifiers = [
Expand All @@ -53,6 +52,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]

Expand Down

0 comments on commit 2d3d5db

Please sign in to comment.