Commit Graph
7561 Commits
Author SHA1 Message Date
Ruslan Kuprieiev a3d6b1299a brancher: use scm.root_dir to determine relative cwd
Fixes #7776
2022-06-06 12:42:22 +03:00
Paweł Redzyński 20c7b0e3e6 plots: grouping: stop using dpath.util.search 2022-06-03 16:48:33 +03:00
huang06 6794dd28f7 docs: update package installation 2022-06-02 17:46:14 +08:00
Peter Rowlands 1cc803d12b exp: output troubleshooting link on shallow merge failure 2022-06-02 01:15:16 -07:00
Ruslan Kuprieiev 2b6aa01392 setup: bump scmrepo to 0.0.24
Fixes #7824
2022-06-01 20:51:08 +03:00
Daniele Trifirò 906c87fdef tests: replace unecessary map() call in test_live
caught by flake8
2022-06-01 20:41:14 +03:00
Daniele Trifirò 52f02d238d bump scmrepo to 0.0.23
`scmrepo==0.0.23` includes proper support for windows file:// URLs
(https://github.com/iterative/scmrepo/pull/68), so Windows tests
relying on file URLs had to be fixed in order to be valid
[RFC 8089](https://datatracker.ietf.org/doc/html/rfc8089) URLs.
2022-06-01 09:20:07 +05:45
David de la Iglesia Castro 3d791778de plots: Pass templates_dir to match_renderers.
We were forgetting to pass default template dir.

Fixes #7817.
2022-05-31 16:17:58 +02:00
Saugat Pachhai (सौगात) 1e77be3ae3 testing: use shutil.copytree with dirs_exist_ok
See https://docs.python.org/3/library/shutil.html#shutil.copytree.
There is dirs_exist_ok kwarg in Python >3.8.
2022-05-30 20:40:31 +05:45
Ruslan Kuprieiev 844f77b4f9 dvc: drop python 3.7
Also upgraded with `pyupgrade --py38-plus`

Fixes #7708
2022-05-30 16:51:35 +03:00
David de la Iglesia Castro 34ef1807be exp: show: Include additional info in --json.
Use relpath to repo.root_dir as keys in deps and outs.
Add `use_cache` and `is_data_source` for outs.

This allows to differentiate git-tracked dependencies and
intermediate outputs.

Closes #7575
Closes #7790
2022-05-25 09:01:39 +02:00
Dave Berenbaum dae0000bcd exp list: fix git_remote metavar 2022-05-24 18:47:26 -07:00
David de la Iglesia Castro 109d0e4e28 dag: mermaid: Use quotation marks to escape node name.
Fixes #7731
2022-05-24 18:27:58 +02:00
Saugat Pachhai (सौगात) 68b0d61c9e tests: move run cache test to test_remote 2022-05-24 10:16:37 +05:45
Saugat Pachhai (सौगात) 942a080567 dvc.stage.cache: fix typo, was using src filesystem to transfer
This was working for LocalFileSystem as they work for any directories/path.
It's hard to test this these days, as we don't have remote tests inside
dvc, so it was not caught.

Potentially fixes #7718.
2022-05-23 16:37:40 +03:00
Saugat Pachhai (सौगात) 60cbcec399 formatting: consider dvc-render as a known first party for ordering imports 2022-05-23 15:49:47 +05:45
Saugat Pachhai (सौगात) 0c5a18513c fix linter issue 2022-05-23 14:12:54 +05:45
Alexander Schepanovski b5c28dd9f9 Catch correct exception class in params.show() 2022-05-23 00:34:34 -07:00
dependabot[bot] 84439e6a04 build(deps): Bump dvc-data from 0.0.1 to 0.0.2
Bumps [dvc-data](https://github.com/iterative/dvc-data) from 0.0.1 to 0.0.2.
- [Release notes](https://github.com/iterative/dvc-data/releases)
- [Commits](https://github.com/iterative/dvc-data/compare/0.0.1...0.0.2)

---
updated-dependencies:
- dependency-name: dvc-data
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-05-21 20:46:41 +05:45
Saugat Pachhai (सौगात) 75fa487406 dvc: remove unused utils and redundant tests
The tests should be in dvc-objects repo npw, and will be migrated soon.
The nanotime and diskcache are specified in dvc-objects, so we don't need
those here.
2022-05-20 19:17:00 +05:45
Saugat Pachhai (सौगात) 0ecd47b333 deps: remove jaraco.windows dependency
This is used by dvc-objects, and it has the dependency declared.
2022-05-20 15:18:13 +05:45
Saugat Pachhai (सौगात) 9710cafd38 deps: add dvc-objects dependency 2022-05-20 15:13:50 +05:45
Saugat Pachhai (सौगात) e34767ca90 logging: show logs from dvc-data 2022-05-20 15:13:50 +05:45
Saugat Pachhai (सौगात) 9a2feaa4ed dvc: remove dvc.data, fix imports 2022-05-20 15:13:50 +05:45
Saugat Pachhai (सौगात) 7bc98e3fb3 tests: remove objects related tests 2022-05-20 14:02:08 +05:45
Saugat Pachhai (सौगात) 5e561c1dfd deps: add dvc-objects as a dependency 2022-05-20 14:02:08 +05:45
Saugat Pachhai (सौगात) 572b6dfca9 logging: show logs from dvc-objects 2022-05-20 14:02:08 +05:45
Saugat Pachhai (सौगात) 37921d618d dvc: remove dvc.objects, fix imports 2022-05-20 14:02:08 +05:45
Saugat Pachhai (सौगात) 95c6cea36d tests: restructure some tests for objects/data 2022-05-19 18:38:21 +05:45
Saugat Pachhai (सौगात) 455260b29c data/objects: reduce log levels in dvc-objects and dvc-data
Also introduces a `validate_status` kwarg in `data.transfer`,
which is used in dvc to log for missing version info.
2022-05-19 18:33:39 +05:45
Saugat Pachhai (सौगात) 82dc67d890 objects: use separate Tqdm implementations
Now dvc.objects and dvc.data uses the implementation from dvc.objects
for Tqdm progress bars. This is temporary. :)
2022-05-19 18:07:47 +05:45
Saugat Pachhai (सौगात) 2057c471bb data.checkout: remove dependency on DVC; prompts and DvcException 2022-05-19 15:11:27 +03:00
Saugat Pachhai (सौगात) f23d31af64 fs/data: move repo related utils to dvc
This moves get_fs_config/get_fs_cloud and ODBManager to DVC
as they require DVC related utilities, and we don't need them
strictly in dvc-objects/dvc-data.
This also adds support to ReferenceHashFile to load from
any filesystem, using it's module name and filename.
Now we can get rid of DVCFileSystem dependency in
ReferenceHashFile.
This is a temporary solution, we really need a registry.
(I am not quite sure if this works in pyinstaller mode,
but I think it should, it's how fsspec does it if I understand
correctly.)
2022-05-18 19:39:09 +03:00
Saugat Pachhai (सौगात) cf5d3830c5 dvc.objects: use own internal error instead of DvcException
transfer raises internal TransferError, merge raises internal MergeError
and local ODB raises ODBError on unprotect.
transfer's error is reraised to FileTransferError back in DataCloud.
2022-05-18 12:22:57 +03:00
Saugat Pachhai (सौगात) 32cd6c2c03 dvc.objects: use stub ignore in dvc.objects/dvc.data
This commit:
* defines a `Ignore` protocol in `dvc.objects`, that expects a `find` method.
  This will be used in dvc-data and dvc-objects instead of depending on dvc.ignore.
  dvcignore is expected to respect this protocol, which it does.
* renames `dvcignore` kwarg to `ignore` in `dvc-data` and `dvc-objects`.
* teaches dvc.cli that `IgnoreInCollectedError` is a known exception
   and is logged correctly and adds a test for the behaviour.

I am not happy that we need to hardcode `.dvcignore` in dvc-data
but I don't see any easy way, since we always try to avoid
staging if the tree contains .dvcignore file, even if .dvcignore
is not passed.
2022-05-18 12:22:28 +03:00
Saugat Pachhai (सौगात) 54917e3255 dvc.objects: fix typing imports 2022-05-18 11:49:45 +05:45
dependabot[bot] e8a439df8d build(deps): Bump pyinstaller from 5.0 to 5.1
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.0 to 5.1.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.0...v5.1)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-05-17 20:15:17 -07:00
Ruslan Kuprieiev 71a4b4823a fs: path: don't overuse parts
These days we have `self.flavour` that is more efficient and more simple.
2022-05-17 22:29:34 +03:00
Ruslan Kuprieiev 01cc97f38a fs: path: use flavour.basename 2022-05-17 20:21:46 +03:00
Saugat Pachhai (सौगात) 3872f79dad objects.fs: do not use format_link, DvcException and fix_env from DVC
* Introduce ConfigError and AuthError in dvc.objects.fs and raise it
  instead of dvc.config.ConfigError.
* Provide hints and links by catching those errors in dvc.cli.main,
  i.e decouple UI messages from filesystems for AuthError and
  ConfigError.
* Copy flatten/unflatten utils to dvc.objects.fs.utils.
2022-05-17 18:23:29 +03:00
Saugat Pachhai (सौगात) 48176b80f6 fs: do not use DvcException in filesystems
* Refactor check_requires, move UI messages to dvc.cli
* Refactor link related error
2022-05-17 16:48:38 +03:00
Saugat Pachhai (सौगात) 8c9a9e9a1f objects.fs: move schemes to objects.fs 2022-05-17 17:02:14 +05:45
Saugat Pachhai (सौगात) 120eb09c4d fs: move GitFileSystem out of dvc.objects.fs
This is more of a DVC thing than objects.
2022-05-17 16:50:33 +05:45
Saugat Pachhai (सौगात) bf7892012d objects.fs: copy executors to dvc.objects 2022-05-17 16:50:21 +05:45
Saugat Pachhai (सौगात) 36605eea4c objects.hash: rename HashedStreamReader to HashStreamFile 2022-05-17 13:25:38 +03:00
Saugat Pachhai (सौगात) 01e5f9eadd objects.hash: use fobj.read instead of read1 2022-05-17 13:25:38 +03:00
Saugat Pachhai (सौगात) 752e10a834 dvc.objects: move HashedStreamReader to objects, use it for calculating fobj_md5
Now HashedStreamReader will be used to calculate md5 in fobj_md5/hash_file.

Also:
* adds in `bytes_md5` that may be useful for testing.
* adds a hasher-registry with hashlib
* adds a `text=` kwarg to be able to specify to use dos2unix or not
  (useful for testing)
* makes `localfs` the default filesystem when `fs` arg is not passed
  (makes it easier to test in the REPL)
2022-05-17 13:25:38 +03:00
Saugat Pachhai (सौगात) 092eda183c objects.fs: use getpass for prompts
Note that this will change the behaviour of DVC to always show
prompt even in --quiet mode, which is what we need.
Previously it'd prompt without any message.
2022-05-17 16:06:27 +05:45
Saugat Pachhai (सौगात) d82e094b13 fs: move filesystems to dvc.objects.fs.implementations 2022-05-16 17:54:57 +03:00
Saugat Pachhai (सौगात) 570e3a5359 dvc.fs: move fs to dvc.objects.fs
Some of the APIs/FileSystems are reimported inside dvc.fs module.
2022-05-16 13:15:19 +03:00