Skip to content

make dependabot updates work - #6760

Merged
skshetry merged 1 commit into
treeverse:masterfrom
skshetry:make-dependabot-work
Oct 8, 2021
Merged

make dependabot updates work#6760
skshetry merged 1 commit into
treeverse:masterfrom
skshetry:make-dependabot-work

Conversation

@skshetry

@skshetry skshetry commented Oct 8, 2021

Copy link
Copy Markdown
Collaborator

Dependabot was throwing Illformed requirements "< '3.10'" for the
hdfs. But I noticed that it did accept other requirements where we
do similar. So it seems the indentation fixes it.

Even then, dependabot did not update any dependencies. I removed
setup.py file, after which immediately it started creating PRs.
So, I reckoned that it must have been due to some mechanism
in place from dependabot to disallow execution, so I tried to
remove few blocks of code from setup.py. And, I was eventually
able to figure out that it was from the block where we import version.

So, I added a try-except block and it magically worked again. :)

Dependabot was throwing Illformed requirements `"< '3.10'"` for the
hdfs. But I noticed that it did accept other requirements where we
do similar. So it seems the indentation fixes it.

Even then, dependabot did not update any dependencies. I removed
setup.py file, after which immediately it started creating PRs.
So, I recknoed that it must have been due to some mechanism
in place from dependabot to disallow execution, so I tried to
remove few blocks of code from setup.py. And, I was eventually
able to figure out that it was from the block where we import version.

So, I added a try-except block and it magically again worked. :)

Let's see how it goes.
@skshetry
skshetry requested review from efiop and isidentical October 8, 2021 03:24
@skshetry
skshetry requested a review from a team as a code owner October 8, 2021 03:24
Comment thread setup.py
Comment on lines +21 to +26
pkg_dir = os.path.dirname(os.path.abspath(__file__))
version_path = os.path.join(pkg_dir, "dvc", "version.py")
spec = importlib.util.spec_from_file_location("dvc.version", version_path)
dvc_version = importlib.util.module_from_spec(spec)
spec.loader.exec_module(dvc_version)
version = dvc_version.__version__ # noqa: F821

@skshetry skshetry Oct 8, 2021

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer getting rid of the version altogether and just use the version that we set in _BASE_VERSION, as it makes setup.py more static here (all of the code here is just to get version).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'd also say that _BASE_VERSION should be defined here (or even in setup.cfg to be completely declarative) and in dvc/version.py we can retrieve it from the package metadata.

@skshetry
skshetry merged commit 7c437cc into treeverse:master Oct 8, 2021
@skshetry
skshetry deleted the make-dependabot-work branch October 8, 2021 09:01
skshetry added a commit to endremborza/dvc that referenced this pull request Oct 8, 2021
* master: (47 commits)
  make dependabot updates work (treeverse#6760)
  move defaults to the class level (treeverse#6762)
  build(deps): Bump dvclive from 0.3.0 to 0.4.0 (treeverse#6753)
  move requirements to setup.cfg (treeverse#6758)
  gha: cancel previous workflows (treeverse#6756)
  pyinstaller: hooks: remove webhdfs
  webhdfs: migrate to fsspec (treeverse#6662)
  gha: benchmarks: fix pytest flags (treeverse#6749)
  hdfs: migrate to fsspec (treeverse#6604)
  Pin dvclive to 0.3.0
  command: Should not consume 'print' to output default remote info (treeverse#6650)
  command: output prettify json in tty (treeverse#6743)
  gha: run benchmarks on PRs (treeverse#6733)
  Run on Python3.10 (treeverse#6745)
  Fix dvclive running subdir (treeverse#6740)
  exp init: only ask for that are not provided in an interactive mode (treeverse#6739)
  move exp init logic to dvc.repo.experiments.init (treeverse#6738)
  build(deps): Bump jaraco-windows from 5.6.0 to 5.7.0 (treeverse#6735)
  build(deps): Bump pytest-cov from 2.12.1 to 3.0.0 (treeverse#6736)
  Bump typing_extensions to >=3.7.4 (treeverse#6731) (treeverse#6732)
  ...
@efiop efiop added maintenance skip-changelog Skips changelog labels Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skips changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants