Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend continuous integration testing matrix #136

Merged
merged 11 commits into from
May 4, 2021
15 changes: 15 additions & 0 deletions .ci/py37.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tests
channels:
- conda-forge
dependencies:
- python=3.7
- geopandas
- fuzzywuzzy
- libpysal
- numpy
- pandas
- pytest
- requests
- rtree
- scipy
- six
15 changes: 15 additions & 0 deletions .ci/py38.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tests
channels:
- conda-forge
dependencies:
- python=3.8
- geopandas
- fuzzywuzzy
- libpysal
- numpy
- pandas
- pytest
- requests
- rtree
- scipy
- six
15 changes: 15 additions & 0 deletions .ci/py39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tests
channels:
- conda-forge
dependencies:
- python=3.9
- geopandas
- fuzzywuzzy
- libpysal
- numpy
- pandas
- pytest
- requests
- rtree
- scipy
- six
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest]
environment-file: [.ci/py36.yml]
os: [macos-latest, ubuntu-latest, windows-latest]
environment-file: [.ci/py36.yml, .ci/py37.yml, .ci/py38.yml, .ci/py39.yml]

steps:
- name: Checkout repo
Expand All @@ -30,6 +30,12 @@ jobs:
environment-file: ${{ matrix.environment-file }}
micromamba-version: 'latest'

- name: Test with pytest
- name: Test with pytest - bash
shell: bash -l {0}
run: pytest -v cenpy
if: matrix.os != 'windows-latest'

- name: Test with pytest - powershell
shell: powershell
run: pytest -v cenpy
if: matrix.os == 'windows-latest'
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CenPy
=====
.. image:: https://img.shields.io/static/v1.svg?label=documentation&message=latest&color=blueviolet
:target: https://cenpy-devs.github.io/cenpy
.. image:: https://github.com/cenpy-devs/cenpy/actions/workflows/build.yml/badge.svg
.. image:: https://github.com/cenpy-devs/cenpy/workflows/.github/workflows/build.yml/badge.svg
:target: https://github.com/cenpy-devs/cenpy/actions?query=workflow%3A.github%2Fworkflows%2Fbuild.yml
.. image:: https://img.shields.io/pypi/dm/cenpy.svg
:target: https://pypi.org/project/cenpy/
Expand Down
58 changes: 38 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
from setuptools import setup
import os

package = "cenpy"

basepath = os.path.dirname(__file__)
init = os.path.join(basepath, 'cenpy/__init__.py')
init = os.path.join(basepath, f"{package}/__init__.py")

with open(init, 'r') as initfile:
with open(init, "r") as initfile:
firstline = initfile.readline()
init_version = firstline.split('=')[-1].strip()
init_version = init_version.replace("'","")
init_version = firstline.split("=")[-1].strip()
init_version = init_version.replace("'", "")

with open(os.path.join(basepath, 'README.rst'), 'r') as readme:
with open(os.path.join(basepath, "README.rst"), "r") as readme:
long_description = readme.readlines()
long_description = ''.join(long_description)
long_description = "".join(long_description)

with open(os.path.join(basepath, 'requirements.txt'), 'r') as reqfile:
with open(os.path.join(basepath, "requirements.txt"), "r") as reqfile:
reqs = reqfile.readlines()
reqs = [req.strip() for req in reqs]

setup(name='cenpy',
version=init_version,
description='Explore and download data from Census APIs',
long_description=long_description,
url='https://github.com/cenpy-devs/cenpy',
author='Levi John Wolf',
author_email='levi.john.wolf@gmail.com',
license='3-Clause BSD',
python_requires='>=3.5',
packages=['cenpy'],
install_requires=reqs,
package_data={'cenpy': ['stfipstable.csv']},
zip_safe=False)
setup(
name=package,
version=init_version,
description="Explore and download data from Census APIs",
long_description=long_description,
url=f"https://github.com/{package}-devs/{package}",
author="Levi John Wolf",
author_email="levi.john.wolf@gmail.com",
license="3-Clause BSD",
python_requires=">=3.6",
packages=[package],
install_requires=reqs,
package_data={package: ["stfipstable.csv"]},
zip_safe=False,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)