atlite icon indicating copy to clipboard operation
atlite copied to clipboard

Issue227 - Turbine, Panel and CSP Installation Configs from local path

Open LukasFrankenQ opened this issue 3 years ago • 0 comments

Closes #227.

Change proposed in this Pull Request

Methods get_windturbineconfig, get_solarpanelconfig and get_cspinstallationconfig load yaml files based on the passed configuration name. Now, additionally, the methods recognize if a path to a locally stored config is passed. The file is then loaded instead of a predefined config.

Description

The methods run Path([the local path]).exists() to check if the path exists. If not, the methods assume that the user passed the name of a config, and proceeds as before the change.

Motivation and Context

This is a small change, proposed a while ago by @fneum. I seems like a sensible addition.

How Has This Been Tested?

I checked all three functions to make sure that both old and new behaviour are behaving as expected.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I tested my contribution locally and it seems to work fine.
  • [ ] I locally ran pytest inside the repository and no unexpected problems came up. (one apparently unrelated error)
  • [x] I have adjusted the docstrings in the code appropriately.
  • [x] I have documented the effects of my code changes in the documentation doc/.
  • [x] I have added newly introduced dependencies to environment.yaml file.
  • [x] I have added a note to release notes doc/release_notes.rst.
  • [x] I have used pre-commit run --all to lint/format/check my contribution

LukasFrankenQ avatar Aug 28 '22 14:08 LukasFrankenQ