Skip to content

Commit 31dae08

Browse files
authored
Rename files and library to pymetrics (#28)
* renamed repo * renamed repo * renamed repo * rename folder
1 parent e219cd3 commit 31dae08

File tree

18 files changed

+41
-41
lines changed

18 files changed

+41
-41
lines changed

.github/workflows/daily_collection.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uv pip install .
4141
- name: Collect PyPI Downloads
4242
run: |
43-
uv run download-analytics collect-pypi \
43+
uv run pymetrics collect-pypi \
4444
--verbose \
4545
--max-days ${{ inputs.max_days_pypi || 30 }} \
4646
--add-metrics \
@@ -50,7 +50,7 @@ jobs:
5050
BIGQUERY_CREDENTIALS: ${{ secrets.BIGQUERY_CREDENTIALS }}
5151
- name: Collect Anaconda Downloads
5252
run: |
53-
uv run download-analytics collect-anaconda \
53+
uv run pymetrics collect-anaconda \
5454
--output-folder gdrive://***REMOVED***-Z \
5555
--max-days ${{ inputs.max_days_anaconda || 90 }} \
5656
--verbose
@@ -72,6 +72,6 @@ jobs:
7272
uv pip install -U pip
7373
uv pip install -e .[dev]
7474
- name: Slack alert if failure
75-
run: uv run python -m download_analytics.slack_utils -r ${{ github.run_id }} -c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }}
75+
run: uv run python -m pymetrics.slack_utils -r ${{ github.run_id }} -c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }}
7676
env:
7777
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}

.github/workflows/daily_summarize.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uv pip install .
3131
- name: Run Summarize
3232
run: |
33-
uv run download-analytics summarize \
33+
uv run pymetrics summarize \
3434
--output-folder gdrive://***REMOVED***
3535
env:
3636
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }}
@@ -67,7 +67,7 @@ jobs:
6767
uv pip install .[dev]
6868
- name: Slack alert if failure
6969
run: |
70-
uv run python -m download_analytics.slack_utils \
70+
uv run python -m pymetrics.slack_utils \
7171
-r ${{ github.run_id }} \
7272
-c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }} \
7373
-m 'Summarize Analytics build failed :fire: :dumpster-fire: :fire:'

.github/workflows/dryrun.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uv pip install .
2929
- name: Collect PyPI Downloads - Dry Run
3030
run: |
31-
uv run download-analytics collect-pypi \
31+
uv run pymetrics collect-pypi \
3232
--verbose \
3333
--max-days 30 \
3434
--add-metrics \
@@ -39,7 +39,7 @@ jobs:
3939
BIGQUERY_CREDENTIALS: ${{ secrets.BIGQUERY_CREDENTIALS }}
4040
- name: Collect Anaconda Downloads - Dry Run
4141
run: |
42-
uv run download-analytics collect-anaconda \
42+
uv run pymetrics collect-anaconda \
4343
--output-folder gdrive://***REMOVED***-Z \
4444
--max-days 90 \
4545
--verbose \
@@ -48,7 +48,7 @@ jobs:
4848
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }}
4949
- name: Summarize - Dry Run
5050
run: |
51-
uv run download-analytics summarize \
51+
uv run pymetrics summarize \
5252
--verbose \
5353
--output-folder gdrive://***REMOVED*** \
5454
--dry-run

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Download Analytics
1+
# PyMetrics
22

3-
The Download Analytics project allows you to extract download metrics for Python libraries published on [PyPI](https://pypi.org/) and [Anaconda](https://www.anaconda.com/).
3+
The PyMetrics project allows you to extract download metrics for Python libraries published on [PyPI](https://pypi.org/) and [Anaconda](https://www.anaconda.com/).
44

55
The DataCebo team uses these scripts to report download counts for the libraries in the [SDV ecosystem](https://sdv.dev/) and other libraries.
66

77
## Overview
8-
The Download Analytics project is a collection of scripts and tools to extract information
8+
The PyMetrics project is a collection of scripts and tools to extract information
99
about OSS project downloads from different sources and to analyze them to produce user
1010
engagement metrics.
1111

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Download Analytics CLI."""
1+
"""PyMetrics CLI."""
22

33
import argparse
44
import logging
@@ -9,9 +9,9 @@
99

1010
import yaml
1111

12-
from download_analytics.anaconda import collect_anaconda_downloads
13-
from download_analytics.main import collect_downloads
14-
from download_analytics.summarize import summarize_downloads
12+
from pymetrics.anaconda import collect_anaconda_downloads
13+
from pymetrics.main import collect_downloads
14+
from pymetrics.summarize import summarize_downloads
1515

1616
LOGGER = logging.getLogger(__name__)
1717

@@ -22,7 +22,7 @@ def _env_setup(logfile, verbosity):
2222
format_ = '%(asctime)s - %(levelname)s - %(message)s'
2323
level = (3 - verbosity) * 10
2424
logging.basicConfig(filename=logfile, level=level, format=format_)
25-
logging.getLogger('download_analytics').setLevel(level)
25+
logging.getLogger('pymetrics').setLevel(level)
2626
logging.getLogger().setLevel(logging.WARN)
2727

2828

@@ -119,8 +119,8 @@ def _get_parser():
119119
help='Do not upload the results. Just calculate them.',
120120
)
121121
parser = argparse.ArgumentParser(
122-
prog='download-analytics',
123-
description='Download Analytics Command Line Interface',
122+
prog='pymetrics',
123+
description='PyMetrics Command Line Interface',
124124
parents=[logging_args],
125125
)
126126
parser.set_defaults(action=None)
@@ -255,7 +255,7 @@ def _get_parser():
255255

256256

257257
def main():
258-
"""Run the Download Analytics CLI."""
258+
"""Run the PyMetrics CLI."""
259259
parser = _get_parser()
260260
if len(sys.argv) < 2:
261261
parser.print_help()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import requests
1010
from tqdm import tqdm
1111

12-
from download_analytics.output import append_row, create_csv, get_path, load_csv
13-
from download_analytics.time_utils import drop_duplicates_by_date
12+
from pymetrics.output import append_row, create_csv, get_path, load_csv
13+
from pymetrics.time_utils import drop_duplicates_by_date
1414

1515
LOGGER = logging.getLogger(__name__)
1616
dir_path = os.path.dirname(os.path.realpath(__file__))
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import logging
44

5-
from download_analytics.metrics import compute_metrics
6-
from download_analytics.output import create_csv, get_path
7-
from download_analytics.pypi import get_pypi_downloads
8-
from download_analytics.summarize import get_previous_pypi_downloads
5+
from pymetrics.metrics import compute_metrics
6+
from pymetrics.output import create_csv, get_path
7+
from pymetrics.pypi import get_pypi_downloads
8+
from pymetrics.summarize import get_previous_pypi_downloads
99

1010
LOGGER = logging.getLogger(__name__)
1111

0 commit comments

Comments
 (0)