Comments (10)
ok, upon further investigation, it seems that the failing sdist build with python 3.12 from earlier was a fluke. It happened because we tried to build cyvcf2 with numpy < 2.0 and then run it with a version of numpy > 2.0, which is explicitly discouraged in the docs
The CI seems to pass now in #308 on my fork, so I'm inclined to say that there won't need to be any changes to the source code to support numpy 2.0, after all
from cyvcf2.
I pushed v0.31.1 with changes from @aryarm . Should resolve this issue.
from cyvcf2.
I'm also running into this issue.
Based on the numpy docs, I think the pyproject.toml
file needs to be updated.
[build-system]
requires = [
"setuptools",
"wheel",
"cython>=0.23.3",
- 'oldest-supported-numpy; os_name != "nt"',
+ 'oldest-supported-numpy; os_name != "nt"' and python_version < "3.9"',
- 'numpy; os_name == "nt"'
+ 'numpy>=2.0.0; os_name == "nt" and python_version >= "3.9"',
]
from cyvcf2.
@aryarm , I pushed your suggestions, but the build is still failing. Any suggestions?
from cyvcf2.
@brentp, I think I made a mistake! I didn't realize os_name == "nt"
applies only to windows
In that case, maybe try something more like this?
[build-system]
requires = [
"setuptools",
"wheel",
"cython>=0.23.3",
- 'oldest-supported-numpy; os_name != "nt"',
+ 'oldest-supported-numpy; os_name != "nt"' and python_version < "3.9"',
- 'numpy; os_name == "nt"'
+ 'numpy; os_name == "nt" and python_version < "3.9"',
+ 'numpy>=2.0.0; python_version >= "3.9"',
]
In other words:
- if the python version is 3.9+, use numpy>=2.0.0
- otherwise
- if the os is windows, use any compatible numpy
- or use oldest-supported-numpy if the os is linux
from cyvcf2.
you might also need to make some changes to the source code to make it compatible with numpy 2.0
This doc has a list of the required changes
https://numpy.org/doc/stable/numpy_2_0_migration_guide.html#c-api-changes
Just from a cursory glance, that might explain why the sdist build with python 3.12 failed? It seems to be the only test running against numpy 2.0. The rest of the tests seem to be running with an older version of numpy (even though they may be using numpy 2.0 for compilation!) because we haven't also updated the requirements.txt
file yet
from cyvcf2.
I pushed to a branch with the updated requirements.txt. Will continue work on it later this week. Pull requests appreciated. ;)
from cyvcf2.
ok! thanks for the quick response on this and for trying my suggestions!
It might also be a good idea to add steps to the CI to test against both the newest version of numpy and the oldest version of numpy supported by cyvcf2, as recommended in the numpy docs
from cyvcf2.
excellent! thank you for figuring this out!
from cyvcf2.
seems to be working now on my end! feel free to close this
thanks for the quick turnaround on this!
from cyvcf2.
Related Issues (20)
- Bug: Set_samples function somehow removed all FORMAT fields HOT 2
- Floating point imprecision HOT 8
- Dealing with missing values in INFO column HOT 2
- Processing BED? HOT 2
- Any method available to split vcf files into individual sample vcf files
- Importing 64bit integers in FORMAT? HOT 4
- Add setter for POS HOT 1
- Crash with single GT allele value - UnicodeDecodeError: 'ascii' codec can't decode byte 0x81 in position 1: ordinal not in range(128) HOT 2
- Could you bump a new version to the pip HOT 1
- Provide access to index stats HOT 6
- Suggest not to remove htslib/config.status at setup.py
- No macOS arm64 wheels available for 0.30.26 and 0.30.27 HOT 1
- Adding new variant record
- Multiallelic VCF with annotation in INFO field doesn't query all available infromation HOT 3
- ##INFO fields being dropped HOT 6
- Skip the warnings? HOT 2
- Missing values for multi-allelic variants result in large negative numbers in `.format("AD")`, not all the same HOT 1
- MacOS ARM wheels broken? HOT 12
- record.FILTER vs. record.FILTERS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyvcf2.