Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make dependabot updates work #6760

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Oct 8, 2021

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 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
Copy link
Member Author

@skshetry skshetry Oct 8, 2021

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
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 iterative: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 (iterative#6760)
  move defaults to the class level (iterative#6762)
  build(deps): Bump dvclive from 0.3.0 to 0.4.0 (iterative#6753)
  move requirements to setup.cfg (iterative#6758)
  gha: cancel previous workflows (iterative#6756)
  pyinstaller: hooks: remove webhdfs
  webhdfs: migrate to fsspec (iterative#6662)
  gha: benchmarks: fix pytest flags (iterative#6749)
  hdfs: migrate to fsspec (iterative#6604)
  Pin dvclive to 0.3.0
  command: Should not consume 'print' to output default remote info (iterative#6650)
  command: output prettify json in tty (iterative#6743)
  gha: run benchmarks on PRs (iterative#6733)
  Run on Python3.10 (iterative#6745)
  Fix dvclive running subdir (iterative#6740)
  exp init: only ask for that are not provided in an interactive mode (iterative#6739)
  move exp init logic to dvc.repo.experiments.init (iterative#6738)
  build(deps): Bump jaraco-windows from 5.6.0 to 5.7.0 (iterative#6735)
  build(deps): Bump pytest-cov from 2.12.1 to 3.0.0 (iterative#6736)
  Bump typing_extensions to >=3.7.4 (iterative#6731) (iterative#6732)
  ...
@efiop efiop added the skip-changelog Skips changelog label Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants