Skip to content
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

Add python bindings #4

Closed
wants to merge 6 commits into from
Closed

Conversation

Kwaizer
Copy link
Contributor

@Kwaizer Kwaizer commented Jul 15, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Draft PR to add python bindings by making a multi-output feedstock

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

  • If python is a host requirement, it should be a run requirement.

For recipe:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@Kwaizer Kwaizer marked this pull request as draft July 15, 2024 19:18
@matthewfeickert
Copy link
Member

We should fix the rerender in PR #6 and then rebase this PR to keep things more atomic.

@matthewfeickert matthewfeickert mentioned this pull request Jul 16, 2024
1 task
@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@Kwaizer
Copy link
Contributor Author

Kwaizer commented Jul 16, 2024

Adding - {{ stdlib("c") }} as proposed in documentation results in c_linux-64 does not exist error for some reason

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@chrisburr
Copy link
Member

@conda-forge-admin, please rerender

@matthewfeickert matthewfeickert mentioned this pull request Jul 17, 2024
4 tasks
@matthewfeickert
Copy link
Member

@Kwaizer now that PR #7 is in, can you rebase this PR on main but do so in an interactive rebase that drops all of the MNT: Re-rendered commits as those have already been taken care of? This will make it easier to review what is actually getting changed in this PR.

@Kwaizer Kwaizer force-pushed the add_python_bindings branch from c34f4d8 to 779dce8 Compare July 30, 2024 09:22
@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@matthewfeickert
Copy link
Member

@conda-forge/hepmc2 can you review this when you have time?

Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

Thanks for rebasing @Kwaizer — this will be much easier to review for the maintainer team now. 👍 Going through this looks good, but I didn't follow on some of the added requirements. Can you elaborate a bit?

Can you also bump the build number from

build:
  number: 1

to 2?

recipe/meta.yaml Outdated
@@ -20,6 +20,15 @@ requirements:
- {{ stdlib("c") }}
- cmake
- make
- python
- cython
Copy link
Member

Choose a reason for hiding this comment

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

Can you comment on why cython is needed for the build? That isn't a formal dependency to build normally (c.f. https://github.com/matthewfeickert/hep-simulation-stack/blob/4c91a3ea81891b05fd8f38df78f46fcc824bb71e/docker/Dockerfile#L63-L81).

recipe/meta.yaml Outdated
Comment on lines 27 to 29
- cython
- setuptools
- pip
Copy link
Member

Choose a reason for hiding this comment

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

In addition to cython, why are setuptools and pip needed as host requirements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those dependencies where installed in attempt to fix issues while trying to build multiple-output package and can be removed for now.
I think that switching to packaging another tools or working in parallel on both hepmc2 and LHAPDF (or other tool) will be a good idea as multiple-output package takes way more time than I expected for some reason.

recipe/meta.yaml Outdated
@@ -38,6 +49,8 @@ test:
- ${CXX} example_EventSelection.cc -o example_EventSelection -I${CONDA_PREFIX}/include -L${CONDA_PREFIX}/lib -lHepMC
# example_BuildEventFromScratch
- ${CXX} example_BuildEventFromScratch.cc -o example_BuildEventFromScratch -I${CONDA_PREFIX}/include -L${CONDA_PREFIX}/lib -lHepMC
# temporarily skipping pip check on win and pypy build because of bizarre tqdm issue
Copy link
Member

Choose a reason for hiding this comment

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

Can you post the tqdm issue that you're seeing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry for a confusion. That was a copy-pasted code snippet when I was figuring out how testing works for a package. It have nothing to do with this particular package, I simply forgot to remove it.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@Kwaizer Kwaizer force-pushed the add_python_bindings branch from dacbb97 to b1088cb Compare July 31, 2024 21:47
@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@Kwaizer Kwaizer force-pushed the add_python_bindings branch from b1088cb to e95ac80 Compare July 31, 2024 21:48
@Kwaizer Kwaizer force-pushed the add_python_bindings branch from 6a4a447 to 5f9cc2d Compare July 31, 2024 22:12
Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

So at the moment the build script is building with the defaults

cmake -LAH \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-Dmomentum:STRING=GEV -Dlength:STRING=MM \
../source

and I don't think that includes the Python bindings. What we'll want to do is to try to create a multiple output feedstock like this one @chrisburr shared (https://github.com/conda-forge/brotli-feedstock/blob/1971636849d467a838e84f4a19b027d445e9e59a/recipe/meta.yaml) and then as the hepmc2-python output build with the Python bindings enabled.

I only remember how to do this for HepMC3, so you'll need to look at the HepMC2 GitLab to see how they enable Python bindings there.

@matthewfeickert
Copy link
Member

Given this comment from Andy Buckely (research-software-collaborations/project_database#62 (comment)) we can close this PR.

@matthewfeickert
Copy link
Member

@conda-forge/hepmc2 can you close this PR, as this won't be supported?

@henryiii henryiii closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants