Giter Site home page Giter Site logo

vresutils's People

Contributors

coroa avatar euronion avatar fabianhofmann avatar fneum avatar leonsn avatar nworbmot avatar sarahbecker avatar schlachtberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vresutils's Issues

error when multiprocessing with memory_logger on Windows

 File "C:\Users\travis\build\PyPSA\pypsa-eur\.snakemake\shadow\tmpi4zbpqvn\.snakemake\scripts\tmp1jwceb1d.solve_network.py", line 394, in <module>

    with memory_logger(filename=getattr(snakemake.log, 'memory', None), interval=30.) as mem:

  File "C:\miniconda\envs\pypsa-eur\lib\site-packages\vresutils\benchmark.py", line 161, in __enter__

    self.p.start()

  File "C:\miniconda\envs\pypsa-eur\lib\multiprocessing\process.py", line 112, in start

    self._popen = self._Popen(self)

  File "C:\miniconda\envs\pypsa-eur\lib\multiprocessing\context.py", line 223, in _Popen

    return _default_context.get_context().Process._Popen(process_obj)

  File "C:\miniconda\envs\pypsa-eur\lib\multiprocessing\context.py", line 322, in _Popen

    return Popen(process_obj)

  File "C:\miniconda\envs\pypsa-eur\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__

    reduction.dump(process_obj, to_child)

  File "C:\miniconda\envs\pypsa-eur\lib\multiprocessing\reduction.py", line 60, in dump

    ForkingPickler(file, protocol).dump(obj)

TypeError: cannot serialize '_io.TextIOWrapper' object

related: PyPSA/pypsa-eur#42

New pip/conda release

Hello,

Thanks for the new fix of numpy and shapely; when will the new version be available in pypi?

ShapelyDeprecationWarning in graph.py

There's a new ShapelyDeprecationWarning in graph.py that will cause an error in Shapely 2.0. Not sure why it appears and therefore didn't find a way to fix it.

vresutils/graph.py:529: ShapelyDeprecationWarning:

__len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the  number of parts of a multi-part geometry.

I think the warning appears somewhere here: https://github.com/FRESNA/vresutils/blob/master/vresutils/graph.py#L528-L530

Varonoi partitioning with few points generates empty areas

Dear developer,

when working at the issue pypsa-meets-earth/pypsa-earth#99 , I noticed that when applying the voronoi partitioning with few points in the shape the result was the one shown below.

image

That was due to the limits in the size of the voronoi shape that was limited to the size of the points (with a multiplier), while the outline shape was not considered.

Shortly, I post a Pull request to solve the issue.

yaml.load in vresutils.snakemake.MockSnakemake returns warning

When using MockSnakemake I get the following error:

YAMLLoadWarning: calling yaml.load() without Loader=... 
is deprecated, as the default Loader is unsafe. Please read 
https://msg.pyyaml.org/load for full details.
  self.config = yaml.load(f)

As written in the PyYAML doc, there has been filed a CVE against the module. So I would suggest to change line 38 in vresutils.snakemake from self.config = yaml.load(f) to self.config = yaml.save_load(f).

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.