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

Prliminary test using wrappers #267

Closed
wants to merge 3 commits into from
Closed

Conversation

vaibhav4595
Copy link

@wkerzendorf I tried just some preliminary tests(for a check). But I was unable to build extensions for the files inside the wrappers directory like the way in which extensions get built for the montecarlo files using montecarlo.pyx and setup_package.py. Though I made a setup_package.py for the wrappers extension as well but this did not have built the extensions when I built tardis again.

@vaibhav4595
Copy link
Author

@wkerzendorf Could you have a look at this and tell me how can go about building the extension as it doesn't seem to build this way ?

@wkerzendorf
Copy link
Member

@vaibhav4595 a little bit more information would be helpful - tracebacks, building console output, etc.
The first thing that I see that wrappers doesn't have an __init__.py

@vaibhav4595
Copy link
Author

@wkerzendorf After I initialised into file ....then I ran python setup.py develop....then I had the following error......
..
...
...
writing manifest file 'tardis_sn.egg-info/SOURCES.txt'
running build_ext
error: [Errno 2] Could not find C file tardis/montecarlo/wrappers/get_test_wrapper.c for Cython file tardis/montecarlo/wrappers/get_test_wrapper.pyx when building extension tardis.montecarlo.wrappers.get_test_wrapper. Cython must be installed to build from a git checkout.: 'tardis/montecarlo/wrappers/get_test_wrapper.c'
.....
.....
This is the error in the end that I have
But the problem is that I have Cython already installed

@wkerzendorf
Copy link
Member

a couple of comments:

  1. try to use pastebin for longer debug logs
  2. I presume that you are in the wrong anaconda environment or something and it doesn't see cython

let me know how it goes.

@vaibhav4595
Copy link
Author

https://gist.github.com/vaibhav4595/087bcfb941ab3b524ad7

@wkerzendorf I am still unable to figure this out...here is the whole output that I had when I ran python setup.py develop....and then I also tried looking at the location of Cython....which is also included in the above gist......
Also I found an issue astropy/astropy#407
This has the exact same issue..but am unable to figure a fix for this

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 60ade40 on vaibhav4595:cyth into dca3806 on tardis-sn:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 55.02% when pulling 60ade40 on vaibhav4595:cyth into dca3806 on tardis-sn:master.

@wkerzendorf
Copy link
Member

Yes there is an astropy issue - but the solution is also posted in there: make sure cython is installed!

@vaibhav4595
Copy link
Author

@wkerzendorf I have got it fixed now. Cython was already installed but the path was different from what it was using. Installed it again under the anaconda environment by extracting the source files and then running the install. Thank you for your patience. I think now I have the basic hold of how to write tests for the C part of the code now.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 55.06% when pulling 2c58e00 on vaibhav4595:cyth into dca3806 on tardis-sn:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 2c58e00 on vaibhav4595:cyth into dca3806 on tardis-sn:master.

@vaibhav4595
Copy link
Author

@wkerzendorf Do have a look at the latest commit...I have just tried a basic method which seems to be running well...though this is just a very simple way of handling things...I believe this is the way to head for creating tests for the C part of the code

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.

None yet

4 participants