Skip to content

Commit

Permalink
Merge pull request #436 from Green-Software-Foundation/functional-arc…
Browse files Browse the repository at this point in the history
…hitecture

Functional architecture
  • Loading branch information
narekhovhannisyan authored Mar 2, 2024
2 parents 012bcf8 + 069a51a commit 249baa9
Show file tree
Hide file tree
Showing 160 changed files with 3,779 additions and 264,425 deletions.
26 changes: 25 additions & 1 deletion .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,32 @@ module.exports = {
'ci',
'test',
'revert',
'package',
],
],
'scope-enum': [
2,
'always',
[
'util',
'lib',
'types',
'src',
'package',
'config',
'mocks',
'examples',
'.github',
'.husky',
'scripts',
'models',
'plugins',
'integration',
'doc'
]
],
'scope-empty': [
2,
'never'
]
},
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ yarn-error.log
build
coverage
.env
src/__tests__/integration/manifest
examples/outputs
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

Modern applications are composed of many smaller pieces of software (components) running on many different environments, for example, private cloud, public cloud, bare-metal, virtualized, containerized, mobile, laptops, and desktops.

Every environment requires a different model of measurement, and there is no single solution you can use to calculate the environmental impacts for all components across all environments.
Every environment requires a different plugin of measurement, and there is no single solution you can use to calculate the environmental impacts for all components across all environments.

The friction to measuring software emissions isn't that we need to know how, it's that we run software on many things and each thing has several different ways to measure.

Expand All @@ -43,34 +43,34 @@ Read the [specification and design docs](https://if.greensoftware.foundation) to

## Get started

The first thing to understand is that IF is a framework for running model plugins. This means that in order to do some calculations, you need to load some models from some external resource. We provide a [standard library of models](https://github.com/Green-Software-Foundation/if-models) and a repository of [community models](https://github.com/Green-Software-Foundation/if-unofficial-models) to get you started.
The first thing to understand is that IF is a framework for running plugins. This means that in order to do some calculations, you need to load some plugins from some external resource. We provide a [standard library of plugins](https://github.com/Green-Software-Foundation/if-plugins) and a repository of [community plugins](https://github.com/Green-Software-Foundation/if-unofficial-plugins) to get you started.

Start by installing framework itself:

```sh
npm install -g "@grnsft/if"
```
Then installing some models:
Then installing some plugins:

```sh
npm install -g "@grnsft/if-models"
npm install -g "@grnsft/if-plugins"
```

Then create an `impl` file that describes your application (see our docs for a detailed explanation).
Then create a `manifest` file that describes your application (see our docs for a detailed explanation).

Then, run `impact-engine` using the following command:
Then, run `if` using the following command:

```sh
impact-engine --impl <path-to-your-impl-file>
if --manifest <path-to-your-manifest-file>
```
You can also add an optional savepath for your output yaml (if you do not provide one, the output will be printed to the console):
```sh
impact-engine --impl <path-to-your-impl-file> --ompl <your-savepath>
if --manifest <path-to-your-manifest-file> --output <your-savepath>
```
The `impact-engine` CLI tool will configure and run the models defined in your input `yaml` (`impl`) and return the results as an output `yaml` (`ompl`).
The `if` CLI tool will configure and run the plugins defined in your input `yaml` (`manifest`) and return the results as an output `yaml` (`output`).
## Documentation
Expand All @@ -79,7 +79,7 @@ Please read our documentation at [if.greensoftware.foundation](https://if.greens
## Video walk-through
Watch this video to learn how to create and run an `impl`.
Watch this video to learn how to create and run a `manifest`.
[![Watch the walk-through video](https://i3.ytimg.com/vi/R-6eDM8AsvY/maxresdefault.jpg)](https://youtu.be/GW37Qd4AQbU)
Expand All @@ -92,4 +92,4 @@ You can check our issue board for issues tagged `help-wanted`. These are issues
Please read the full contribution guidelines at [if.greensoftware.foundation](https://if.greensoftware.foundation/Contributing)
The same guidelines also apply to `if-docs`, `if-models` and `if-unofficial-models`.
The same guidelines also apply to `if-docs`, `if-plugins` and `if-unofficial-plugins`.
155 changes: 0 additions & 155 deletions examples/impls/case-studies/accenture.yml

This file was deleted.

97 changes: 0 additions & 97 deletions examples/impls/case-studies/aggregation.yml

This file was deleted.

Loading

0 comments on commit 249baa9

Please sign in to comment.