Giter VIP home page Giter VIP logo

pyposeidon's People

Contributors

brey avatar pmav99 avatar vvoukouvalas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyposeidon's Issues

Deprecations warnings with numpy 1.20+

With numpy 1.20+, the following lines throw warnings similar to these:

DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:605
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:187
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:593
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:599
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:509
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:778
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:784
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:790

https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

pygeos integration

pygeos is now supported by Geopandas. Check whether we can simplify the code by implementing only geopandas.

Consider creating compressed netcdf files

The output NetCDF files are not compressed. This can easily be checked with source:

ncdump -s -h ../path/to/output.nc | grep -i deflate

Creating compressed netcdfs will greatly reduce the file size and is something we should consider.

Document netcdf outpuf format

I think it would be really useful if the netcdf output file was documented (variables, dimensions etc). If the solvers produce output files with different formats then we should document what each solver produces separately. As soon as things are relatively stable, changes in the output format should require a version bump.

The documentation can be either an ipython notebook or a wiki page (or both! :P).

schism fails around International line

There is a weird issue with grids around the international line where SCHISM report some elements as having negative area. It was working before.

Check upstream to SCHISM for something that has changed.

See test_schism_total.

tests: Move tests to the outer directory

The best python framework is pytest. In order to make usage of its test runner the test suite should be structured according to its own conventions (which we already do).

Nevertheless, it is also a good idea to keep the test suite outside the proper package (docs). Among other things, this makes it easier to grep the source code. E.g.

# search for `ncores` in `pyPoseidon` and `tests` respectively.
ag ncores pyPoseidon
ag ncores tests

I will make a pull request that moves the tests to a separate tests directory. @brey even if the CI passes do not merge this before making sure that you don't have changes in the tests in your local repo. If you do merge it you will have to deal with the conflicts afterwards.

Remove azure-pipelines

As soon as we are satisfied with the github actions setup, we could consider removing the azure pipelines from the project

ideally, we should keep both so that we are not coupled to a specific service, but we probably lack the resources to maintain both at the same time.

tests: Stop hardcoding the number of cores

Hardcoding the number of cores is suboptimal. It makes it difficult to develop on low end machines (up to 4 cores) and is wasting time on higher end machines (4+ cores are available).

A reasonable default is to use the maximum number of cores minus one or two. E.g.

import multiprocessing

NCORES = max(1, multiprocessing.cpu_count() - 1)

Alternatively, the number of cores could be specified via an ENV variable, but not sure that something like this is that much useful at the moment.

The files that need to be updated can be found with:

ag --python ncores

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.