Skip to content

Commit

Permalink
Revert "Merge pull request #4441 from pybamm-team/telemetry"
Browse files Browse the repository at this point in the history
This reverts commit 0eae1a4, reversing
changes made to 9ac0b5b.
  • Loading branch information
kratman committed Nov 14, 2024
1 parent af68cdf commit d717da6
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 391 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ input/*

# simulation outputs
out/
config.py
matplotlibrc
*.pickle
*.sav
Expand Down
3 changes: 0 additions & 3 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/pybam

# Errors in docs/source/user_guide/index.md
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs

# Telemetry
https://us.i.posthog.com
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
- Adds an option "voltage as a state" that can be "false" (default) or "true". If "true" adds an explicit algebraic equation for the voltage. ([#4507](https://github.com/pybamm-team/PyBaMM/pull/4507))
- Improved `QuickPlot` accuracy for simulations with Hermite interpolation. ([#4483](https://github.com/pybamm-team/PyBaMM/pull/4483))
- Added Hermite interpolation to the (`IDAKLUSolver`) that improves the accuracy and performance of post-processing variables. ([#4464](https://github.com/pybamm-team/PyBaMM/pull/4464))
- Added basic telemetry to record which functions are being run. See [Telemetry section in the User Guide](https://docs.pybamm.org/en/latest/source/user_guide/index.html#telemetry) for more information. ([#4441](https://github.com/pybamm-team/PyBaMM/pull/4441))
- Added `BasicDFN` model for sodium-ion batteries ([#4451](https://github.com/pybamm-team/PyBaMM/pull/4451))
- Added sensitivity calculation support for `pybamm.Simulation` and `pybamm.Experiment` ([#4415](https://github.com/pybamm-team/PyBaMM/pull/4415))
- Added OpenMP parallelization to IDAKLU solver for lists of input parameters ([#4449](https://github.com/pybamm-team/PyBaMM/pull/4449))
- Added phase-dependent particle options to LAM ([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
- Added phase-dependent particle options to LAM
([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
- Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (`SplitOCVR`). ([#4330](https://github.com/pybamm-team/PyBaMM/pull/4330))
- Added the `pybamm.DiscreteTimeSum` expression node to sum an expression over a sequence of data times, and accompanying `pybamm.DiscreteTimeData` class to store the data times and values ([#4501](https://github.com/pybamm-team/PyBaMM/pull/4501))

Expand Down
5 changes: 0 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,3 @@ def set_random_seed():
@pytest.fixture(autouse=True)
def set_debug_value():
pybamm.settings.debug_mode = True


@pytest.fixture(autouse=True)
def disable_telemetry():
pybamm.telemetry.disable()
9 changes: 0 additions & 9 deletions docs/source/user_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,3 @@ glob:
../examples/notebooks/creating_models/5-half-cell-model.ipynb
../examples/notebooks/creating_models/6-a-simple-SEI-model.ipynb
```

# Telemetry

PyBaMM optionally collects anonymous usage data to help improve the library. This telemetry is opt-in and can be easily disabled. Here's what you need to know:

- **What is collected**: Basic usage information like PyBaMM version, Python version, and which functions are run.
- **Why**: To understand how PyBaMM is used and prioritize development efforts.
- **Opt-out**: To disable telemetry, set the environment variable `PYBAMM_DISABLE_TELEMETRY=true` (or any value other than `false`) or use `pybamm.telemetry.disable()` in your code.
- **Privacy**: No personal information (name, email, etc) or sensitive information (parameter values, simulation results, etc) is ever collected.
1 change: 0 additions & 1 deletion docs/source/user_guide/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ Package Minimum supp
`typing-extensions <https://pypi.org/project/typing-extensions/>`__ 4.10.0
`pandas <https://pypi.org/project/pandas/>`__ 1.5.0
`pooch <https://www.fatiando.org/pooch/>`__ 1.8.1
`posthog <https://posthog.com/>`__ 3.6.5
=================================================================== ==========================

.. _install.optional_dependencies:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ dependencies = [
"typing-extensions>=4.10.0",
"pandas>=1.5.0",
"pooch>=1.8.1",
"posthog",
]

[project.urls]
Expand Down
12 changes: 3 additions & 9 deletions src/pybamm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from .logger import logger, set_logging_level, get_new_logger
from .settings import settings
from .citations import Citations, citations, print_citations
from . import config

# Classes for the Expression Tree
from .expression_tree.symbol import *
Expand Down Expand Up @@ -195,8 +194,8 @@
# Batch Study
from .batch_study import BatchStudy

# Callbacks, telemetry, config
from . import callbacks, telemetry, config
# Callbacks
from . import callbacks

# Pybamm Data manager using pooch
from .pybamm_data import DataLoader
Expand All @@ -205,14 +204,12 @@
import os
import pathlib
import sysconfig

os.environ["CASADIPATH"] = str(pathlib.Path(sysconfig.get_path("purelib")) / "casadi")
os.environ["CASADIPATH"] = str(pathlib.Path(sysconfig.get_path('purelib')) / 'casadi')

__all__ = [
"batch_study",
"callbacks",
"citations",
"config",
"discretisations",
"doc_utils",
"experiment",
Expand All @@ -228,11 +225,8 @@
"simulation",
"solvers",
"spatial_methods",
"telemetry",
"type_definitions",
"util",
"version",
"pybamm_data",
]

#config.generate()
163 changes: 0 additions & 163 deletions src/pybamm/config.py

This file was deleted.

3 changes: 0 additions & 3 deletions src/pybamm/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import warnings
from functools import lru_cache
from datetime import timedelta
import pybamm.telemetry
from pybamm.util import import_optional_dependency

from pybamm.expression_tree.operations.serialise import Serialise
Expand Down Expand Up @@ -451,8 +450,6 @@ def solve(
Additional key-word arguments passed to `solver.solve`.
See :meth:`pybamm.BaseSolver.solve`.
"""
pybamm.telemetry.capture("simulation-solved")

# Setup
if solver is None:
solver = self._solver
Expand Down
38 changes: 0 additions & 38 deletions src/pybamm/telemetry.py

This file was deleted.

Loading

0 comments on commit d717da6

Please sign in to comment.