Skip to content

Commit 8659609

Browse files
authored
Merge pull request #15 from cmu-delphi/ds/rename-package
Rename package to `epidatpy`
2 parents d86ea91 + 811434f commit 8659609

23 files changed

+59
-52
lines changed

.github/workflows/release_helper.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
inv dist
6969
- uses: actions/upload-artifact@v2
7070
with:
71-
name: delphi_epidata
71+
name: epidatpy
7272
- name: Upload Release Asset
7373
uses: AButler/[email protected]
7474
with:

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Delphi Epidata Python Client
1+
# Delphi Epidata Python Client `epidatpy`
22

33
[![License: MIT][mit-image]][mit-url] [![Github Actions][github-actions-image]][github-actions-url] [![PyPi][pypi-image]][pypi-url] [![Read the Docs][docs-image]][docs-url]
44

@@ -11,7 +11,13 @@ For a short-term fix, the package can be used with the old name by installing wi
1111
Install latest version:
1212

1313
```sh
14-
pip install -e "git+https://github.com/cmu-delphi/delphi-epidata-py.git#egg=delphi_epidata"
14+
pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
15+
```
16+
17+
old name version
18+
19+
```sh
20+
pip install -e "git+https://github.com/cmu-delphi/epidatpy.git@delphi_epidata-before-rename#egg=delphi_epidata"
1521
```
1622

1723
## Usage
@@ -46,20 +52,20 @@ inv release # upload the current version to pypi
4652

4753
The release consists of multiple steps which can be all done via the GitHub website:
4854

49-
1. Go to [create_release GitHub Action](https://github.com/cmu-delphi/delphi-epidata-py/actions/workflows/create_release.yml) and click the `Run workflow` button. Enter the next version number or one of the magic keywords (patch, minor, major) and hit the green `Run workflow` button.
50-
1. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/delphi-epidata-py/pulls)
55+
1. Go to [create_release GitHub Action](https://github.com/cmu-delphi/epidatpy/actions/workflows/create_release.yml) and click the `Run workflow` button. Enter the next version number or one of the magic keywords (patch, minor, major) and hit the green `Run workflow` button.
56+
1. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/epidatpy/pulls)
5157
1. Let the code owner review the PR and its changes and let the CI check whether everything builds successfully
5258
1. Once approved and merged, another GitHub action job starts which automatically will
5359
1. create a git tag
54-
1. create another [Pull Request](https://github.com/cmu-delphi/delphi-epidata-py/pulls) to merge the changes back to the `dev` branch
55-
1. create a [GitHub release](https://github.com/cmu-delphi/delphi-epidata-py/releases) with automatically derived release notes
60+
1. create another [Pull Request](https://github.com/cmu-delphi/epidatpy/pulls) to merge the changes back to the `dev` branch
61+
1. create a [GitHub release](https://github.com/cmu-delphi/epidatpy/releases) with automatically derived release notes
5662
1. Done
5763

5864
[mit-image]: https://img.shields.io/badge/License-MIT-yellow.svg
5965
[mit-url]: https://opensource.org/licenses/MIT
60-
[github-actions-image]: https://github.com/cmu-delphi/delphi-epidata-py/workflows/ci/badge.svg
61-
[github-actions-url]: https://github.com/cmu-delphi/delphi-epidata-py/actions
62-
[pypi-image]: https://img.shields.io/pypi/v/delphi-epidata
63-
[pypi-url]: https://pypi.python.org/pypi/delphi-epidata/
64-
[docs-image]: https://readthedocs.org/projects/delphi-epidata/badge/?version=latest
65-
[docs-url]: https://delphi-epidata.readthedocs.io/en/latest/?badge=latest
66+
[github-actions-image]: https://github.com/cmu-delphi/epidatpy/workflows/ci/badge.svg
67+
[github-actions-url]: https://github.com/cmu-delphi/epidatpy/actions
68+
[pypi-image]: https://img.shields.io/pypi/v/epidatpy
69+
[pypi-url]: https://pypi.python.org/pypi/epidatpy/
70+
[docs-image]: https://readthedocs.org/projects/epidatpy/badge/?version=latest
71+
[docs-url]: https://epidatpy.readthedocs.io/en/latest/?badge=latest

docs/conf.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
#
1313
import os
1414
import sys
15-
sys.path.insert(0, os.path.abspath('..'))
16-
sys.path.insert(0, os.path.abspath('../delphi_epidata'))
15+
16+
sys.path.insert(0, os.path.abspath(".."))
17+
sys.path.insert(0, os.path.abspath("../epidatpy"))
1718

1819
# -- Project information -----------------------------------------------------
1920

20-
project = 'Delphi Epidata API client'
21-
copyright = '2021, Delphi research group' # pylint: disable=redefined-builtin
22-
author = 'Delphi research group'
21+
project = "Delphi Epidata API client"
22+
copyright = "2021, Delphi research group" # pylint: disable=redefined-builtin
23+
author = "Delphi research group"
2324

2425
# The full version, including alpha/beta/rc tags
25-
release = '1.0.0'
26+
release = "1.0.0"
2627

2728

2829
# -- General configuration ---------------------------------------------------
@@ -31,29 +32,29 @@
3132
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3233
# ones.
3334
extensions = [
34-
'sphinx.ext.autodoc',
35-
'sphinx_autodoc_typehints',
35+
"sphinx.ext.autodoc",
36+
"sphinx_autodoc_typehints",
3637
# 'matplotlib.sphinxext.plot_directive'
3738
]
3839

3940
# Add any paths that contain templates here, relative to this directory.
40-
templates_path = ['_templates']
41+
templates_path = ["_templates"]
4142

4243
# List of patterns, relative to source directory, that match files and
4344
# directories to ignore when looking for source files.
4445
# This pattern also affects html_static_path and html_extra_path.
45-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
46+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
4647

4748
add_module_names = False
48-
autoclass_content = 'class'
49-
autodoc_typehints = 'description'
49+
autoclass_content = "class"
50+
autodoc_typehints = "description"
5051

5152
# -- Options for HTML output -------------------------------------------------
5253

5354
# The theme to use for HTML and HTML Help pages. See the documentation for
5455
# a list of builtin themes.
5556
#
56-
html_theme = 'alabaster'
57+
html_theme = "alabaster"
5758

5859
# Add any paths that contain custom static files (such as style sheets) here,
5960
# relative to this directory. They are copied after the builtin static files,
@@ -63,7 +64,7 @@
6364
html_theme_options = {
6465
"extra_nav_links": {
6566
"Delphi group": "https://delphi.cmu.edu/",
66-
"Delphi Epidata API": "https://cmu-delphi.github.io/delphi-epidata"
67+
"Delphi Epidata API": "https://cmu-delphi.github.io/delphi-epidata",
6768
}
6869
}
6970

docs/getting_started.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Basic examples
1616

1717
To obtain all available sources of epidemiological data, we can use the following command:
1818

19-
>>> from delphi_epidata.request import CovidcastEpidata, EpiRange
19+
>>> from epidatpy.request import CovidcastEpidata, EpiRange
2020
>>> epidata = CovidcastEpidata()
2121
>>> print(list(epidata.source_names))
2222
['chng-cli', 'chng-covid', 'covid-act-now', 'doctor-visits', 'fb-survey', 'google-symptoms', 'hhs', 'hospital-admissions', 'indicator-combination-cases-deaths', 'jhu-csse', 'quidel-covid-ag', 'safegraph-weekly', 'usa-facts', 'ght', 'google-survey', 'indicator-combination-nmf', 'quidel-flu', 'safegraph-daily', 'nchs-mortality']
@@ -26,7 +26,7 @@ To obtain smoothed estimates of COVID-like illness from our symptom survey,
2626
distributed through Facebook (`fb-survey`), for every county in the United States between
2727
2020-05-01 and 2020-05-07:
2828

29-
>>> from delphi_epidata.request import EpiRange
29+
>>> from epidatpy.request import EpiRange
3030
>>> apicall = epidata[("fb-survey", "smoothed_cli")].call(
3131
... 'county', "*", EpiRange(20200501, 20200507),
3232
... )

docs/index.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Delphi Epi Data
22
===============
33

44
This package provides Python access to the `Delphi Epidata API
5-
<https://cmu-delphi.github.io/delphi-epidata/api>`_ published by
5+
<https://cmu-delphi.github.io/delphi-epidata/>`_ published by
66
the `Delphi group <https://delphi.cmu.edu>`_ at `Carnegie Mellon University
77
<https://www.cmu.edu>`_.
88

99
The package source code and bug tracker can be found `on GitHub
10-
<https://github.com/cmu-delphi/delphi-epidata-py>`_.
10+
<https://github.com/cmu-delphi/epidatpy>`_.
1111

1212

1313
.. note :: **You should consider subscribing** to the `API mailing list
@@ -29,12 +29,12 @@ Installation
2929
------------
3030

3131
This package is available on PyPI as `covidcast
32-
<https://pypi.org/project/delphi-epidata/>`_, and can be installed using ``pip`` or
32+
<https://pypi.org/project/epidatpy/>`_, and can be installed using ``pip`` or
3333
your favorite Python package manager:
3434

3535
.. code-block:: sh
3636
37-
pip install delphi-epidata
37+
pip install epidatpy
3838
3939
The package requires `pandas <https://pandas.pydata.org/>`_ and `requests
4040
<https://requests.readthedocs.io/en/master/>`_; these should be installed

docs/signals_covid.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Metadata
2424
Many data sources and signals are available, so one can also obtain a data frame
2525
of all signals and their associated metadata:
2626

27-
>>> from delphi_epidata.request import CovidcastEpidata
27+
>>> from epidatpy.request import CovidcastEpidata
2828
>>> covid_ds = CovidcastEpidata()
2929
>>> df_source = covid_ds.source_df
3030
>>> df_signal = covid_ds.signal_df
@@ -34,12 +34,12 @@ which has the property ``source_df`` and ``signal_df``, two data frames containi
3434
the information of all available sources and signals.
3535
More details of the two data frames are listed below.
3636

37-
.. autoclass:: delphi_epidata.request.CovidcastDataSources()
37+
.. autoclass:: epidatpy.request.CovidcastDataSources()
3838
:members:
3939

4040
More metadata statistics can also be obtained as follows:
4141

42-
>>> from delphi_epidata.request import Epidata
42+
>>> from epidatpy.request import Epidata
4343
>>> df = Epidata.covidcast_meta().df()
4444

45-
.. autofunction:: delphi_epidata.request.Epidata.covidcast_meta()
45+
.. autofunction:: epidatpy.request.Epidata.covidcast_meta()
File renamed without changes.

delphi_epidata/_constants.py renamed to epidatpy/_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
__version__: Final = "1.0.0"
55

66

7-
HTTP_HEADERS: Final = {"User-Agent": f"delphi_epidata/{__version__}"}
7+
HTTP_HEADERS: Final = {"User-Agent": f"epidatpy/{__version__}"}
88

99
BASE_URL: Final = "https://delphi.cmu.edu/epidata/"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
[tool.black]
33
line-length = 120
44
target-version = ['py38']
5-
include = 'delphi_epidata'
5+
include = 'epidatpy'

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ current_version = 1.0.0
33
commit = False
44
tag = False
55

6-
[bumpversion:file:delphi_epidata/_version.py]
6+
[bumpversion:file:epidatpy/_version.py]
77
[bumpversion:file:docs/conf.py]
88

99
[bdist_wheel]

setup.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44

55
setuptools.setup(
6-
name="delphi_epidata",
6+
name="epidatpy",
77
version="1.0.0",
88
author="Alex Reinhart",
99
author_email="[email protected]",
1010
description="A programmatic interface to Delphi's Epidata API.",
11-
long_description=pathlib.Path('README.md').read_text(),
11+
long_description=pathlib.Path("README.md").read_text(),
1212
long_description_content_type="text/markdown",
13-
url="https://github.com/cmu-delphi/delphi-epidata-py",
13+
url="https://github.com/cmu-delphi/epidatpy",
1414
packages=setuptools.find_packages(),
1515
classifiers=[
1616
"Programming Language :: Python :: 3",
@@ -20,7 +20,7 @@
2020
"Natural Language :: English",
2121
"Topic :: Scientific/Engineering :: Bio-Informatics",
2222
],
23-
python_requires='>=3.6',
24-
install_requires=[f.strip() for f in pathlib.Path('requirements.txt').read_text().split('\n') if f],
25-
# package_data={'delphi_epidata': []}
23+
python_requires=">=3.6",
24+
install_requires=[f.strip() for f in pathlib.Path("requirements.txt").read_text().split("\n") if f],
25+
# package_data={'epidatpy': []}
2626
)

smoke_covid_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from delphi_epidata.request import CovidcastEpidata, EpiRange
1+
from epidatpy.request import CovidcastEpidata, EpiRange
22

33
epidata = CovidcastEpidata()
44
print(list(epidata.source_names))

smoke_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import date
2-
from delphi_epidata.request import Epidata, EpiRange
2+
from epidatpy.request import Epidata, EpiRange
33

44
apicall = Epidata.covidcast("fb-survey", "smoothed_cli", "day", "nation", EpiRange(20210405, 20210410), "us")
55

smoke_test_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from asyncio import get_event_loop
2-
from delphi_epidata.async_request import Epidata
2+
from epidatpy.async_request import Epidata
33

44

55
async def main() -> None:

tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ROOT_DIR = Path(__file__).parent
1818
SETUP_FILE = ROOT_DIR.joinpath("setup.py")
1919
TEST_DIR = ROOT_DIR.joinpath("tests")
20-
SOURCE_DIR = ROOT_DIR.joinpath("delphi_epidata")
20+
SOURCE_DIR = ROOT_DIR.joinpath("epidatpy")
2121
TOX_DIR = ROOT_DIR.joinpath(".tox")
2222
COVERAGE_FILE = ROOT_DIR.joinpath(".coverage")
2323
COVERAGE_DIR = ROOT_DIR.joinpath("htmlcov")

tests/test_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from delphi_epidata import __version__
1+
from epidatpy import __version__
22

33

44
def test_version() -> None:

tests/test_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from delphi_epidata._model import EpiRange, format_item, format_list
1+
from epidatpy._model import EpiRange, format_item, format_list
22

33

44
def test_epirange() -> None:

0 commit comments

Comments
 (0)