Mr. Outis
3244f10e7f
💅 add dot to the end of the comment
2019-12-07 21:15:49 -06:00
Mr. Outis
c9f958dd00
analytics: AttributeError -> KeyError
2019-12-07 21:15:38 -06:00
Mr. Outis
146e75be3e
analytics: raise error when collecting a not supported os
2019-12-07 21:15:11 -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
da064e2ede
analytics: remove the report after sending it
2019-12-06 12:28:06 -06:00
Mr. Outis
c82d9dcbc1
compat: bring back unicode literals
2019-12-05 23:18:44 -06:00
Mr. Outis
7e8bdbd603
remove pathlib / fspath changes related to the patch
2019-12-05 19:52:03 -06:00
Mr. Outis
71ead3f62e
analytics: use a tempfile for inter-process communication
2019-12-04 19:47:06 -06:00
Mr. Outis
ede010384b
py2: use convert_to_unicode instead of str
2019-12-04 19:31:34 -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
2c8e1495b8
analytics: use fspath instead of str
2019-12-02 21:27:31 -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
656f986542
💅 correct wording "disenabled" -> "disabled"
2019-11-28 17:47:14 -06:00
Mr. Outis
e69fffa7c7
py2 compat issues 🤷
2019-11-27 18:39:01 -06:00
Mr. Outis
e9d56a969e
💅 sort imports
2019-11-26 19:39:31 -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
48b4cbad45
💅 change naming and docstring
2019-11-26 18:32:39 -06:00
Mr. Outis
467b110929
py2: FileNotFoundError -> IOError
2019-11-26 18:32:02 -06:00
Mr. Outis
5261ed7148
tests: analytics.find_or_create_user_id
2019-11-26 13:40:11 -06:00
Mr. Outis
d958870edf
analytics: exit_code -> return_code
...
shout-out to @efiop for the suggestion
2019-11-26 10:45:21 -06:00
Mr. Outis
610d1ee28e
analytics: go back to daemon implementation
...
Lack of a better way to spawn a detached process on both windows an linux
2019-11-25 22:30:16 -06:00
Mr. Outis
5cb437b5ef
analytics: move to single file
...
shout-out to @Suor
2019-11-25 22:30:05 -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
Ruslan Kuprieiev
95fe1578bb
dvc: automatically reorder imports
2019-11-05 02:34:40 +02:00
Casper da Costa-Luis
1e01ce3ac9
isatty ( #2550 )
...
* suppress Tqdm when isatty
- fixes #2549
* fix tests
* unconditionally disable Tqdm if not isatty
- fixes https://github.com/iterative/dvc/pull/2550#discussion_r329386950
* add TQDM_DISABLE env var
- update tests
- add documentation
* TQDM_DISABLE => TQDM_ISATTY
* tests: mock.patch sys.stderr
* TQDM_ISATTY => DVC_ISATTY
as per https://github.com/iterative/dvc/pull/2550#discussion_r334565120
* dvc.progress.Tqdm file kwarg
- fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335706955
* dynamic env DVC_ISATTY
- fixes
https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811454
* DVC_ISATTY in tests
- fixes https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811099
* re-add and abstract `env2bool` to `dvc.utils`
- partially reverts commit 524a0df188f566fb3e103f6965f1b6ac9c530886
- fixes
https://github.com/iterative/dvc/pull/2550/files/ad1f245107c405697c4b61fe58a92fc0265c6588#r335811639
* env2bool tidy
* rename DVC_ISATTY => DVC_IGNORE_ISATTY
- fixes https://github.com/iterative/dvc/pull/2550#discussion_r335947382
2019-10-20 00:54:06 +03:00
Alexander Schepanovski
1bdaca0d6c
dvc: switch to flufl lock
...
This locks employs hardlink trick, which works on NFS and alike unlike
fcntl/open locks.
Closes #1918 .
2019-09-06 16:29:09 +07:00
mindsbackyard
5976b5e466
disable analytics warning message on init if disabled globally/system… ( #2268 )
...
* disable analytics warning message on init if disabled globally/system-wide
* rename Analytics._is_enabled
Analytics.is_enabled
* refactor trying reduce cognitive complexity metric
* fix missing imports
* fix mistaken reference of self
2019-07-14 23:29:30 +03:00
Ruslan Kuprieiev
49f87a5bff
use ValueError instead of JSONDecodeError
...
JSONDecodeError is only available in never python 3 versions and still
inherits from ValueError, so we could just use it.
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-04-24 05:09:48 +03:00
Mr. Outis
85cd344152
logger: Use a more _pythonic_ logging
...
- Uses a formatter for coloring output
- Move the `progress_aware` decorator logic to the logger itself
- Refactor modules so each one uses their own instance of a logger
Close #1753
2019-04-06 18:19:32 -06:00
Mr. Outis
b4d0d37ac8
dvc: refactor package versioning logic
...
- Use `version.py` to compute a dynamic version stored in `__version__`.
Version information was scattered across the source code
(`VERSION_BASE`, `VERSION`, `__version__`, and `version.py`).
- Read `__version__` from `setup.py` and **pin** it using custom
`build_py` command class.
This way, we can maintain consistancy between the build version
and the runtime one.
Also, this gives us the ability to run `setup.py` without depending on
on `dvc` itself.
Close #1824
2019-04-06 18:06:11 -06:00
Andrew Grigorev
e0bf7314a0
tests: fix for globally disabled analytics
2019-03-28 14:54:04 +03:00
Ruslan Kuprieiev
ba8d83e9b1
dvc: refactor dvc project class
...
1) split Project's methods into separate files;
2) rename Project into Repo(similar to gitpython's Repo)
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-02-13 03:31:23 +02:00
Ruslan Kuprieiev
4896f08ddf
dvc: comply with both flake8 and black
...
flake8 provides some additional features like unused vars check, etc, so
it makes total sense to use it as well.
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-02-04 00:10:36 +02:00
Ruslan Kuprieiev
4069e34130
dvc: use black instead of flake8
...
Fixes #1546
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-01-30 03:48:36 +02:00
Mr. Outis
0d46921ec7
py2: add unicode literals
...
Fix #1512
2019-01-27 20:40:21 -06:00
Ruslan Kuprieiev
6fec8b16cd
RFC: conform to pylint
...
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2019-01-16 14:12:19 +02:00
Mr. Outis
4c420d5f4d
logger [rfc]: Use a module instead of a class
...
- Remove deprecation warnings
- Format error output and remove duplicated info
Close #1086
2018-12-23 21:06:39 -06:00
Ivan Shcheklein
8e73b97374
add an analytics notice on dvc init
2018-12-21 18:13:50 -08:00
Ivan Shcheklein
f3171e1d47
make updater and analytics URLs human readable
2018-12-20 17:09:53 -08:00
Ruslan Kuprieiev
e02a33f934
logger: shortcut logger in quiet and normal modes
...
In scenarios with millions of files, late shorcutting of
debug msgs results in massive overhead. In order to avoid
that, just shortcut logger messages ASAP if verbose mode
is not enabled.
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-12-11 12:07:28 +02:00
Ruslan Kuprieiev
f04ae2f74f
dvc: optimize imports
...
Fixes #903
Signed-off-by: Ruslan Kuprieiev <[email protected] >
2018-12-02 04:54:41 +02:00
Ruslan Kuprieiev
5a16095ead
analytics: decrease timeout
2018-12-02 02:58:54 +02:00