Skip to content

Add setup-conda action #46611

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
merged 11 commits into from
Jun 3, 2022
Merged

Add setup-conda action #46611

merged 11 commits into from
Jun 3, 2022

Conversation

jonashaag
Copy link
Contributor

@jonashaag jonashaag commented Apr 2, 2022

Smaller version of #46493 according to suggestion in #46493 (comment). Should be orthogonal to #46538.

@@ -0,0 +1,31 @@
name: Set up pandas
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This action will eventually supersede the setup action

@jonashaag
Copy link
Contributor Author

cc @lithomas1 because you were worried about GHA capacity. I think this is fine now because of #46600.

@mroeschke mroeschke added the CI Continuous Integration label Apr 3, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

One comment otherwise looks good!

@jreback jreback added this to the 1.5 milestone Apr 4, 2022
@jreback
Copy link
Contributor

jreback commented Apr 4, 2022

looks ok. are we backporting these @mroeschke ?

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Added some comments, but this is too big too be merged in my opinion. The CI is quite tricky, if we break things we can end up having errors that aren't caught in the CI (it happened several times in the past). Also, if things go wrong, we should be able to revert the windows or the mac changes, without having to also revert the others.

So, better go step by step. I'd start by adding the actions, when we're happy we add one of the builds (for mac or for windows), still keeping the one in azure for few days, until we're confident the new one is working fine, and catches the errors. And, then we open a new PR to remove the old one. Merging a PR this big can easily get us in trouble.

shell: bash -el {0}

- name: Build Version
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
Copy link
Member

Choose a reason for hiding this comment

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

Why to execute the show_versions() from /tmp and not the current directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idk it's copied from other CI code

Copy link
Member

Choose a reason for hiding this comment

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

I think it's save to remove the pushd and popd stuff.

Build Version seems a bit confusing, Show dependency versions or similar seems to be more descriptive of what this is doing.

@mroeschke
Copy link
Member

we should be able to revert the windows or the mac changes

This is a fair point. Might be good to just do macOS in 1 PR and Windows in another PR. Having them in separate workflows might be a good idea too since the paths and setup might differ a bit

Would probably need backporting when ready.

@jonashaag jonashaag mentioned this pull request Apr 5, 2022
6 tasks
@jonashaag
Copy link
Contributor Author

Added back Azure CI and enabled Windows only. I left the workflow name identical for now

@jonashaag jonashaag changed the title Move macOS and Windows CI from Azure to GHA Add Windows GHA build Apr 5, 2022
@jonashaag
Copy link
Contributor Author

Can some please re-run the failed jobs?

@datapythonista
Copy link
Member

Can some please re-run the failed jobs?

The easiest is usually to close and reopen the PR, and everything should re-run. Let me know of that doesn't work.

@jonashaag jonashaag closed this Apr 5, 2022
@jonashaag jonashaag reopened this Apr 5, 2022
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
time python setup.py build_ext -v -j $N_JOBS
pip install -v -e . --no-build-isolation --no-use-pep517 --no-index
shell: bash -el {0}
Copy link
Member

Choose a reason for hiding this comment

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

How is this shell different to the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • It is a login shell (important for Conda to work)
  • It fails if one of the commands fails, rather than just continuing.

shell: bash -el {0}
env:
# Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873
N_JOBS: ${{ runner.os == 'Windows' && 1 || 3 }}
Copy link
Member

Choose a reason for hiding this comment

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

Why 3 jobs if not windows? My understanding is that GItHub runners have 2 cores.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

macOS has 3, can change that back to 2 and change to 3 in a follow-up PR where we add macOS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or we could just hardcode Windows 1, Linux 2, macOS 3 here?

shell: bash -el {0}

- name: Build Version
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
Copy link
Member

Choose a reason for hiding this comment

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

I think it's save to remove the pushd and popd stuff.

Build Version seems a bit confusing, Show dependency versions or similar seems to be more descriptive of what this is doing.

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label May 6, 2022
@jonashaag jonashaag changed the title Add Windows GHA build Add run-tests and setup-pandas actions May 22, 2022
@jonashaag
Copy link
Contributor Author

Merged with main and reduced number of changes in this PR. It now mainly adds new actions that can be used by the other workflows in subsequent PRs, to deduplicate workflow code.

@mroeschke
Copy link
Member

mroeschke commented May 27, 2022

Would it be possible to do setup-pandas in this PR and run-tests in another PR? It would help isolate the change and make it easier for review.

Also, for setup-pandas it would be nice to get rid of the setup-env.sh script since I think only the docbuild script uses that file.

@jonashaag jonashaag changed the title Add run-tests and setup-pandas actions Add setup-pandas action May 27, 2022
@jonashaag
Copy link
Contributor Author

Also, for setup-pandas it would be nice to get rid of the setup-env.sh script since I think only the docbuild script uses that file.

And CircleCI. Shall I move docbuild to setup-pandas in this PR or in another PR?

@mroeschke
Copy link
Member

mroeschke commented May 27, 2022

Also, for setup-pandas it would be nice to get rid of the setup-env.sh script since I think only the docbuild script uses that file.

And CircleCI. Shall I move docbuild to setup-pandas in this PR or in another PR?

I think it would be okay to do it in this PR

@jonashaag
Copy link
Contributor Author

Moved setup_env to CircleCI folder and change docbuild to use new action. Let's see if this works.

@jonashaag jonashaag changed the title Add setup-pandas action Add setup-co da action May 29, 2022
@jonashaag jonashaag changed the title Add setup-co da action Add setup-conda action May 29, 2022
@jreback jreback removed the Stale label May 29, 2022
@jonashaag jonashaag requested a review from mroeschke May 31, 2022 07:30
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Awesome, great cleanup. LGTM

@mroeschke mroeschke merged commit b1b788f into pandas-dev:main Jun 3, 2022
@mroeschke
Copy link
Member

Awesome, thanks for the simplifying and the cleanup @jonashaag

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* Add run-tests and setup-pandas actions

* Undo run-tests

* Use setup-pandas in docbuild

* Update docbuild-and-upload.yml

* Update macos-windows.yml

* Update docbuild-and-upload.yml

* Update action.yml

* Create action.yml

* Delete .github/actions/setup-pandas directory

* Review feedback

* Update .github/workflows/macos-windows.yml

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: use conda incubator in doc build
4 participants