DocOtak / gsw-xarray

Wrapper for gsw that will add CF attributes to xarray.DataArray outputs
https://gsw-xarray.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
23 stars 3 forks source link

Re-organizing code #4

Closed rcaneill closed 2 years ago

rcaneill commented 2 years ago
  1. Organizing code in a cleaner way
  2. Add a 1st simple test

Comment on the test test_func_standard_module: it fails. This means that gsw can only be used when importing function from gsw, and not from the modules (like from gsw.density import sigma0). This is a problem.

rcaneill commented 2 years ago

I changed poetry.lock to use python 3.8 (I don't use python3.9 installed yet), I guess all what we do may even be compatible with python 3.6?

DocOtak commented 2 years ago

Xarray recently dropped support for python 3.7, so we should stick with that as the minimum "supported" python version.

Since #5 will probably require that we maintain some sort separation between the xarray specific and upstream public API, I think I like the approach of having the single underscore "mark as private" our stuff.

Was the poetry.lock file regenerated by poetry itself? as in you only modified the pyproject.toml file then poetry remade that lock file (I don't know what the best practice is yet for dealing with this lock file)

rcaneill commented 2 years ago

I did not knew about the drop for python 3.7. So it makes sense then to support >=3.8 now.

Yes I only changed pyproject.toml and poetry updated the poetry.lock file. I don't know neither the best practice. I am more used to using a setup.py file for library installation, and pipenv files for dev / tests.