Skip to content

Commit

Permalink
First round of updates (#10)
Browse files Browse the repository at this point in the history
* start adding type hints and switch from os.path to pathlib.Path

* add pyproject.toml and poetry lock file

* Run isort and black

* Fixes for issues identified by ruff and pylance

* Finish fixes for ruff linting errors and a few small improvements.

* Updated utils.weight_stack

* small tweaks to avoid potentially unbound variables (thanks ruff)

* Switch github actions to use isort and ruff

* fix multi-line examples for doctest

* Cleanup actions to remove duplicate run of test suite

* remove setup.cfg and setup.py in favor of pyproject.toml

* Fixed test errors in test_cuda.py::TestReconCUDA

---------

Co-authored-by: Andrew Herzing <[email protected]>
  • Loading branch information
jat255 and AndrewHerzing authored Sep 24, 2024
1 parent 9d6449c commit 3d31add
Show file tree
Hide file tree
Showing 24 changed files with 5,118 additions and 1,553 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

19 changes: 10 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install flake8
- run: pip install pydocstyle
- run: flake8 --exclude=api.py --ignore=E501 etspy/
- if: always()
run: pydocstyle etspy/
- run: pip install ruff isort
- run: isort . --check
- run: ruff check

pytest:
runs-on: ubuntu-latest
container:
image: aaherzing/etspy:latest
steps:
- uses: actions/checkout@v4
- run: pip install -e ./
- run: pytest --doctest-modules --ignore=etspy/tests/test_datasets.py etspy/
- if: always()
run: pytest --ignore=etspy/tests/test_datasets.py etspy/tests/
- name: Install ETSpy
run: pip install -e ./
- name: Run docstring example tests
run: pytest --doctest-modules --ignore=etspy/tests etspy/
- name: Run full test suite
if: always()
run: pytest etspy/tests/
7 changes: 2 additions & 5 deletions etspy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of ETSpy
"""__init__ function for ETSpy."""
"""ETSpy."""

__version__ = '0.8'
__version__ = "0.8"
Loading

0 comments on commit 3d31add

Please sign in to comment.