Skip to content

Commit

Permalink
Merge pull request #364 from thegridelectric/dev
Browse files Browse the repository at this point in the history
1.0.0: new language (report instead of status)
  • Loading branch information
jessicamillar authored Oct 7, 2024
2 parents 89db034 + deef93a commit 8fd43f4
Show file tree
Hide file tree
Showing 336 changed files with 6,953 additions and 29,426 deletions.
2 changes: 1 addition & 1 deletion .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
color: 7057ff
- name: help wanted
description: Extra attention is needed
color: 008672
color: "008672"
- name: invalid
description: This doesn't seem right
color: e4e669
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==24.0
nox==2024.3.2
pip==24.2
nox==2024.4.15
nox-poetry==1.0.3
poetry==1.8.2
virtualenv==20.25.1
poetry==1.8.3
virtualenv==20.26.6
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ jobs:
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/gh-action-pypi-publish@v1.8.14
uses: pypa/gh-action-pypi-publish@v1.10.2
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/gh-action-pypi-publish@v1.8.14
uses: pypa/gh-action-pypi-publish@v1.10.2
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
Expand Down
45 changes: 28 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@ on:

jobs:
tests:
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
name: "${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { python: "3.11", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.12", os: "ubuntu-latest", session: "pre-commit" }
# - { python: "3.12", os: "ubuntu-latest", session: "mypy" }
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
# - { python: "3.12", os: "ubuntu-latest", session: "tests" }
# - { python: "3.12", os: "ubuntu-latest", session: "tests" }
- { python: "3.11", os: "windows-latest", session: "tests" }
- { python: "3.11", os: "macos-latest", session: "tests" }
- { python: "3.11", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.11", os: "ubuntu-latest", session: "docs-build" }
- { python: "3.12", os: "ubuntu-latest", session: "tests", coverage: true}
- { python: "3.12", os: "windows-latest", session: "tests" }
- { python: "3.12", os: "macos-latest", session: "tests" }
- { python: "3.12", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.12", os: "ubuntu-latest", session: "docs-build" }
env:
NOXSESSION: ${{ matrix.session }}
FORCE_COLOR: "1"
Expand Down Expand Up @@ -93,24 +91,37 @@ jobs:
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
key: "${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
${{ steps.pre-commit-cache.outputs.result }}-
- name: Run Nox
- name: Run Tests with coverage
if: matrix.session == 'tests' && matrix.coverage == true
run: |
nox --python=${{ matrix.python }}
- name: Run Tests without coverage
if: matrix.session == 'tests' && matrix.coverage != true
run: |
nox --python=${{ matrix.python }} -- --no-coverage
- name: Run non-test session
if: matrix.session != 'tests'
run: |
nox --python=${{ matrix.python }}
- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v3"
if: always() && matrix.session == 'tests' && matrix.coverage == true
uses: "actions/upload-artifact@v4.4.0"
with:
name: coverage-data
path: ".coverage.*"
if-no-files-found: error
include-hidden-files: true

- name: Upload documentation
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.4.0
with:
name: docs
path: docs/_build
Expand All @@ -125,7 +136,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand All @@ -144,7 +155,7 @@ jobs:
nox --version
- name: Download coverage data
uses: actions/download-artifact@v3
uses: "actions/download-artifact@v4.1.8"
with:
name: coverage-data

Expand All @@ -157,4 +168,4 @@ jobs:
nox --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v4.1.1
uses: codecov/codecov-action@v4.5.0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ __pycache__/
.DS_Store
hacking
.idea
scratch.*
scratch*
cook.sh
.vscode

Expand Down
49 changes: 5 additions & 44 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
require_serial: true
exclude: "src/gwproto/gt/|src/gwproto/gs/|src/gwproto/enums/"
- id: check-added-large-files
name: Check for added large files
entry: check-added-large-files
Expand All @@ -22,48 +15,16 @@ repos:
entry: check-yaml
language: system
types: [yaml]
# - id: darglint
# name: darglint
# entry: darglint
# language: system
# types: [python]
# stages: [manual]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
language: system
types: [text]
stages: [commit, push, manual]
exclude: "src/gwproto/gt/|src/gwproto/gs/|src/gwproto/enums/|CodeGenerationTools/GridworksCore/ODXML/DataSchema.odxml"
# - id: flake8
# name: flake8
# entry: flake8
# language: system
# types: [python]
# require_serial: true
# args: [--darglint-ignore-regex, .*]
- id: isort
name: isort
entry: isort
require_serial: true
language: system
types_or: [cython, pyi, python]
args: ["--filter-files"]
- id: pyupgrade
name: pyupgrade
description: Automatically upgrade syntax for newer versions.
entry: pyupgrade
language: system
types: [python]
args: [--py37-plus]
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [commit, push, manual]
exclude: "src/gwproto/gt/|src/gwproto/gs/|src/gwproto/enums/"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.6
hooks:
- id: prettier
- id: ruff
- id: ruff-format
Loading

0 comments on commit 8fd43f4

Please sign in to comment.