Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install pytest pytest-cov tomli
pip install -e .

- name: Run tests
Expand Down
8 changes: 7 additions & 1 deletion pynanigans/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
__version__ = "0.2.0"
import tomli
from pathlib import Path

# Read version from pyproject.toml
with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as f:
pyproject = tomli.load(f)
__version__ = pyproject["project"]["version"]

from .grids import get_metrics, get_coords, get_grid
from .utils import *
Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build-system]
requires = ["setuptools>=45", "wheel", "tomli"]
build-backend = "setuptools.build_meta"

[project]
name = "pynanigans"
version = "0.2.0"
description = "A Python package for working with Oceananigans data"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Tomas Chor", email = "contact@tomaschor.xyz"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
]
dependencies = [
"numpy",
"xarray",
"xgcm",
"matplotlib",
]

[project.urls]
Homepage = "https://github.com/tomchor/pynanigans"
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from setuptools import setup, find_packages
import tomli

# Read version from pyproject.toml
with open("pyproject.toml", "rb") as f:
pyproject = tomli.load(f)
version = pyproject["project"]["version"]

setup(
name="pynanigans",
version="0.1.0",
version=version,
packages=find_packages(),
install_requires=[
"numpy",
Expand Down