Skip to content

Commit

Permalink
CI: Test python 3.7 on ubuntu (#16)
Browse files Browse the repository at this point in the history
* Remove trove classifiers for specific python versions
* Remove mypy config for now
* Recommend uv instead of pipx for installation in README
* Test with Python 3.7 on Ubuntu only
* CI: Don't cancel jobs in progress
* CI: Update uv
  • Loading branch information
danielhollas authored Nov 4, 2024
1 parent 453b080 commit 88b4a80
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 44 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: 3
FORCE_COLOR: 1

jobs:
test:
Expand All @@ -22,6 +18,10 @@ jobs:
matrix:
python-version: ["3.8", "3.13"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
include:
# The Macos and Windows jobs fail with 3.7 so just test on Linux
- runs-on: ubuntu-latest
python-version: "3.7"

steps:
- uses: actions/checkout@v4
Expand All @@ -32,19 +32,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install uv (Unix)
if: runner.os != 'Windows'
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install uv (Windows)
if: runner.os == 'Windows'
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.29"

- name: Install package
run: uv pip install --system "harmonwig[dev] @ ."
run: uv pip install --system -e .[dev]

- name: Test package
run: pytest -ra --cov --cov-report=xml --cov-report=term
run: pytest --cov --cov-report=xml --cov-report=term

- name: Upload coverage report
uses: codecov/codecov-action@v4
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ be available as a Python package on PyPI :warning: **

## Installation

Harmonwig is a simple Python CLI application, but it does rely on some other
Python libraries that needs to be installed together. Currently, the package is
not yet available on PyPI, but it can still be installed directly from GitHub.
We recommend using `pipx`, which automatically creates an isolated Python
environment and makes harmonwig available globally.
Harmonwig is a simple Python CLI application, but it does rely on a handful of
other Python libraries that needs to be installed together. Currently, the
package is not yet available on PyPI, but it can still be installed directly
from GitHub. We recommend using `uv`, which automatically creates an isolated
Python environment and makes harmonwig available globally.

```console
$ pip install pipx
$ pipx install "harmonwig @ git+https://github.com/ispg-group/harmonwig.git"
$ pip install uv
$ uv tool install "harmonwig @ git+https://github.com/ispg-group/harmonwig.git"
```

To upgrade harmonwig to the latest version run:

```console
pipx upgrade harmonwig
uv tool upgrade harmonwig
```

## Usage
Expand Down
22 changes: 0 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = ['ase', 'tqdm', 'cclib~=1.8.0']
Expand Down Expand Up @@ -66,21 +59,6 @@ report.exclude_also = [
'if typing.TYPE_CHECKING:',
]

[tool.mypy]
files = ["src", "tests"]
python_version = "3.7"
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false

[[tool.mypy.overrides]]
module = "harmonwig.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true

[tool.ruff]
src = ["src"]

Expand Down

0 comments on commit 88b4a80

Please sign in to comment.