Skip to content

Commit

Permalink
create readme, clean up incl. gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dietersteuten committed May 21, 2024
1 parent 081ec66 commit a9bd713
Show file tree
Hide file tree
Showing 15 changed files with 247 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .gitigore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build/*
/coben.egg-info/*
/dist/*
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.md
include requirements.txt
recursive-include coben/utils *
107 changes: 106 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,106 @@
# coben
# Coben

Coben is a comprehensive tool designed to manage and streamline all aspects of software development. It provides a holistic and hardware-agnostic approach to handle every stage of the development process, from conception and architecture to testing, compiling, code change notifications, and more. The tool ensures synergy across all development disciplines, enhancing overall productivity and efficiency.

## Features

- **Holistic Development Management**: Coben covers every stage of the development lifecycle, ensuring a seamless and integrated workflow.
- **Hardware-Agnostic**: Designed to work with various hardware platforms, including plain systems, ESP32, ARM64, and more.
- **Project Conception and Architecture**: Tools to help you plan and structure your projects effectively.
- **Comprehensive Testing**: Automated testing and validation to maintain high code quality.
- **Compilation and Build Management**: Simplifies the build process across different platforms.
- **Code Change Notifications**: Monitors and notifies about code changes, ensuring all team members are up-to-date.
- **Synergistic Approach**: Every feature is designed to complement others, providing synergy across different development tasks.

## Installation

You can install Coben using pip:

```sh
pip install coben
```

## Usage

### Initialize a New Project

To create a new project:

```sh
coben init <project_name> --platform <platform>
```

### Build the Project

To build the project:

```sh
coben build <project_name>
```

### Check the Project

To perform checks on the project:

```sh
coben check <project_name>
```

### Run the Project

To run the project:

```sh
coben run <project_name>
```

### Monitor the Project

To monitor the project's runtime behavior:

```sh
coben monitor <project_name>
```

### Serve Documentation

To serve the project's documentation using MkDocs:

```sh
coben docu <project_name>
```

### Synchronize Files and Documentation

To synchronize project files and update related documentation:

```sh
coben sync <project_name>
```

### Update Project from Directories

To update UML and documentation from project directories:

```sh
coben from-dirs <project_name>
```

## Project Structure

Coben organizes your project with a well-defined structure:

(TODO)

## Contributing

Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## License

This project is licensed under the Apache License - see the [LICENSE](LICENSE) file for details.

## Acknowledgements

Special thanks to all contributors and the open-source community for their support and contributions.

12 changes: 6 additions & 6 deletions coben/coben.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import argparse
import os
from utils.project_setup import ProjectManager
from utils.doc_utils import DocumentationManager
from utils.directory_utils import DirectoryManager
from utils.puml_utils import UMLManager
from utils.git_utils import GitUtils
from utils.component_utils import ComponentManager
from coben.utils.project_setup import ProjectManager
from coben.utils.doc_utils import DocumentationManager
from coben.utils.directory_utils import DirectoryManager
from coben.utils.puml_utils import UMLManager
from coben.utils.git_utils import GitUtils
from coben.utils.component_utils import ComponentManager

def parse_command_line_arguments():
parser = argparse.ArgumentParser(description="Verwaltet Projekte.")
Expand Down
6 changes: 3 additions & 3 deletions coben/utils/component_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import logging
from utils.template_factory import TemplateFactory
from utils.doc_utils import DocumentationManager
from utils.git_utils import GitUtils
from coben.utils.template_factory import TemplateFactory
from coben.utils.doc_utils import DocumentationManager
from coben.utils.git_utils import GitUtils

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down
4 changes: 2 additions & 2 deletions coben/utils/directory_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import logging
from utils.file_utils import FileUtils
from utils.template_factory import TemplateFactory
from coben.utils.file_utils import FileUtils
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down
2 changes: 1 addition & 1 deletion coben/utils/doc_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import subprocess
import ruamel.yaml
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

yaml = ruamel.yaml.YAML()

Expand Down
2 changes: 1 addition & 1 deletion coben/utils/file_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory
import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
Expand Down
2 changes: 1 addition & 1 deletion coben/utils/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil
import subprocess
import logging
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down
10 changes: 5 additions & 5 deletions coben/utils/project_setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os
import subprocess
import psutil
from utils.template_factory import TemplateFactory
from utils.git_utils import GitUtils
from utils.component_utils import ComponentManager
from utils.doc_utils import DocumentationManager
from utils.puml_utils import UMLManager
from coben.utils.template_factory import TemplateFactory
from coben.utils.git_utils import GitUtils
from coben.utils.component_utils import ComponentManager
from coben.utils.doc_utils import DocumentationManager
from coben.utils.puml_utils import UMLManager

class ProjectManager:
def __init__(self, project_name, platform):
Expand Down
2 changes: 1 addition & 1 deletion coben/utils/puml_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import re
import logging
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down
24 changes: 12 additions & 12 deletions coben/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import argparse
from utils.project_setup import ProjectManager
from utils.doc_utils import DocumentationManager
from utils.directory_utils import DirectoryManager
from utils.puml_utils import UMLManager
from coben.utils.project_setup import ProjectManager
from coben.utils.doc_utils import DocumentationManager
from coben.utils.directory_utils import DirectoryManager
from coben.utils.puml_utils import UMLManager

def parse_command_line_arguments():
parser = argparse.ArgumentParser(description="Verwaltet Projekte.")
Expand Down Expand Up @@ -98,7 +98,7 @@ def get_template(self, template_name):
return self.env.get_template(template_name)

import os
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory
import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
Expand Down Expand Up @@ -132,8 +132,8 @@ def create_component(self, component_name):

import os
import logging
from utils.file_utils import FileUtils
from utils.template_factory import TemplateFactory
from coben.utils.file_utils import FileUtils
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down Expand Up @@ -180,8 +180,8 @@ def sync_dirs_and_files(self, uml_content):

import os
import logging
from utils.template_factory import TemplateFactory
from utils.doc_utils import DocumentationManager
from coben.utils.template_factory import TemplateFactory
from coben.utils.doc_utils import DocumentationManager

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down Expand Up @@ -243,7 +243,7 @@ def extract_linked_components(self, cmake_path):
import os
import re
import logging
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down Expand Up @@ -382,7 +382,7 @@ def sync_uml(self):
import os
import subprocess
import ruamel.yaml
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

yaml = ruamel.yaml.YAML()

Expand Down Expand Up @@ -459,7 +459,7 @@ def serve_mkdocs(self):
import shutil
import subprocess
import logging
from utils.template_factory import TemplateFactory
from coben.utils.template_factory import TemplateFactory

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand Down
19 changes: 19 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
mkdocs
plantuml
clang
psutil
mkdocs-plantuml
plantuml-markdown
mkdocs-include-markdown-plugin
mkdocs-extra-sass-plugin
mkdocs-git-revision-date-localized-plugin
mkdocs-material
mkdocs-material-extensions
mkdocs-with-pdf
weasyprint
regex
libsass
jinja2
mkdocs_puml
ruamel.yaml
click
46 changes: 46 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from setuptools import setup, find_packages

setup(
name='coben',
version='0.1.0',
description='A tool to manage and streamline software project workflows.',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Dieter Steuten',
author_email='dieter@dingste.de',
url='https://github.com/dingste/coben',
packages=find_packages(),
include_package_data=True,
install_requires=[
'mkdocs',
'plantuml',
'clang',
'psutil',
'mkdocs-plantuml',
'plantuml-markdown',
'mkdocs-include-markdown-plugin',
'mkdocs-extra-sass-plugin',
'mkdocs-git-revision-date-localized-plugin',
'mkdocs-material',
'mkdocs-material-extensions',
'mkdocs-with-pdf',
'weasyprint',
'regex',
'libsass',
'jinja2',
'mkdocs_puml',
'ruamel.yaml',
'click',
],
entry_points={
'console_scripts': [
'coben=coben.coben:main',
],
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)
38 changes: 38 additions & 0 deletions tests/test_coben.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import unittest
from coben.coben import parse_hierarchy, format_puml_content, extract_uml_content

class TestCoben(unittest.TestCase):

def test_parse_hierarchy(self):
uml_content = """
class A {
}
class B {
}
"""
hierarchy = parse_hierarchy(uml_content)
expected = {'A': {}, 'B': {}}
self.assertEqual(hierarchy, expected)

def test_format_puml_content(self):
puml_content = """
class A {
}
"""
formatted_content = format_puml_content(puml_content)
expected = "class A {\n}"
self.assertEqual(formatted_content.strip(), expected.strip())

def test_extract_uml_content(self):
diff_content = """
```puml
class A {
}
```
"""
uml_content = extract_uml_content(diff_content)
expected = "class A {\n}"
self.assertEqual(uml_content.strip(), expected.strip())

if __name__ == '__main__':
unittest.main()

0 comments on commit a9bd713

Please sign in to comment.