Skip to content

Commit

Permalink
Fix and update syntax (#49)
Browse files Browse the repository at this point in the history
* update github action

* fix syntax in readme

* update with ruff and manual code cleanup

* new pytest raises syntax

* fix integration test

* fix integration test

* Ruff/tox update

* chmod

---------

Co-authored-by: Alex Swindler <[email protected]>
  • Loading branch information
nllong and axelstudios authored Oct 2, 2024
1 parent e9bf170 commit fab47d7
Show file tree
Hide file tree
Showing 22 changed files with 1,044 additions and 1,326 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
python -m pip install build twine
- name: Test with tox
run: tox -e ${{ matrix.test_env }}
- name: Test syntax of build package
run: |
python -m build
python -m twine check dist/*
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
Expand Down
16 changes: 0 additions & 16 deletions .isort.cfg

This file was deleted.

49 changes: 16 additions & 33 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,34 @@
exclude: |
(?x)(
^docs/conf.py|
^docs/license.rst
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
args: ["--maxkb=50000"]
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ["--fix=auto"]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
args:
[
"--in-place",
"--aggressive",
"--aggressive",
"--recursive",
"--max-line-length=100",
"--ignore=E501,E402,W503,W504,E731",
]
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args: ["--ignore=E501,E402,W503,W504,E731,F401"]
- id: pretty-format-json
args: ["--autofix", "--no-sort-keys", "--no-ensure-ascii"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [css, yaml, markdown, html, scss, javascript]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
types_or: [css, yaml, markdown, html, scss, javascript, json]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: isort
args: ["-m=VERTICAL_HANGING_INDENT"] # vertical hanging
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --output-format=full]
# Run the formatter
- id: ruff-format
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ More information can be found here:


Compatibility Matrix
-------------
--------------------

.. list-table::
:widths: 50 50
Expand Down
82 changes: 44 additions & 38 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
{
"version": "0.2",
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"apibase",
"buildingsync",
"codeauthor",
"datafile",
"dname",
"durl",
"ECAM",
"EEEJ",
"ESPM",
"excpt",
"geocoded",
"greenbuildingregistry",
"jakejarvis",
"JSONAPI",
"jwalton",
"Munday",
"ndeloof",
"officedocument",
"openxmlformats",
"precommit",
"printenv",
"pyseed",
"pytest",
"sdist",
"SEEDO",
"seedrecords",
"spreadsheetml",
"subclassing",
"taxlot",
"taxlots"
],
"ignoreWords": [],
"import": []
"version": "0.2",
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"apibase",
"BSYNCR",
"buildingsync",
"codeauthor",
"datafile",
"dname",
"durl",
"ECAM",
"EEEJ",
"ESPM",
"excpt",
"geocoded",
"greenbuildingregistry",
"jakejarvis",
"JSONAPI",
"jwalton",
"kflemin",
"Munday",
"ndeloof",
"nllong",
"NREL",
"officedocument",
"openxmlformats",
"precommit",
"printenv",
"pyseed",
"pytest",
"sdist",
"SEEDO",
"seedplatform",
"seedrecords",
"spreadsheetml",
"subclassing",
"taxlot",
"taxlots",
"Turas"
],
"ignoreWords": [],
"import": []
}
3 changes: 1 addition & 2 deletions pyseed/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Local Imports
from pyseed.seed_client_base import ( # noqa
from pyseed.seed_client_base import (
SEEDOAuthReadOnlyClient,
SEEDOAuthReadWriteClient,
SEEDReadOnlyClient,
Expand Down
Loading

0 comments on commit fab47d7

Please sign in to comment.