Skip to content

Release Delphi Epidata 4.1.24 #1489

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

Merged
merged 53 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
af3a96b
nssp documentation draft
dsweber2 May 17, 2024
31e2d6d
Merge pull request #1462 from cmu-delphi/bot/sync-main-dev
melange396 May 31, 2024
d965fea
fix boneheaded version typo
melange396 May 31, 2024
20d2de8
Another CTIS publication
capnrefsmmat Jun 3, 2024
5e7a05c
Merge pull request #1464 from cmu-delphi/ctis/pub
melange396 Jun 3, 2024
c1551af
Merge pull request #1463 from cmu-delphi/changelog_version_fix
melange396 Jun 3, 2024
203af70
doc: update instructions for client libraries
dshemetov May 3, 2024
69835d1
Merge pull request #1422 from cmu-delphi/ds/docs
nmdefries Jun 5, 2024
dc918b6
limitations detail and wording improvements
nmdefries Jun 5, 2024
6c62a52
doc: remove outdated dev instructions
dshemetov Jun 3, 2024
a65a808
limitations detail
nmdefries Jun 6, 2024
0d1d2a2
lag and backfill details
nmdefries Jun 6, 2024
6a3eadd
don't update Gem by hand
dsweber2 Jun 6, 2024
fff0654
include national data
dsweber2 Jun 6, 2024
761a808
missingness detail
nmdefries Jun 6, 2024
889abe1
move limitations down
nmdefries Jun 6, 2024
6360508
Merge branch 'dev' into nsspDocs
nmdefries Jun 6, 2024
2a45528
earliest dates, checked states missing Counties
dsweber2 Jun 6, 2024
e423cb4
feat: port pyclient build config to pyproject.toml (#1470)
dshemetov Jun 7, 2024
28482cf
earliest issue from Minh
dsweber2 Jun 7, 2024
b1916c5
Another CTIS publication
capnrefsmmat Jun 10, 2024
0917b91
Merge pull request #1475 from cmu-delphi/ctis/pub
melange396 Jun 10, 2024
122cd18
Renamed several files
tinatownes Jun 14, 2024
30fab53
chore(deps-dev): bump braces in /src/client/packaging/npm
dependabot[bot] Jun 16, 2024
c35335e
Merge pull request #1477 from cmu-delphi/dependabot/npm_and_yarn/src/…
melange396 Jun 17, 2024
f2ad849
active quidel page no suffix
nmdefries Jun 17, 2024
40ecc24
indicator combo link
nmdefries Jun 17, 2024
38b1281
Merge branch 'dev' into Tina_renaming_inactive_files
nmdefries Jun 17, 2024
27b54fc
Merge pull request #1476 from cmu-delphi/Tina_renaming_inactive_files
nmdefries Jun 17, 2024
1ff1491
chore(deps-dev): bump ws in /src/client/packaging/npm
dependabot[bot] Jun 18, 2024
ae609fa
indicator combo and quidel links
nmdefries Jun 18, 2024
fe3b998
Merge pull request #1480 from cmu-delphi/ndefries/link-renaming2
nmdefries Jun 18, 2024
53a57c7
Merge pull request #1479 from cmu-delphi/dependabot/npm_and_yarn/src/…
melange396 Jun 20, 2024
60945e2
Add mailing list info to API key registration email
melange396 Jun 20, 2024
30c6206
Merge pull request #1482 from cmu-delphi/apikey_mailinglist_link
melange396 Jun 21, 2024
6fb174e
doc: fix dev instruction examples
dshemetov Jun 21, 2024
fe51f39
doc: fix link
dshemetov Jun 21, 2024
a610dcf
replace codebook with updated one from gdrive
nmdefries Jun 24, 2024
bb35b47
Merge pull request #1483 from cmu-delphi/ndefries/fb-codebook-update
capnrefsmmat Jun 25, 2024
10a0a6f
Decouple client release from Delphi release (#1465)
rzats Jun 25, 2024
a028cbe
adding ed, right source
dsweber2 Jun 25, 2024
cafa9d6
title
nmdefries Jun 25, 2024
fb7c54d
rsv full name
nmdefries Jun 25, 2024
585fbc3
Merge branch 'dev' into nsspDocs
nmdefries Jun 25, 2024
f8f760f
Merge pull request #1439 from cmu-delphi/nsspDocs
nmdefries Jun 25, 2024
628e965
Merge branch 'dev' into ds/docs2
nmdefries Jun 26, 2024
c65d809
Merge pull request #1466 from cmu-delphi/ds/docs2
nmdefries Jun 26, 2024
552aad1
Updated Epidata Index (main description page)
tinatownes Jul 2, 2024
4661bd9
unite client discussion
nmdefries Jul 2, 2024
694d89a
Merge pull request #1487 from cmu-delphi/Tina_EpidataAPIhome
nmdefries Jul 3, 2024
6a3f683
py client: drop delphi_utils requirement, log to stderr instead (#1486)
melange396 Jul 9, 2024
559f27e
chore: release delphi-epidata 4.1.24
melange396 Jul 9, 2024
832422f
Update CHANGELOG.md
melange396 Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.1.23
current_version = 4.1.24
commit = False
tag = False

Expand All @@ -9,10 +9,6 @@ tag = False

[bumpversion:file:src/client/delphi_epidata.R]

[bumpversion:file:src/client/delphi_epidata.py]

[bumpversion:file:src/client/packaging/npm/package.json]

[bumpversion:file:src/client/packaging/pypi/setup.py]

[bumpversion:file:dev/local/setup.cfg]
40 changes: 36 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
versionName:
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major)'
required: true
default: patch

Expand All @@ -27,11 +27,43 @@ jobs:
python-version: 3.8
- name: Change version number
id: version
# See this issue for explanation and testing:
# https://github.com/cmu-delphi/delphi-epidata/pull/1473
run: |
python -m pip install bump2version
echo -n "::set-output name=next_tag::"
bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,
- name: Create pull request into prod
if [[ ${{ github.event.inputs.versionName }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# use given version number
NEXT_TAG="${{ github.event.inputs.versionName }}"
elif [[ ${{ github.event.inputs.versionName }} =~ ^(major|minor|patch)$ ]]; then
# calculate new version number based on given tag
NEXT_TAG=$(bump2version --dry-run --list ${{ github.event.inputs.versionName }} | grep ^new_version | sed -r s,"^.*=",,)
else
echo "\nInvalid version name: ${{ github.event.inputs.versionName }}"
exit 1
fi
# apply given or calculated version number
bump2version --new-version $NEXT_TAG _ignored_arg_
# save version number for later
echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT
- name: Get Python client file changes
id: changed-py
uses: dorny/paths-filter@v3
with:
base: "main"
ref: "dev"
filters: |
python_client_changed:
- src/client/delphi_epidata.py
- src/client/packaging/pypi/**
- name: Bump Python versions if client files changed
if: steps.changed-py.outputs.python_client_changed == 'true'
# _ignored_arg_ below is required because of tool quirk
# https://github.com/c4urself/bump2version/issues/22
run: |
cd src/client/packaging/pypi
# this is using the new literal version number (steps.version.outputs.next_tag) output from the bump2version step above, not the workflow input (github.event.inputs.versionName) which can be relative
bump2version --allow-dirty --new-version ${{ steps.version.outputs.next_tag }} _ignored_arg_
- name: Create pull request into main
uses: peter-evans/create-pull-request@v3
with:
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/release-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ jobs:
if: github.repository_owner != 'cmu-delphi'
run: exit 1

client_changed:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Get Python client file changes
id: changed-py
uses: dorny/paths-filter@v3
with:
# when base and ref are the same, changes are detected against the most recent commit before the push.
# see https://github.com/dorny/paths-filter#usage for details.
base: 'main'
ref: 'main'
filters: |
python_client_changed:
- src/client/delphi_epidata.py
- src/client/packaging/pypi/**
outputs:
python_client_changed: ${{ steps.changed-py.outputs.python_client_changed }}

create_release:
needs: correct_repository
runs-on: ubuntu-latest
Expand All @@ -29,8 +52,8 @@ jobs:
id: extract_version
run: |
python -m pip install bump2version
echo -n "::set-output name=version::"
bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,
VERSION=$(bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v5
Expand All @@ -45,7 +68,8 @@ jobs:
tag_name: ${{ steps.create_release.outputs.tag_name }}

release_python_client:
needs: create_release
needs: [client_changed, create_release]
if: needs.client_changed.outputs.python_client_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -57,14 +81,14 @@ jobs:
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
pip install build wheel twine
- name: Prepare package
run: |
cp src/client/*.py src/client/packaging/pypi/delphi_epidata/
- name: Create release
working-directory: src/client/packaging/pypi
run: |
python setup.py sdist bdist_wheel
python -m build --sdist --wheel
- uses: actions/upload-artifact@v2
with:
name: delphi_epidata_py
Expand All @@ -80,8 +104,8 @@ jobs:
with:
user: __token__
password: ${{ secrets.DELPHI_PYPI_PROD_TOKEN }}
packages_dir: src/client/packaging/pypi/dist/
skip_existing: true
packages-dir: src/client/packaging/pypi/dist/
skip-existing: true
# repository_url: https://test.pypi.org/legacy/

release_js_client:
Expand All @@ -95,7 +119,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: "16.x"
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion dev/local/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = Delphi Development
version = 4.1.23
version = 4.1.24

[options]
packages =
Expand Down
86 changes: 42 additions & 44 deletions docs/api/client_libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,83 +6,81 @@ nav_order: 1

# Epidata API Client Libraries

To access Delphi Epidata programmatically, we recommend our client libraries:

- R: [epidatr](https://cmu-delphi.github.io/epidatr/),
- Python: [delphi-epidata](https://pypi.org/project/delphi-epidata/) (soon to be replaced with [epidatpy](https://github.com/cmu-delphi/epidatpy)),
- Javascript: [delphi-epidata](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js).

For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](covidcast_clients.md).

A full-featured Epidata client for R is available at
[epidatr](https://github.com/cmu-delphi/epidatr) and
[also on CRAN](https://cran.r-project.org/web/packages/epidatr/index.html).

We are currently working on a new full-featured Epidata client for Python. It is not ready
for release yet, but you can track our development progress and help us test it out at
[epidatpy](https://github.com/cmu-delphi/epidatpy).

In the meantime, minimalist Epidata clients remain available for
[Python](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.py),
[JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js),
and
[R (legacy)](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.R).
The following samples show how to import the library and fetch Delphi's COVID-19
Surveillance Streams from Facebook Survey CLI for county 06001, and days
The following samples show how to import the library and fetch Delphi's
COVID-19 Surveillance Streams from Facebook Survey CLI for county 06001 and days
`20200401` and `20200405-20200414` (11 days total).

### R

````R
# [Optional] configure your API key, if desired
# Interactive. See https://cmu-delphi.github.io/epidatr/articles/epidatr.html#api-keys for details.
Install [`epidatr` from CRAN](https://cran.r-project.org/package=epidatr)
with `install.packages("epidatr")`.

```R
# Configure API key interactively, if needed. See
# https://cmu-delphi.github.io/epidatr/articles/epidatr.html#api-keys for details.
#save_api_key()
# Import
library(epidatr)
# Fetch data
res <- pub_covidcast('fb-survey', 'smoothed_cli', 'county', 'day', geo_values = '06001',
time_values = c(20200401, 20200405:20200414))
cat(res)
````
```

### Python

Optionally install the [package from PyPI](https://pypi.org/project/delphi-epidata/) using pip(env):
````bash
pip install delphi-epidata
````
Install [`delphi-epidata` from PyPI](https://pypi.org/project/delphi-epidata/) with
`pip install delphi-epidata`.

Otherwise, place
[`delphi_epidata.py`](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.py)
in the same directory as your Python script.

````python
# Import
```python
from delphi_epidata import Epidata
# [Optional] configure your API key, if desired
# Configure API key, if needed.
#Epidata.auth = ('epidata', <your API key>)
# Fetch data
res = Epidata.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001')
print(res['result'], res['message'], len(res['epidata']))
````
```

### JavaScript (in a web browser)

The minimalist JavaScript client does not currently support API keys. If you need API key support in JavaScript, contact [email protected].
The minimalist JavaScript client does not currently support API keys.
If you need API key support in JavaScript, contact [email protected].

````html
<!-- Imports -->
```html
<script src="delphi_epidata.js"></script>
<!-- Fetch data -->
<script>
EpidataAsync.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, EpidataAsync.range(20200405, 20200414)], '06001').then((res) => {
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
EpidataAsync.covidcast(
"fb-survey",
"smoothed_cli",
"day",
"county",
[20200401, EpidataAsync.range(20200405, 20200414)],
"06001"
).then((res) => {
console.log(
res.result,
res.message,
res.epidata != null ? res.epidata.length : 0
);
});
</script>
````
```

### R (legacy)

The old Delphi Epidata R client is available
[here](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R),
but its use is discouraged.

```R
# [Optional] configure your API key, if desired
# Configure API key, if needed.
#option('epidata.auth', <your API key>)
# Import
source('delphi_epidata.R')
# Fetch data
res <- Epidata$covidcast('fb-survey', 'smoothed_cli', 'day', 'county', list(20200401, Epidata$range(20200405, 20200414)), '06001')
cat(paste(res$result, res$message, length(res$epidata), "\n"))
```
Loading
Loading