Skip to content

Commit

Permalink
Merge pull request #2 from IMMM-SFA/erexer/ci
Browse files Browse the repository at this point in the history
erexer/ci
  • Loading branch information
erexer authored Jun 13, 2022
2 parents c04d5d3 + 3c7e83e commit 1ed6c7f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]

env:
OS: ${{ matrix.os }}
PYTHON: '3.8'

steps:

- uses: actions/checkout@v1

- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.8.5

- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libgdal-dev
python setup.py install
- name: Test and generate coverage report on Linux
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
2 changes: 2 additions & 0 deletions NATURF/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

__version__ = "0.0.0"
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# IM3_ORNL
[![build](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml/badge.svg)](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml)

Code, data, and products related to IM3
# NATURF: Neighborhood Adaptive Tissues for Urban Resilience Futures

NATURF addresses the knowledge gap of the effect of the geometry of a neighborhood on the local meteorology.
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GDAL==3.4.1
numpy==1.21.5
pandas==1.4.1
setuptools==61.2.0
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[metadata]
description_file = README.md
license_files = LICENSE.txt
34 changes: 34 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import re
from setuptools import setup, find_packages


def readme():
"""Return the contents of the project README file."""
with open('README.md') as f:
return f.read()


def get_requirements():
"""Return a list of package requirements from the requirements.txt file."""
with open('requirements.txt') as f:
return f.read().split()


version = re.search(r"__version__ = ['\"]([^'\"]*)['\"]", open('NATURF/__init__.py').read(), re.M).group(1)

setup(
name='naturf',
version=version,
packages=find_packages(),
url='https://github.com/IMMM-SFA/naturf',
download_url=f'https://github.com/IMMM-SFA/naturf/archive/refs/tags/v{version}.tar.gz',
license='MIT',
author='Levi Sweet-Breu, Melissa Allen-Dumas, Emily Rexer',
author_email='',
description='An open-source Python package to address the effect of the geometry of a neighborhood on the local meteorology. ',
long_description=readme(),
long_description_content_type="text/markdown",
python_requires='>=3.8.5',
include_package_data=True,
install_requires=get_requirements()
)

0 comments on commit 1ed6c7f

Please sign in to comment.