-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: unify settings and build to pyproject.toml
- Loading branch information
Showing
23 changed files
with
289 additions
and
308 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: ci | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- name: Install Dependencies | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -e ".[dev]" | ||
- name: Check Formatting | ||
run: | | ||
source venv/bin/activate | ||
inv lint-black | ||
- name: Check Linting | ||
run: | | ||
source venv/bin/activate | ||
inv lint-pylint | ||
- name: Check Types | ||
run: | | ||
source venv/bin/activate | ||
inv lint-mypy | ||
- name: Test | ||
run: | | ||
source venv/bin/activate | ||
inv test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
.mypy_cache | ||
*.pyc | ||
__pycache__ | ||
/venv | ||
/docs/_build | ||
.coverage | ||
.pytest_cache | ||
.DS_Store | ||
*.egg-info | ||
/dist | ||
.DS_Store | ||
dist/ | ||
build/ | ||
docs/_build | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.5.1 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [--fix] | ||
# Run the formatter. | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,52 @@ | ||
"""Fetch data from Delphi's API.""" | ||
|
||
# Make the linter happy about the unused variables | ||
__all__ = [ | ||
"get_api_key", | ||
"__version__", | ||
"CovidcastDataSources", | ||
"DataSignal", | ||
"DataSignalGeoStatistics", | ||
"DataSource", | ||
"GeoType", | ||
"TimeType", | ||
"WebLink", | ||
"AEpiDataEndpoints", | ||
"AEpiDataCall", | ||
"EpiDataFormatType", | ||
"EpiDataResponse", | ||
"EpiRange", | ||
"EpiRangeDict", | ||
"EpiRangeLike", | ||
"EpiRangeParam", | ||
"IntParam", | ||
"InvalidArgumentException", | ||
"StringParam", | ||
] | ||
__author__ = "Delphi Research Group" | ||
|
||
|
||
from ._auth import get_api_key | ||
from ._constants import __version__ | ||
from ._covidcast import ( | ||
CovidcastDataSources, | ||
DataSignal, | ||
DataSignalGeoStatistics, | ||
DataSource, | ||
GeoType, | ||
TimeType, | ||
WebLink, | ||
) | ||
from ._endpoints import AEpiDataEndpoints | ||
from ._model import ( | ||
AEpiDataCall, | ||
EpiDataFormatType, | ||
EpiDataResponse, | ||
EpiRange, | ||
EpiRangeDict, | ||
EpiDataResponse, | ||
EpiRangeLike, | ||
InvalidArgumentException, | ||
EpiRangeParam, | ||
IntParam, | ||
InvalidArgumentException, | ||
StringParam, | ||
EpiDataFormatType, | ||
AEpiDataCall, | ||
) | ||
from ._covidcast import ( | ||
DataSignal, | ||
DataSource, | ||
WebLink, | ||
DataSignalGeoStatistics, | ||
CovidcastDataSources, | ||
GeoType, | ||
TimeType, | ||
) | ||
from ._auth import get_api_key | ||
|
||
__author__ = "Delphi Group" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from typing import Final | ||
|
||
|
||
__version__: Final = "0.5.0" | ||
HTTP_HEADERS: Final = {"User-Agent": f"epidatpy/{__version__}"} | ||
BASE_URL: Final = "https://api.delphi.cmu.edu/epidata/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.