awsrun icon indicating copy to clipboard operation
awsrun copied to clipboard

azurerun too?

Open kcburge opened this issue 2 years ago • 1 comments

While it may be handy to have azurerun mixed in with awsrun, not everyone that uses aws also uses azure. So, building in a private environment, I have to pull in all the azure dependencies down as well, when I have no need for them. Perhaps this should be broken up into multiple packages with the proper dependencies for awsrun vs. azurerun? Just a thought.

kcburge avatar May 18 '22 00:05 kcburge

Yes, good idea. The main code is entirely CSP-independent with the exception of the CSP-specific plug-ins and commands, which are loaded based on the name of the installed script. The actual two scripts, awsrun and azurerun, are identical in every way. I just need to think of the best way of separating them.

pkazmier avatar May 19 '22 18:05 pkazmier

As part of swapping over to pyproject.toml for the project, I broke out the dependencies by CSP, so you can now install only AWS dependencies. For example, you can do the following now pip install ".[aws]". And, once I publish a new release to pypi, pip install "awsrun[aws]".

pkazmier avatar Feb 17 '23 17:02 pkazmier

I'm also going to break out all of the dependencies required by each bundled command separately so they aren't installed by default in the spirit of keeping the required reps to a minimum. I'll add an optional section for a command's deps, and then an "allcmds" dep that will include all of them. So, for example, if you want to use the "last" command bundled with awsrun, you'd need to install awsrun as follows:

$ pip install awsrun[last]

Since not all of the bundled commands have extra deps, to make it easy for the user, I'll add a check when they attempt to use a bundled command to make sure there are no missing imports. If there are, a nice message stating they need to install the optional deps (as above).

I'll work on that over the next day or so, then will release a new version bumping the MAJOR version to 3. While nothing in the API, the packaging is not backwards compatible, so it likely warrants the bump.

pkazmier avatar Mar 23 '23 15:03 pkazmier

Version 3.0.0 has been released which breaks out all dependencies into optional ones.

pkazmier avatar Mar 25 '23 13:03 pkazmier