Comments (4)
Yes, I was pretty conflicted about the naming conventions to use. It pains me not to follow PEP8, but I also wanted to try to avoid forcing people to learn another approach.
It might make sense to have two different APIs:
- a cleaner PEP 8 compatible API accessible via
import h5netcdf
- a legacy compatible API which is almost a drop-in replacement for netCDF4-python, importable like
import h5netcdf.legacyapi as netCDF4
.
But on the other hand, two API is twice the surface area for bugs....
For now, I leaned toward the later, given that in my opinion users should really use another interface like xray to write netCDF files instead of writing all the metadata themselves.
from h5netcdf.
As for docs, yes I need to write those :).
from h5netcdf.
I think two apis would not be such a big issue (with a handful of unit tests of course ;) - the number of function in the api is relatively limited and you can add straight aliases like underscore_fn_name = camelCaseFunctionName
. Though personally I would simply break with the existing library, unless you have a strong preference for a drop-in replacement. I feel that this would be an opportunity to reconsider the existing API and see if it could be improved.
I don't think you can depend on higher level libraries to "hide" the API though - if (which is my use case) you need to create a netCDF file with a very specific metadata format you need to set it by hand and that's easiest to do directly with the netCDF library rather than a higher level wrapper.
from h5netcdf.
Just pushed changes implementing this feature to master. I'm thinking now that the main h5netcdf module will be more closely patterned off of h5py, with only the minimal adaptations necessary to make it make sense for netCDF files. If you have ideas about what the main API should look like, I'm also open to suggestions :).
The main reason I originally decided to keep with the existing API is to facilitate testing. So I'd like to keep around the legacyapi
module, if only for that reason. It also makes it easier to test out this package, which is also a good thing.
I suppose you are correct that there will always be some users (e.g., library writers) who will want a lower level interface for writing netCDF files.
from h5netcdf.
Related Issues (20)
- h5netcdf writes invalid netcdf to existing netcdf files HOT 6
- Corrupted headers when serialising using dask.distributed client HOT 9
- Test failures with NetCDF 4.9.0 HOT 6
- Remove h5py2 related code and CI builds HOT 3
- FAILED h5netcdf/tests/test_h5netcdf.py::test_group_names HOT 6
- AttributeError for '_phony_dim_count' when trying to convert a file made with h5py HOT 12
- Tests test_more_than_7_attr_creation_track_order and test_bool_slicing_length_one_dim fail in the test suite HOT 18
- very slow partial reading when saved with index shift HOT 10
- h5py minimum version update? HOT 5
- Improving performance for h5netcdf HOT 7
- Documentation request: Alternative way to obtain h5netcdf HOT 1
- Segmentation fault after upgrading to h5netcdf==1.1.0 HOT 14
- ValueError raised when attribute has type `h5py.Reference` HOT 5
- support for HDF5 dimension scales with null dataspace HOT 2
- Modifying attributes safely is not possible with all datasets. HOT 10
- Better Error for illegal variable names HOT 3
- md5 checksum mismatch for identical files/data HOT 7
- Question: does `h5netcdf` bring in the entire data from a netCDF file on a remote disk (like S3)? HOT 5
- Provide an example with time dimension readable by paraview HOT 3
- transient vs committed types HOT 5
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 h5netcdf.