Skip to content

Commit

Permalink
Merge pull request #884 from bashtage/add-azure-ci
Browse files Browse the repository at this point in the history
MAINT: Add AzureCi and prepare for 0.10 release
  • Loading branch information
bashtage committed Jul 13, 2021
2 parents b56ca89 + c1b92c8 commit 638b9da
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 176 deletions.
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

97 changes: 97 additions & 0 deletions README.md
@@ -0,0 +1,97 @@
# pandas-datareader

Up to date remote data access for pandas, works for multiple versions of
pandas.

[![image][]][1]

[![image][2]][3]

[![image][4]][5]

[![image][6]][7]

[![image][8]][9]

[![image][10]][11]

## Installation

Install using `pip`

``` shell
pip install pandas-datareader
```

## Usage

``` python
import pandas_datareader as pdr
pdr.get_data_fred('GS10')
```

## Documentation

[Stable documentation][] is available on
[github.io][Stable documentation]. A second copy of the stable
documentation is hosted on [read the docs][] for more details.

[Development documentation][] is available for the latest changes in
master.

### Requirements

Using pandas datareader requires the following packages:

- pandas>=0.23
- lxml
- requests>=2.19.0

Building the documentation additionally requires:

- matplotlib
- ipython
- requests_cache
- sphinx
- pydata_sphinx_theme

Development and testing additionally requires:

- black
- coverage
- codecov
- coveralls
- flake8
- pytest
- pytest-cov
- wrapt

### Install latest development version

``` shell
pip install git+https://github.com/pydata/pandas-datareader.git
```

or

``` shell
git clone https://github.com/pydata/pandas-datareader.git
cd pandas-datareader
python setup.py install
```

[image]: https://img.shields.io/pypi/v/pandas-datareader.svg
[1]: https://pypi.python.org/pypi/pandas-datareader/
[2]: https://travis-ci.org/pydata/pandas-datareader.svg?branch=master
[3]: https://travis-ci.org/pydata/pandas-datareader
[4]: https://coveralls.io/repos/pydata/pandas-datareader/badge.svg?branch=master
[5]: https://coveralls.io/r/pydata/pandas-datareader
[6]: https://codecov.io/gh/pydata/pandas-datareader/branch/master/graph/badge.svg
[7]: https://codecov.io/gh/pydata/pandas-datareader
[8]: https://readthedocs.org/projects/pandas-datareader/badge/?version=latest
[9]: https://pandas-datareader.readthedocs.io/en/latest/
[10]: https://img.shields.io/badge/code%20style-black-000000.svg
[11]: https://github.com/psf/black
[Stable documentation]: https://pydata.github.io/pandas-datareader/
[read the docs]: https://pandas-datareader.readthedocs.io/
[Development documentation]: https://pydata.github.io/pandas-datareader/devel/
94 changes: 0 additions & 94 deletions README.rst

This file was deleted.

30 changes: 30 additions & 0 deletions azure-pipelines.yml
@@ -0,0 +1,30 @@
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#passing-parameters
schedules:
- cron: "27 3 * * 0"
# 3:27am UTC every Sunday
displayName: Weekly build
branches:
include:
- main
always: true

trigger:
- main

variables:
PYTHONHASHSEED: 12345678
SETUPTOOLS_USE_DISTUTILS: "stdlib"
coverage: true
RANDOMGEN_CYTHON_COVERAGE: true

jobs:

- template: ci/azure/azure_template_posix.yml
parameters:
name: Linux
vmImage: ubuntu-20.04

- template: ci/azure/azure_template_windows.yml
parameters:
name: Windows
vmImage: windows-2019
86 changes: 86 additions & 0 deletions ci/azure/azure_template_posix.yml
@@ -0,0 +1,86 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

parameters:
# defaults for any parameters that are not specified
name: ''
vmImage: ''
coverage: true

jobs:

- job: ${{ parameters.name }}Test
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
${{ if eq(parameters.name, 'Linux') }}:
python36_legacy:
python.version: '3.6'
PANDAS: 1.0.5
python37_legacy:
python.version: '3.7'
PANDAS: 1.1.5
python38_recent:
python.version: '3.8'
PANDAS: 1.2.5
python39_latest:
python.version: '3.9'

maxParallel: 10

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- script: |
python -m pip install pip setuptools -U
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
if [[ -n ${PANDAS} ]]; then
python -m pip install pandas==${PANDAS}
fi;
displayName: 'Install dependencies'
- script: |
python -m pip install -e . -v --no-build-isolation
displayName: 'Install'
- script: python -m pip list
displayName: 'List Configuration (PyPI)'

- script: |
black --check pandas_datareader
isort --check pandas_datareader
flake8 pandas_datareader
displayName: 'Check style and formatting'
- script: |
echo "Testing editable install"
if [[ ${COVERAGE} == "true" ]]; then
export COVERAGE_OPTS="--cov-config .coveragerc --cov=pandas_datareader --cov-report xml:coverage.xml --cov-report term"
fi
echo pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} pandas_datareader/tests
pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} pandas_datareader/tests
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
condition: eq(variables['coverage'], 'true')

- bash: bash <(curl -s https://codecov.io/bash)
displayName: 'CodeCov upload'
condition: eq(variables['coverage'], 'true')

0 comments on commit 638b9da

Please sign in to comment.