aboutsummaryrefslogtreecommitdiff
path: root/src/ee/project
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-14 06:27:16 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-15 08:22:02 +0100
commit8d17fb5bc4b0dae0758e01a44d77d87acf2e686a (patch)
treea13ed043962b8a8da355bba956dc9e77b7fb217e /src/ee/project
parent2315d1a34cb777f1731368619a4ca14f46125bb4 (diff)
downloadee-python-8d17fb5bc4b0dae0758e01a44d77d87acf2e686a.tar.gz
ee-python-8d17fb5bc4b0dae0758e01a44d77d87acf2e686a.tar.bz2
ee-python-8d17fb5bc4b0dae0758e01a44d77d87acf2e686a.tar.xz
ee-python-8d17fb5bc4b0dae0758e01a44d77d87acf2e686a.zip
o Adding module for searching on element14.
o Starting on functionality create orders. Very WIP. o Adding a concept of an "ee project". Can load a gitconfig-like config file. o Adding a tool to import a yaml file into a part xml file.
Diffstat (limited to 'src/ee/project')
-rw-r--r--src/ee/project/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ee/project/__init__.py b/src/ee/project/__init__.py
new file mode 100644
index 0000000..187fc3c
--- /dev/null
+++ b/src/ee/project/__init__.py
@@ -0,0 +1,12 @@
+import configparser
+from pathlib import Path
+
+
+def load_config(project_dir: Path) -> configparser.ConfigParser:
+ config = configparser.ConfigParser()
+
+ config_path = project_dir / ".ee" / "config"
+ with config_path.open("r") as f:
+ config.read_file(f, source=str(config_path))
+
+ return config