summary refs log tree commit diff stats
path: root/ganarchy/__init__.py
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2020-02-16 19:35:47 -0300
committerSoniEx2 <endermoneymod@gmail.com>2020-02-16 19:40:35 -0300
commit3a8cc83cbe465b798647b92357eff2d52454f3dc (patch)
treee437768b93e06c807387dab9b7fa3da6aec360ad /ganarchy/__init__.py
parentf84c60e039864af593f6b8d015b11113a6e59f50 (diff)
Squashed commit of the following:
* Move things around a bit more
* Add project structure details to HACKING.md
* Create setup.py
* Split off A Boneless Datastructure Language
Diffstat (limited to 'ganarchy/__init__.py')
-rw-r--r--ganarchy/__init__.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/ganarchy/__init__.py b/ganarchy/__init__.py
index 0f13b44..6d24994 100644
--- a/ganarchy/__init__.py
+++ b/ganarchy/__init__.py
@@ -32,7 +32,7 @@ import requests
 from collections import defaultdict
 from urllib.parse import urlparse
 
-import ganarchy.config
+import ganarchy.config as m_ganarchy_config
 
 MIGRATIONS = {
         "toml-config": (
@@ -210,10 +210,8 @@ def get_env():
     env.filters['tomle'] = env.filters['tomlescape']
     return env
 
-
-@click.group()
-def ganarchy():
-    pass
+# FIXME
+from ganarchy.cli import main as ganarchy
 
 @ganarchy.command()
 def initdb():
@@ -457,12 +455,11 @@ class Config:
         # TODO re.compile("(^" + "|^".join(map(re.escape, domains)) + "|" + "|".join(map(re.escape, suffixes) + ")$")
         if base:
             # FIXME is remove=remove the right thing to do?
-            self._update_projects(base.projects, remove=remove, sanitize=False) # already sanitized
-        projects = config_data.get('projects', {})
-        self._update_projects(projects, remove=remove)
+            self._update_projects({'projects': base.projects}, remove=remove, sanitize=False) # already sanitized
+        self._update_projects(config_data, remove=remove)
 
     def _update_projects(self, projects, remove, sanitize=True):
-        m = (ganarchy.config.CONFIG_PATTERN_SANITIZE if sanitize else ganarchy.config.CONFIG_PATTERN).match(projects)
+        m = (m_ganarchy_config.CONFIG_REPOS_SANITIZE if sanitize else m_ganarchy_config.CONFIG_REPOS).match(projects)
         for v in m:
             commit, repo_url, branchname, options = v['commit'][0], v['url'][0], v['branch'][0], v['branch'][1]
             try: