8000 JSON-format activation by necaris · Pull Request #8727 · conda/conda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JSON-format activation #8727

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

Merged

Conversation

necaris
Copy link
Contributor
@necaris necaris commented May 27, 2019

This is to serve the use-case of tools (e.g. editors) that want to know about conda environments, and potentially even activate them for the user. Rather than attempt to parse a shell script, why not simply provide the necessary values directly in a machine-readable format?

@necaris necaris requested a review from a team as a code owner May 27, 2019 21:30
@jlstevens
Copy link

@kalefranz Just a heads up to say this is the feature I discussed with you a while back. I believe this is one of the ideas you suggested and I definitely support this PR!

@msarahan
Copy link
Contributor

This is very cool. We have really needed this for a long time. I'm going to spend some proper time reviewing this after I get the 4.7.1 release out. Thanks @necaris !

@necaris
Copy link
Contributor Author
necaris commented May 28, 2019

@jlstevens thanks for the ping about it!

@msarahan y'all are very welcome! I'm looking forward to being able to use this functionality in my own editor integration ;-) By the way, I'm not wedded to any of the design decisions made in this PR so happy to change things up as you get time to review & comment.

@msarahan
Copy link
Contributor

@necaris mind revisiting this? I think rebasing on master is a good start. 4.7.x is maintenance now, and this will be in the next feature release, 4.8.

@necaris
Copy link
Contributor Author
necaris commented Sep 12, 2019

@msarahan yep, I'll have a look at it shortly!

@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from bcc2ee7 to bd23d63 Compare September 13, 2019 01:44
@cla-bot cla-bot bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 13, 2019
@necaris
Copy link
Contributor Author
necaris commented Sep 13, 2019

@msarahan could use a hand getting tests to pass -- I'm seeing a number of errors in the conda-build tests. The others all pass, and I'm not able to replicate the failures locally either.

@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from bd23d63 to e4ddf47 Compare October 27, 2019 19:11
@necaris
Copy link
Contributor Author
necaris commented Oct 27, 2019

@msarahan rebased this just now but still seeing test failures -- not sure what's causing them, could still use a hand figuring it out.

@necaris
Copy link
Contributor Author
necaris commented Jan 23, 2020

@msarahan is this still of interest?

@kalefranz
Copy link
Contributor

Hey Rami, I'm moving back over from the enterprise side back to Conda for a while. Just starting as of yesterday, so need some time to ramp back up. Yes, this is still of interest.

@necaris
Copy link
Contributor Author
necaris commented Jan 23, 2020

@kalefranz thanks! I'll rebase it against current master then, but will probably need a hand 8000 figuring out why some tests have continued to fail on CI (including code paths that I never touched 😉 )

@kalefranz
Copy link
Contributor

Yeah I'm starting to dig into the tests now actually

@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from e4ddf47 to 5c4be6f Compare February 3, 2020 03:36
@kalefranz kalefranz modified the milestones: 4.8.0, 4.8.4 Apr 27, 2020
@kalefranz kalefranz added the plugins::run pertains to conda-run label Apr 27, 2020
@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from 5c4be6f to d1de3ed Compare May 24, 2020 20:07
@necaris
Copy link
Contributor Author
necaris commented May 24, 2020

@kalefranz don't know if this is still on your radar, but I've just rebased it against current master, FYI, so it should be up to date.

@mcg1969
Copy link
Contributor
mcg1969 commented Jun 23, 2020

Hey @necaris, I'm taking a fresh look at this

@necaris
Copy link
Contributor Author
necaris commented Jun 23, 2020

@mcg1969 thanks! I could never quite figure out what was causing the test failures -- would love a hand getting this across the line.

Copy link
Contributor
@mcg1969 mcg1969 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know several folks would like to see this merged, and it looks good to me. Will dig and see what tests need to be fixed

@mcg1969
Copy link
Contributor
mcg1969 commented Jun 30, 2020

@kalefranz @chenghlee The test failures are all centered around failure to connect to the CodeCov service. Can we please work around those? The functional tests look good

@necaris
Copy link
Contributor Author
necaris commented Jul 9, 2020

In the interest of keeping the blockers off the critical path for this I've reverted the restructuring in aef6861 -- I'll bring it back once I've had more of a chance to test things locally.

@necaris
Copy link
Contributor Author
necaris commented Jul 9, 2020

Note that from what I can see, the AppVeyor tests are failing because dev-init.bat fails with an "Invalid code page" -- I am assuming that this is completely unrelated to this PR. Similarly, the Python 3.7 and 2.7 tests on CircleCI continue to fail with a Codecov error -- all the tests themselves pass.

necaris added 7 commits July 9, 2020 07:54
Basically a copy of the XonshActivator tests, something to start from
This way activators for various shells can exist, but output things
in JSON format!
@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from aef6861 to c0894ee Compare July 9, 2020 11:54
@necaris
Copy link
Contributor Author
necaris commented Jul 9, 2020

I've brought back the restructured dynamic activator class in c0894ee with a helper function, and correctly updated tests which were missing before. For good measure I've also rebased against upstream master.

@necaris necaris requested a review from mcg1969 July 9, 2020 12:00
@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch 2 times, most recently from 80c220c to 90a0772 Compare July 9, 2020 13:03
necaris added 2 commits July 9, 2020 10:00
This adds a separate formatters map to allow JSON-format output to
be dynamically mixed in to whichever base activator is used. With this,
passing `shell.posix+json` to `conda` will get the PosixActivator base
class as well as the `JSONFormatMixin`.
...none of which I had anything to do with, but that's rebasing for you.
@necaris necaris force-pushed the feature/json-activator-for-tools-not-shells branch from 90a0772 to 7e5191d Compare July 9, 2020 14:00
@necaris
Copy link
Contributor Author
necaris commented Jul 9, 2020

Looks like the codecov issued is fixed -- thanks! The only thing that's not passing is AppVeyor, for the same reason as noted above: not IMHO related to this PR at all.

@mcg1969
Copy link
Contributor
mcg1969 commented Jul 13, 2020

This is great. We're getting very close. Will see if I can merge without AppVeyor passage, but I don't want to step on any toes on the team.

@mcg1969
Copy link
Contributor
mcg1969 commented Jul 13, 2020

OK, I know the problem we're seeing in CI

@mcg1969
Copy link
Contributor
mcg1969 commented Jul 15, 2020

boom! thanks folks

@mcg1969 mcg1969 closed this Jul 15, 2020
@mcg1969 mcg1969 reopened this Jul 15, 2020
@mcg1969 mcg1969 merged commit 45ad4a4 into conda:master Jul 15, 2020
@necaris
Copy link
Contributor Author
necaris commented Jul 15, 2020

Awesome! Thanks so much @mcg1969! And thanks to @int19h !

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This pull request has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue or pull request if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity plugins::run pertains to conda-run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0