Skip to content

Commit 7b74676

Browse files
authored
Merge pull request #61 from chrishavlin/packaging_updates
Packaging updates
2 parents bb18c2a + 7e2fafd commit 7b74676

File tree

12 files changed

+53
-89
lines changed

12 files changed

+53
-89
lines changed

setup.cfg renamed to .flake8

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[bdist_wheel]
2-
universal = 1
3-
41
[flake8]
52
max-line-length = 88
63
exclude = docs,

.github/workflows/check-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
python-version: '3.10'
1414
- name: Install dependencies
1515
run: |
16-
python -m pip install --upgrade pip
17-
python -m pip install -U setuptools wheel twine
18-
- name: Build and check
19-
run: |
20-
python setup.py sdist bdist_wheel
21-
twine check dist/*
16+
python -m pip install --upgrade pip
17+
python -m pip install -U build twine
18+
- name: Build and check source tarball
19+
run: python -m build
20+
- name: Twine check
21+
run: twine check dist/*

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
python -m pip install -U setuptools setuptools_scm wheel twine
23+
python -m pip install -U build twine
2424
- name: Build and check source tarball
25-
run: python setup.py sdist bdist_wheel
25+
run: python -m build
2626
- name: Twine check
2727
run: twine check dist/*
2828
- name: Publish distribution to PyPI

.github/workflows/run-pytest-tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,15 @@ jobs:
1717
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
python -m pip install -r requirements_dev.txt
2420
- name: Setup yt_xarray
2521
run: |
26-
python -m pip install -e .
22+
python -m pip install --upgrade pip
23+
python -m pip install -e .[full,test]
2724
- name: Run Tests
2825
run: pytest --cov=./ --cov-report=xml:coverage/coverage.xml
2926

3027
# https://github.com/marketplace/actions/codecov#example-workflowyml-with-codecov-action
3128
- name: Upload coverage to Codecov
32-
if: matrix.os == 'ubuntu-latest'
3329
uses: codecov/codecov-action@v3
3430
with:
3531
directory: ./coverage/

.github/workflows/weekly-test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ jobs:
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
python -m pip install -r requirements_dev.txt
2723
- name: Setup yt_xarray
28-
run: python -m pip install -e .
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install -e .[full,test]
2927
- name: Run Tests
3028
run: pytest -v .

.readthedocs.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ build:
1414
# Optionally declare the Python requirements required to build your docs
1515
python:
1616
install:
17-
- requirements: requirements.txt
18-
- requirements: requirements_dev.txt
19-
- requirements: requirements_docs.txt
17+
- method: pip
18+
path: .
19+
extra_requirements:
20+
- docs

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include *.yaml
66
include Makefile
77
include tox.ini
88
include .coveragerc
9+
include .flake8
910
recursive-include tests *
1011
recursive-exclude * __pycache__
1112
recursive-exclude * *.py[co]

pyproject.toml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "yt_xarray"
7+
version = "0.1.4"
8+
authors = [
9+
{ name="Chris Havlin", email="[email protected]" },
10+
]
11+
description="interface between yt and xarray"
12+
readme = "README.md"
13+
requires-python = ">=3.9"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"License :: OSI Approved :: MIT License",
18+
"Natural Language :: English",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
]
24+
dependencies=['yt>=4.2.0', 'h5py>=3.4.0', 'pooch>=1.5.1', 'xarray']
25+
26+
[project.urls]
27+
"Homepage" = "https://github.com/data-exp-lab/yt_xarray"
28+
"Bug Tracker" = "https://github.com/data-exp-lab/yt_xarray/issues"
29+
30+
[project.optional-dependencies]
31+
full = ["netCDF4", "scipy", "dask[complete]"]
32+
test = ["pytest", "pytest-cov"]
33+
docs = ["Sphinx==1.8.5", "jinja2<3.1.0", "nbsphinx"]
34+
135
[tool.black]
236
line-length = 88
3-
target-version = ['py37']
37+
target-version = ['py310']
438

539
[tool.isort]
640
profile = "black"

requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements_dev.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)