Skip to content

Commit

Permalink
update metadata
Browse files Browse the repository at this point in the history
doc one-time build
  • Loading branch information
scivision committed Aug 23, 2024
1 parent b777000 commit c418dd6
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 137 deletions.
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

50 changes: 15 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: ci

env:
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 0

on:
push:
Expand All @@ -11,47 +13,25 @@ on:

jobs:

linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'

- run: pip install .[tests,lint]
core:
strategy:
matrix:
os: [ubuntu-24.04, macos-latest]

- run: flake8
- run: mypy

- run: pytest
runs-on: ${{ matrix.os }}

env:
FC: gfortran-14

macos:
needs: linux
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.9'

- run: pip install .[tests]

- run: pytest
env:
FC: gfortran-11
CC: gcc-11

windows:
needs: linux
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install .[tests,lint]

- run: pip install -e .[tests]
- run: flake8
- run: mypy

- run: pytest
4 changes: 0 additions & 4 deletions .lgtm.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .mypy.ini

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Michael Hirsch
Copyright (c) 2015 Scivision, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ To get the IGRF Python development version, `git clone` and then:
python -m pip install -e .
```

Otherwise, for the latest release from PyPi:
Otherwise, for the latest release from PyPI:

```sh
python -m pip install igrf
```

The first time you install IGRF, do once from Python:

```python
import igrf

igrf.build()
```

Optionally, test the install with:

```sh
pytest
```
Expand Down
38 changes: 37 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "igrf"
description = "IGRF13, IGRF12, IGRF11 models with simple object-oriented Python interface."
keywords = ["geomagnetic", "igrf"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Fortran",
"Topic :: Scientific/Engineering :: Atmospheric Science"
]
dynamic = ["readme", "version"]
requires-python = ">=3.9"
dependencies = ["xarray", "numpy"]

[project.scripts]
findssh = "igrf.__main__:cli"

[project.optional-dependencies]
tests = ["pytest"]
lint = ["flake8", "flake8-bugbear", "flake8-builtins", "flake8-blind-except", "mypy", "type-python-dateutil"]

[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
version = {attr = "igrf.__version__"}

[tool.black]
line-length = 100

[tool.mypy]
files = "src/"
ignore_missing_imports = true
strict_optional = false
allow_redefinition = true
warn_unreachable = false
53 changes: 0 additions & 53 deletions setup.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions setup.py

This file was deleted.

5 changes: 4 additions & 1 deletion src/igrf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""
use IGRF via f2py from Python
"""
from .base import igrf, grid

__version__ = "13.0.2"

from .base import igrf, grid, build
from .utils import mag_vector2incl_decl, latlon2colat, latlonworldgrid
4 changes: 2 additions & 2 deletions src/igrf/tests/test_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def test_igrf13():
assert mag.decl.item() == approx(15.396590)


def test_cli():
subprocess.check_call(["igrf", time, "-c", "65", "85", "-a", "0"])
# def test_cli():
# subprocess.check_call(["igrf", time, "-c", "65", "85", "-a", "0"])


# def test_igrf12():
Expand Down

0 comments on commit c418dd6

Please sign in to comment.