generated from rl-institut/rli_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/fix-and-extend-tests' into fix-a…
…nd-extend-tests # Conflicts: # tests/_files/build_datapackage_goal/datapackage.json # tests/test_build_datapackage.py # tests/test_mapping.py
- Loading branch information
Showing
15 changed files
with
176 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This workflow will run linters with a single version of Python | ||
|
||
name: Black | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
- release/* | ||
pull_request: | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Python dependencies | ||
run: pip install black flake8 isort | ||
|
||
- name: Black | ||
if: success() || failure() | ||
run: black --check . | ||
|
||
- name: flake8 | ||
if: success() || failure() | ||
run: flake8 data_adapter_oemof tests | ||
|
||
- name: isort | ||
if: success() || failure() | ||
run: isort --verbose --check-only --diff data_adapter_oemof tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pathlib | ||
|
||
import dotenv | ||
|
||
TEST_ENV_FILE = pathlib.Path(__file__).parent / "tests" / ".env" | ||
dotenv.load_dotenv(TEST_ENV_FILE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
import os | ||
import pathlib | ||
|
||
ROOT_DIR = pathlib.Path(__file__).parent.parent | ||
COLLECTIONS_DIR = ROOT_DIR / "collections" | ||
ROOT_DIR = pathlib.Path(__file__).parent | ||
|
||
COLLECTIONS_DIR = ( | ||
pathlib.Path(os.environ["COLLECTIONS_DIR"]) | ||
if "COLLECTIONS_DIR" in os.environ | ||
else pathlib.Path.cwd() / "collections" | ||
) | ||
if not COLLECTIONS_DIR.exists(): | ||
raise FileNotFoundError( | ||
f"Could not find collections directory '{COLLECTIONS_DIR}'. " | ||
"You should either create the collections folder or " | ||
"change path to collection folder by changing environment variable 'COLLECTIONS_DIR'.", | ||
) | ||
STRUCTURES_DIR = ( | ||
pathlib.Path(os.environ["STRUCTURES_DIR"]) | ||
if "STRUCTURES_DIR" in os.environ | ||
else pathlib.Path.cwd() / "structures" | ||
) | ||
if not STRUCTURES_DIR.exists(): | ||
raise FileNotFoundError( | ||
f"Could not find structure directory '{STRUCTURES_DIR}'. " | ||
"You should either create the structure folder or " | ||
"change path to structure folder by changing environment variable 'STRUCTURES_DIR'.", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
# | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath('..')) | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.