-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 pysirius client to conda-forge #22016
Conversation
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 ( Here's what I've got... For recipes/pysirius:
|
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 ( |
I hereby confirm that I am willing to be listed as a Maintainer |
works locally. Unsure if os.getenv('RECIPE_DIR') points to the correct folder
@conda-forge/staged-recipes ready for review |
@conda-forge/help-python ready for review |
@synapticarbors can you please have a look if the pr is ready to be merged. |
Taking a look now, but CI needs to rerun, since it's been a while. In the meantime, let me know if those suggestions are useful. Just a typo and trying to catch some errors early, but nothing critical. |
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@jaimergp Thanks a lot for taking a look! I have included your suggestions and got the CI to run successfully again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The errors were about the u
in set -euxo pipefail
(unbound variables result in error). You can still do set -ex
if you want to at least have failures error out early, but up to you (it's just usually easier to debug when things go wrong).
That aside, the logs show that you are packaging your tests as test/*.py
, which would result in a top-level package name test
(e.g. import test
), which is going to cause trouble with other packages due to clobbering and other conflicts:
adding 'test/__init__.py'
adding 'test/test_account_credentials.py'
adding 'test/test_account_info.py'
adding 'test/test_annotated_peak.py'
adding 'test/test_annotated_spectrum.py'
adding 'test/test_canopus.py'
adding 'test/test_canopus_predictions.py'
...
Your options are:
- Do not package your tests as a top-level package, but as a subpackage
PySirius.tests
or similar - Exclude
test
inpyproject.toml
orsetup.py
, and package them as part of the conda tests viatest.files
inmeta.yaml
. - Do not package them at all (delete before running
pip install
or exclude frompyproject.toml
orsetup.py
).
recipes/pysirius/meta.yaml
Outdated
- sh run_test.sh # [not win] | ||
- call run_test.bat # [win] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having these scripts named run_test.*
tells conda-build
(counterintuitively) to ignore the test.commands
section. Please rename to something else like test_script.*
or something like that so `pip check does run.
@jaimergp Thanks again! I decided to not package the test files you mentioned at all and also adjusted to your other suggestions. Is there something else you notice that needs changing? |
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@jaimergp Do you reckon the package is ready for merge? I realize the feedstock will not make use of the Windows test per default, but still I would like to keep it in as this allows me to temporarily enable the test during pull requests by setting the corresponding |
recipes/pysirius/meta.yaml
Outdated
- python-dateutil >=2.5.3 | ||
- setuptools >=21.0.0 | ||
- urllib3 >=1.15.1 | ||
- sirius-ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking: you don't need to be specific about sirius-ms
versions here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really at this stage, but I added it for completeness. We probably will want to raise limits for the sirius-ms version in later releases.
Requested changes were addressed.
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 ( Here's what I've got... For recipes/pysirius:
|
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 ( |
@jaimergp ready to merge from my side |
@@ -0,0 +1,57 @@ | |||
{% set version = "0.9" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is version 0.9
, why is pip
reporting:
Successfully installed PySirius-1.0.0
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaimergp This is caused due to swagger generating the code as a "package" with version 1.0.0. It does not matter that it does that, as the conda-forge package is still successfully build as py-sirius-ms 0.9
(see i.e. line 437 in linux_64 "Run docker build"). When generating a new client API in the future, swagger will still call it PySirius-1.0.0, but our package may be py-sirius-ms 1.3
at that point.
TL;DR: we can ignore swaggers versioning and use our own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but anyways, I will adjust it shortly so it matches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this is not a blocker for the merge. You can amend it in-feedstock in the future.
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).