Commit Graph
37 Commits
Author SHA1 Message Date
Ruslan Kuprieiev 35e6f082a4 analytics: use iterative-telemetry for user_id lookup 2022-09-17 00:45:45 +03:00
Ruslan Kuprieiev 844f77b4f9 dvc: drop python 3.7
Also upgraded with `pyupgrade --py38-plus`

Fixes #7708
2022-05-30 16:51:35 +03:00
Nikita Kodenko 696c704632 tests: replace several unittest.mock usages with mocker (#6544)
* tests: several unittest.mock usages replaced with mocker

* tests: fixes in tests/unit/repo/test_reproduce.py

* tests: rolled back WiP tests
2021-09-17 18:22:34 +03:00
Ruslan Kuprieiev 33c6a9b19b analytics: introduce DVC_NO_ANALYTICS (#6453)
Replacing DVC_ANALYTICS. This is following our other env conventions and
will not have effect if set to false/no/etc, and will only work if set
to true/yes/y/etc. Will disable analytics even if it is explicitly
enabled in our configs.

Kudos @skshetry
2021-08-17 15:16:40 +03:00
Ruslan Kuprieiev c2bf0dc713 analytics: add DVC_ANALYTICS env var (#6448) 2021-08-17 01:48:38 +03:00
Saugat Pachhai 67980de44d tests: mock global config dir for Updater (#5386) 2021-02-02 17:08:09 +05:45
Saugat Pachhai ad306d7bf3 Enable most of the pylint checks (#4111) 2020-06-25 18:10:14 +03:00
Casper da Costa-Luis 2bb7257a06 lint: isort pre-commit & misc improvements (#3749)
* test: clean flake8 config root clutter

* test: pre-commit: add isort

Compatible with black (see https://github.com/timothycrosley/isort/issues/694)

* lint: reorder imports

* lint: more complex imports

* lint: fix deepsource

* config: isort: add first party dvc

* tests: restyled: add isort

* temp commit to revert before merge

* Revert "temp commit to revert before merge"

This reverts commit 11db0fd8e95fe891597cbb9bf804480909b19e24.
2020-05-06 23:56:07 +03:00
Alexander Schepanovski 6ccae711fe dvc: refactor config (#3298)
* dvc: refactor config

Advantages:
- read like a dict
- modify as a dict for testing or manipulation purposes
- wrap modifications into context manager to save them:

    with config.edit("local") as conf:
        conf["core"]["remote"] = "new-default"

Design decisions:
- dropped string constants
- remote sections are parsed into a simple subdict upon load
- remote config schema is now defined by url scheme
- relative paths are handled transparently upon load/save
- user config and remote manipulations are moved to commands
- same dev manipulations are done by simply modifying a config dict

* test: do not set cache.type for remotes that doesn't support it

* dvc: fix windows absolute paths validation in config

* test: fix windows separate drive test

* dvc: stylistic fixes in config
2020-02-13 19:35:37 +02:00
Ruslan Kuprieiev d305803015 analytics: ignore request.post errors (#3292)
Users have been complaining about dvc analytics errors when they are not
connected to the internet.
2020-02-10 01:41:42 +02:00
pawel bb72ce8a50 analytics: tests: migrate to dir helpers 2020-01-06 15:49:26 +01:00
Mr. Outis 6d36b85736 py3: remove string compat related code 2019-12-30 23:49:19 -06:00
Mr. Outis 5dd6300878 💅 black 2019-12-07 21:19:54 -06:00
Mr. Outis 6e4c3d6acd tests: require keys on analytics report schema 2019-12-07 21:18:28 -06:00
Mr. Outis c50bd17bb4 analytics: collect execution info only when available 2019-12-07 21:14:31 -06:00
Mr. Outis 2145daa130 analytics: define private methods 2019-12-06 16:26:10 -06:00
Mr. Outis 5a8033415d tests: use str, builtin_str in schema 2019-12-06 13:54:17 -06:00
Mr. Outis f704e5468b tests: stringify tmp_global_config since it doesnt return a pathlike object 2019-12-06 10:20:30 -06:00
Mr. Outis bc2471cd30 tests: adjust scm_class schema 2019-12-05 19:56:45 -06:00
Mr. Outis 71ead3f62e analytics: use a tempfile for inter-process communication 2019-12-04 19:47:06 -06:00
Mr. Outis 05a68684fd tests: isolate global config from analytics tests
fix #2806
2019-12-04 19:44:12 -06:00
Mr. Outis 7a3aae1c7e tests: add unit test for analytics.system_info 2019-12-04 19:43:00 -06:00
Mr. Outis 8a32b28b54 analytics: collect and send on daemon 2019-12-02 22:54:16 -06:00
Mr. Outis 8b5ca253ec analytics: move report schema to tests 2019-12-02 22:48:09 -06:00
Mr. Outis e0d47a1382 💅 formatting 2019-12-02 21:57:06 -06:00
Mr. Outis ca485db240 analytics: define report schema and use it on tests 2019-12-02 21:52:00 -06:00
Mr. Outis 55960154c5 analytics: document why tmp_global_config is needed 2019-12-02 17:51:35 -06:00
Mr. Outis 946dfc1400 analytics: send report without loading it to memory
shout-out to @Suor for the suggestion
2019-12-02 17:51:32 -06:00
Mr. Outis e69fffa7c7 py2 compat issues 🤷 2019-11-27 18:39:01 -06:00
Mr. Outis 787ea9cd31 tests: set temporary global config 2019-11-27 12:37:11 -06:00
Mr. Outis 2a5cac5570 💅 deepsource 2019-11-26 19:34:49 -06:00
Mr. Outis f9952046fd tests: functional and unit tests for analytics 2019-11-26 19:29:20 -06:00
Mr. Outis 6bc24039db 💅 black 2019-11-26 18:33:16 -06:00
Mr. Outis 5261ed7148 tests: analytics.find_or_create_user_id 2019-11-26 13:40:11 -06:00
Mr. Outis ef1f038c32 analytics: refactor into a module 2019-11-20 13:31:44 -06:00
Ruslan Kuprieiev 1058df0f77 analytics: don't forget to convert to bool 2019-11-08 05:21:47 +02:00
Ruslan Kuprieiev 910a67b35f analytics: don't verify config from repo
Otherwise this will raise an exception from analytics worker:
```
dvc config cache.type sometypo
```
But running that same command with `--system` or `--global` flag outside
of repo won't raise that.

Also need to better handle ConfigObjError, but that is a separate issue.
2019-11-08 02:37:11 +02:00