Skip to content

Commit

Permalink
Merge pull request #136 from jGaboardi/testing_matrix
Browse files Browse the repository at this point in the history
Extend continuous integration testing matrix
  • Loading branch information
jGaboardi authored May 4, 2021
2 parents 7a8cf81 + 32f7754 commit 1072257
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 24 deletions.
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='[email protected]',
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="[email protected]",
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",
],
)

0 comments on commit 1072257

Please sign in to comment.