Closed mbalatsko closed 1 year ago
Thank you for your pull request.
Definitely, there should be a way to run builder in offline mode. I think --offline
flag can be combined with --no-smart-version
. Also, --skip-published
flag can be ignored if --no-smart-version
is provided.
So, we can use something like this:
def _get_package_version(self, pypi_name: str, version: str) -> str | None:
if self.disable_smart_version:
return version
pypi_manager = PyPIManager(pypi_name)
if not pypi_manager.has_version(version):
return version
if self.skip_published:
self.logger.info(f"Skipping {pypi_name} {version}, already on PyPI")
return None
return pypi_manager.get_next_version(version)
And CLI args help in cli_parser.py
What do you think?
GitHub reviews are down, unfortunately. I will leave a review ASAP.
I like this idea, it makes great sense and does not complicate api. Let me make changes!
Awesome! Please update your PR once you have time.
LGTM! Thank you for your contribution
Notes
There are use cases, in which some might benefit from building stub packages from source, without making PyPI requests. Currently, any cli options combination allows you to achieve it.
This PR introduces a adjustment of
no-smart-version
option to serve these purposeType of change
Checklist
All of these are optional:
./scripts/before_commit.sh
to follow the style guidelines of this project