Skip to content

Commit

Permalink
Merge pull request #61 from chrishavlin/packaging_updates
Browse files Browse the repository at this point in the history
Packaging updates
  • Loading branch information
chrishavlin authored Oct 10, 2023
2 parents bb18c2a + 7e2fafd commit 7b74676
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 89 deletions.
3 changes: 0 additions & 3 deletions setup.cfg → .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[bdist_wheel]
universal = 1

[flake8]
max-line-length = 88
exclude = docs,
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools wheel twine
- name: Build and check
run: |
python setup.py sdist bdist_wheel
twine check dist/*
python -m pip install --upgrade pip
python -m pip install -U build twine
- name: Build and check source tarball
run: python -m build
- name: Twine check
run: twine check dist/*
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools setuptools_scm wheel twine
python -m pip install -U build twine
- name: Build and check source tarball
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Twine check
run: twine check dist/*
- name: Publish distribution to PyPI
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/run-pytest-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_dev.txt
- name: Setup yt_xarray
run: |
python -m pip install -e .
python -m pip install --upgrade pip
python -m pip install -e .[full,test]
- name: Run Tests
run: pytest --cov=./ --cov-report=xml:coverage/coverage.xml

# https://github.com/marketplace/actions/codecov#example-workflowyml-with-codecov-action
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
directory: ./coverage/
8 changes: 3 additions & 5 deletions .github/workflows/weekly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_dev.txt
- name: Setup yt_xarray
run: python -m pip install -e .
run: |
python -m pip install --upgrade pip
python -m pip install -e .[full,test]
- name: Run Tests
run: pytest -v .
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements.txt
- requirements: requirements_dev.txt
- requirements: requirements_docs.txt
- method: pip
path: .
extra_requirements:
- docs
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include *.yaml
include Makefile
include tox.ini
include .coveragerc
include .flake8
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
Expand Down
36 changes: 35 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "yt_xarray"
version = "0.1.4"
authors = [
{ name="Chris Havlin", email="[email protected]" },
]
description="interface between yt and xarray"
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies=['yt>=4.2.0', 'h5py>=3.4.0', 'pooch>=1.5.1', 'xarray']

[project.urls]
"Homepage" = "https://github.com/data-exp-lab/yt_xarray"
"Bug Tracker" = "https://github.com/data-exp-lab/yt_xarray/issues"

[project.optional-dependencies]
full = ["netCDF4", "scipy", "dask[complete]"]
test = ["pytest", "pytest-cov"]
docs = ["Sphinx==1.8.5", "jinja2<3.1.0", "nbsphinx"]

[tool.black]
line-length = 88
target-version = ['py37']
target-version = ['py310']

[tool.isort]
profile = "black"
Expand Down
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

9 changes: 0 additions & 9 deletions requirements_dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
Sphinx==1.8.5
jinja2<3.1.0
nbsphinx
46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

0 comments on commit 7b74676

Please sign in to comment.