Skip to content

remove redundant commands from Makefile#170

Merged
csernazs merged 5 commits into
csernazs:masterfrom
beliaev-maksim:clean_make
Sep 3, 2022
Merged

remove redundant commands from Makefile#170
csernazs merged 5 commits into
csernazs:masterfrom
beliaev-maksim:clean_make

Conversation

@beliaev-maksim
Copy link
Copy Markdown
Contributor

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 3, 2022

Codecov Report

Merging #170 (a91278b) into master (aa7f175) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #170   +/-   ##
=======================================
  Coverage   94.87%   94.87%           
=======================================
  Files           4        4           
  Lines         546      546           
=======================================
  Hits          518      518           
  Misses         28       28           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@csernazs
Copy link
Copy Markdown
Owner

csernazs commented Sep 3, 2022

The purpose of .venv/.st-venv-completed file is to ensure that no further installs will be run once the venv is completed. This is to avoid running poetry every time when the developer runs a target which requires the venv, assuming that there are no changes in poetry.lock or pyproject.toml (if these are changed, the clean target can be used to remove the .venv - we can introduce a new target to remove the stamp file only if that's an issue).

While your PR simplifies the Makefile, this also ignores the presence of this stamp file and I would like to keep it to avoid extra poetry runs.

@beliaev-maksim
Copy link
Copy Markdown
Contributor Author

@csernazs
are you sure that such behavior cannot lead to some potential issues with not updated environment?
since it is not trivial that you need to run make clean

for me poetry run takes less than a second, because all deps are already installed

@csernazs
Copy link
Copy Markdown
Owner

csernazs commented Sep 3, 2022

for this issue, we could specify poetry.lock and pyprojecct.toml to makefile, like this:
.venv/.st-venv-completed: poetry.lock pyproject.toml

So it would compare the mtimes of it, and run poetry if the lock file or the toml file are newer than the stamp file.s are updated).

What do you think about this?

@beliaev-maksim
Copy link
Copy Markdown
Contributor Author

@csernazs
that would make more sense to me!
I am going to close this PR then.

@beliaev-maksim beliaev-maksim reopened this Sep 3, 2022
@csernazs csernazs merged commit 22affa4 into csernazs:master Sep 3, 2022
@beliaev-maksim beliaev-maksim deleted the clean_make branch September 3, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants