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

Adding torchcam from PyPI #17307

Merged
merged 7 commits into from Dec 23, 2021
Merged

Adding torchcam from PyPI #17307

merged 7 commits into from Dec 23, 2021

Conversation

sugatoray
Copy link
Contributor

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged. NA
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-linter
Copy link

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 (recipes/torchcam) and found it was in an excellent condition.

- inclusion of reqfile
- exclision of tests folder
- comments
- echo out rendered recipe
@sugatoray
Copy link
Contributor Author

sugatoray commented Dec 21, 2021

PR is Ready. Request for review/merging.

cc: @conda-forge/help-python @BastianZim @dopplershift @beckermr

- if [ ! -f {{ reqfile }} ] && [ -f {{ reqsource }} ]; then cp {{ reqsource }} {{ reqfile }}; fi # [not win]
#- copy {{ name }}.egg-info\requires.txt {{ reqfile }} # [win]
- copy {{ reqsource | replace('/', '\\') }} {{ reqfile }} # [win]
## Ensure exclusion of tests folder
Copy link
Member

Choose a reason for hiding this comment

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

The best way to do this is by changing it upstream. Should be fine for now but would be good to have a PR with a permanent fix.

Copy link
Contributor Author

@sugatoray sugatoray Dec 21, 2021

Choose a reason for hiding this comment

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

Changing upstream could take longer and sometimes there's no response. I did this in another PR recently: #17275. The if conditionals will make sure of only creating the requirements.txt file when it is not present.

Copy link
Contributor Author

@sugatoray sugatoray Dec 21, 2021

Choose a reason for hiding this comment

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

I will clean up the recipe afterwards (and remove anything extra). Including the conditionals are temporary measures only (until fixed upstream).

Copy link
Member

Choose a reason for hiding this comment

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

Changing upstream could take longer and sometimes there's no response.

Yes that's why I meant that it's fine for now but a PR would be good nonetheless.

The if conditionals will make sure of only creating the requirements.txt file when it is not present.

It seems like it's currently available so it wouldn't be needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right about that. Just removed the lines for "copying/creating requirements.txt" .

@sugatoray
Copy link
Contributor Author

sugatoray commented Dec 22, 2021

Why is windows build failing?

PyTorch is a dependency of torchcam and PyTorch is not available for windows on conda-forge channel.

- removed redundant scripts
- echo -e "\n>>> ENSURE EXCLUSION OF FOLDER '{{ testsfolder }}' <<<\n\n"
- rm -rf {{ testsfolder }} # [not win]
- rmdir /s /q "{{ testsfolder | replace('/', '\\') }}" # [win]
## Install package {{ name }} from PyPI
Copy link
Member

Choose a reason for hiding this comment

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

You can reduce these 6 lines to just a rm -rf test. No need for the comments b/c the commands are quite descriptive and no need to do that on Windows b/c the recipe is noarch.

Copy link
Contributor Author

@sugatoray sugatoray Dec 23, 2021

Choose a reason for hiding this comment

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

Done. Thank you.

Copy link
Member

Choose a reason for hiding this comment

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

The comments are not really needed and you can remove the selector too. Also, the jinja won't work on a comment. Merging this as these are all minor comments.

@sugatoray
Copy link
Contributor Author

@ocefpaf Did what you suggested. Could this be merged now?

@ocefpaf ocefpaf merged commit 9ad1c50 into conda-forge:main Dec 23, 2021
@sugatoray
Copy link
Contributor Author

Thank you for your review and help in merging the PR.

@BastianZim @ocefpaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants