Commit Graph

33 Commits

Author SHA1 Message Date
martacki
3fa8f91e73 make_summary followup on snakemake dependencies removal 2022-03-04 16:29:47 +01:00
martacki
dc83fd8e09 fix small bugs 2022-01-14 15:13:44 +01:00
martacki
8cb5bd27d5 make_summary: remove snakemake dependencies 2022-01-14 11:29:01 +01:00
Fabian Neumann
646c5011af
Merge branch 'master' into snakemake_dependencies_in_functions 2021-11-10 09:46:57 +01:00
Fabian Neumann
2e02af8b4b change license 2021-09-14 16:37:41 +02:00
martacki
dfb929f2cf remove snakemake dependencies in functions, use as kwarg instead 2021-09-14 16:34:02 +02:00
martacki
400317d062 update plot_network and make_summary scripts to latest pypsa/-eur versions 2021-08-16 17:53:56 +02:00
Fabian Neumann
4cc5e49ca8
Adapt to new snapshot weightings (#259)
* for now use n.snapshot_weightings.generators

* require pypsa master; use .objective for Nyears

* implement suggestions from code review

* add release note
2021-08-06 13:43:12 +00:00
Fabian Neumann
11af828c39
remove six dependency (#245) 2021-05-25 11:29:47 +02:00
Fabian Neumann
efdfad97a3
address FutureWarning re set operations on pd.Index (#238) 2021-04-27 07:51:46 +02:00
Fabian Neumann
2fc1ea0255
some refactoring and code cleaning (#190)
* some refactoring and code cleaning

* execute pre-commit

* pre-commit: limit large files

* add license to .pre-commit

* add pre-commit to env

* solve: tidy memory logger

* travis: add conda list for easier debugging

* undo config test/tutorial without plotting, rm matplotlibrc, .licenses

* remove {networks} wildcard

* unadd pre-commit config

* add release notes

* restore REUSE compliance

* fix docs environment python version

* env: remove gurobi from dependencies

* fix unclean merge block

* fix elif to if

* lighter rtd style

* lighter rtd style II
2020-12-03 19:50:53 +01:00
Fabian Neumann
5ea29551b9
add REUSE.software license information (#160)
* add REUSE.software license information

* add release note on licensing

* Update doc/index.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update doc/index.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update doc/release_notes.rst [skip travis]

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>
2020-05-29 09:50:55 +02:00
FabianHofmann
eaf30a9b65
Introduce mocksnakemake which acutally parses Snakefile (#107)
* rewrite mocksnakemake for parsing real Snakefile

* continue add function to scripts

* going through all scripts, setting new mocksnakemake

* fix plotting scripts

* fix build_country_flh

* fix build_country_flh II

* adjust config files

* fix make_summary for tutorial network

* create dir also for output

* incorporate suggestions

* consistent import of mocksnakemake

* consistent import of mocksnakemake II

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/retrieve_databundle.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* use pathlib for mocksnakemake

* rename mocksnakemake into mock_snakemake

* revert change in data

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* remove setting logfile in mock_snakemake, use Path in configure_logging

* fix fallback path and base_dir
fix return type of make_io_accessable

* reformulate mock_snakemake

* incorporate suggestion, fix typos

* mock_snakemake: apply absolute paths again, add assertion error
*.py: make hard coded io path accessable for mock_snakemake

* retrieve_natura_raster: use snakemake.output for fn_out

* include suggestion

* Apply suggestions from code review

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* linting, add return ad end of file

* Update scripts/plot_p_nom_max.py

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* Update scripts/plot_p_nom_max.py

fixes #112

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* plot_p_nom_max: small correction

* config.tutorial.yaml fix snapshots end

* use techs instead of technology

* revert try out from previous commit, complete replacing

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters II
2019-12-09 21:29:15 +01:00
euronion
85c356297a Add logging to logfiles to all snakemake workflow scripts. (#102)
* Add logging to logfiles to all snakemake workflow scripts.

* Fix missing quotation marks in Snakefile.

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* doc: fix _ec_ filenames in docs

* Allow logging message format to be specified in config.yaml.

* Add logging for Snakemake rule 'retrieve_databundle '.

* Add limited logging to STDERR only for retrieve_*.py scripts.

* Import progressbar module only on demand.

* Fix logging to file and enable concurrent printing to STDERR for most scripts.

* Add new 'logging_format' option to Travis CI test config.yaml.

* Add missing parenthesis (bug fix) and cross-os compatible paths.

* Fix typos in messages.

* Use correct log files for logging (bug fix).

* doc: fix line references

* config: logging_format in all configs

* doc: add doc for logging_format

* environment: update to powerplantmatching 0.4.3

* doc: update line references for tutorial.rst

* Change logging configuration scheme for config.yaml.

* Add helper function for doing basic logging configuration.

* Add logpath for prepare_links_p_nom rule.

* Outsource basic logging configuration for all scripts to _helper submodule.

* Update documentation for changed config.yaml structure.

Instead of 'logging_level' and 'logging_format', now 'logging' with subcategories is used.

* _helpers: Change configure_logging signature.
2019-11-28 08:22:52 +01:00
Fabian
e59d2c4162 scripts/* revise imports 2019-11-14 17:50:24 +01:00
FabianHofmann
7e3ea94a53
Merge pull request #76 from euronion/patch-1
Update make_summary for pandas-0.25 compatability.
2019-10-25 15:41:29 +02:00
euronion
da0107478e
Refractor make_summary.py multiindex creation.
Outsource the pd.MultiIndex and pd.Index union into dedicated function and remove C&P code snippets.
2019-10-25 14:29:38 +02:00
euronion
a401d80300
Fix more pandas Index issues in make_summary. 2019-10-24 10:53:07 +02:00
euronion
dfc0242a2d
Update make_summary for pandas-0.25 compatability.
The pandas Index union operation does no longer produce a MultiIndex but a Index tuple in pandas-0.25.2.
This causes the script to fail. (The problem does not exist with pandas-0.24.0.)

Fix by explicitly checking for this case (only the first loop iteration).
2019-10-24 09:54:50 +02:00
Fabian Neumann
3a94d4f5ef add seealso from module description to config documentatoin 2019-08-13 10:03:46 +02:00
Fabian Neumann
4d3d898430 remove trialed sphinx-bibtex and describe wildcards 2019-08-12 23:48:16 +02:00
Fabian Neumann
a5d9bc9c7c add input/output descriptions (WIP) 2019-08-11 22:34:18 +02:00
Fabian Neumann
67cf28b593 fill in relevant settings sections 2019-08-11 13:17:36 +02:00
Fabian Neumann
1bded0ab9b add rule section headers 2019-08-11 11:40:47 +02:00
Jonas Hoersch
fb0d44f64e Add a summary sentence for each rule taken from scripts 2019-08-08 15:07:08 +02:00
Fabian Neumann
7a4e9f22d4 configuration table descriptions 2019-08-07 10:56:23 +02:00
Jonas Hoersch
7f3f096ba6 Fix model for country selections without DC links (fixes #5) 2019-02-13 19:03:57 +01:00
Jonas Hoersch
15e986a0ec make_summary: Update summary creation for new line volume/cost constraints
Fixes #4.
2019-02-10 16:08:39 +01:00
Jonas Hörsch
761b1b998f make_summary: Add summary about capacities and allow single country summaries 2018-11-12 22:00:50 +01:00
Jonas Hörsch
5b201de7d4 {make,plot}_summary: Add rules to flexibly create summaries and plot them 2018-10-26 10:28:54 +02:00
Tom Brown
540985164f Plot summary; take account of snapshot weightings correctly 2018-10-23 17:02:03 +02:00
Tom Brown
f3a12e7aee Add CSV summaries 2018-10-23 17:00:06 +02:00
Jonas Hörsch
71512c15a5 Copy over make_summary.py from sector branch co2 2018-10-23 16:59:41 +02:00