Closed quartox closed 5 years ago
Maybe call it base_url?
Or if you just wanted internal.url.com
, and not http://internal.url.com
, you could call it tld
or domain
I like base_url
since it can be a url pattern in the case where the user needs to include {channel}
. In my use case I also need to pass http://internal.company.com/artifactory/{channel}-remote
so I think domain
or tld
might be more confusing.
Sounds good to me! Let us know when this is ready fro another review!
Ready for another review. I ended up putting the default in each function/class that gets passed the base_url
but that may have been a misunderstanding of your comment. I never know if I should have the default in each function or only certain ones, happy to change it to whatever you would prefer.
default in each seems preferable.
This LGTM @mariusvniekerk @CJ-Wright any thoughts?
Would like to talk about
url
argument name (I think there is probably a better name) and what testing needs to be done.I realized the use case is more complicated than I first thought. Our mirror follows the pattern
http://internal.url.com/conda-forge-remote
so this PR allowspython app.py --url https://internal.url.com
and then appendschannel
andarch
orpython app.py --url https://internal.url.com/{channel}-remote/
orpython app.py --url https://internal.url.com/{channel}-remote/{arch}
in case the channel and/or arch are embedded in the middle of the url.I have manually proven that this will work on linux using the following:
$ python --url https://internal.url.com/{channel}-remote/
in another terminal
$ conda create --name metachannel-test python=3.7 pandas -c http://127.0.0.1:20124/conda-forge/pandas