Skip to content

Commit

Permalink
vintner info
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner authored Jul 19, 2023
1 parent c2e2741 commit bd42cfa
Show file tree
Hide file tree
Showing 35 changed files with 287 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
#
###################################################

- name: (DOCS) Generate Dependencies Page
run: yarn docs:generate:dependencies

- name: (BUILD) Build Project
run: yarn build

Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/night.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,35 @@ jobs:
wget https://github.com/opentosca/opentosca-vintner/releases/download/latest/vintner-linux-x64.asc
gpg --verify vintner-linux-x64.asc /usr/bin/vintner
- name: (INSTALLATION) Test setup
###################################################
#
# Vintner
#
###################################################

- name: (VINTNER) Ensure that version is overridden
run: |
vintner --version
vintner setup init
vintner setup benchmark --seeds 10 250
if [ "$(vintner --version)" == "__VERSION__" ]; then
exit 1
fi
- name: (VINTNER) Ensure that license is overridden
run: |
if [ "$(vintner info license)" == "$(cat src/assets/LICENSE)" ]; then
exit 1
fi
- name: (VINTNER) Ensure that dependencies are overridden
run: |
if [ "$(vintner info dependencies)" == "$(cat src/assets/dependencies.csv)" ]; then
exit 1
fi
- name: (VINTNER) Test filesystem initialization
run: vintner setup init

- name: (VINTNER) Test resolver
run: vintner setup benchmark --seeds 10 250

###################################################
#
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
- name: (TEST) Check Prettier
run: yarn style:check

- name: (TEST) Check Licenses
run: yarn licenses:check
- name: (TEST) Check Dependencies
run: yarn dependencies:check

- name: (TEST) Check Service Templates
run: yarn puccini:check
Expand All @@ -82,6 +82,9 @@ jobs:
#
###################################################

- name: (DOCS) Generate Dependencies Page
run: yarn docs:generate:dependencies

- name: (BUILD) Build Project
run: yarn build

Expand Down Expand Up @@ -176,9 +179,6 @@ jobs:
- name: (DOCS) Build Documentation Commands
run: yarn docs:build:commands

- name: (DOCS) Generate Licenses Page
run: yarn docs:generate:licenses

- name: (DOCS) Generate Interface Page
run: yarn docs:generate:interface

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
- name: (TEST) Check Prettier
run: yarn style:check

- name: (TEST) Check Licenses
run: yarn licenses:check
- name: (TEST) Check Dependencies
run: yarn dependencies:check

- name: (TEST) Check Service Templates
run: yarn puccini:check
Expand All @@ -69,6 +69,9 @@ jobs:
#
###################################################

- name: (DOCS) Generate Dependencies Page
run: yarn docs:generate:dependencies

- name: (BUILD) Build Project
run: yarn build

Expand Down Expand Up @@ -96,9 +99,6 @@ jobs:
- name: (DOCS) Build Documentation Commands
run: yarn docs:build:commands

- name: (DOCS) Generate Licenses Page
run: yarn docs:generate:licenses

- name: (DOCS) Generate Interface Page
run: yarn docs:generate:interface

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN yarn --frozen-lockfile
# Test
RUN yarn lint:check
RUN yarn style:check
RUN yarn licenses:check
RUN yarn dependencies:check
RUN yarn puccini:check
RUN yarn test

Expand All @@ -24,7 +24,7 @@ RUN apt-get update -y \
&& rm -rf /var/lib/apt/lists/*
RUN yarn docs:install
RUN yarn docs:build:commands
RUN yarn docs:generate:licenses
RUN yarn docs:generate:dependencies
RUN yarn docs:generate:interface
RUN yarn docs:generate:tests:variability
RUN yarn docs:generate:tests:query
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[![MiniSat](https://img.shields.io/badge/MiniSat-%E2%9D%A4%EF%B8%8F-ff69b4)](https://github.com/meteor/logic-solver)

OpenTOSCA Vintner is a TOSCA preprocessing and management layer which is able to deploy applications based on TOSCA orchestrator plugins.
Preprocessing includes, e.g., the resolving of variability.
Preprocessing includes, e.g., the resolving of deployment variability.

- [Documentation](https://vintner.opentosca.org)
- [Getting Started](https://vintner.opentosca.org/getting-started)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as files from '#files'
import * as path from 'path'
import * as utils from './utils'

const CSV_FILE = path.join('docs', 'docs', 'assets', 'documents', 'licenses.csv')
const CSV_FILE = path.join('docs', 'docs', 'assets', 'documents', 'dependencies.csv')

async function main() {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ tags:

# Dependencies

{{ autogenerated_notice('yarn docs:generate:licenses') }}
{{ autogenerated_notice('yarn docs:generate:dependencies') }}

We use the following dependencies in production.
You can download the dataset as [CSV](assets/documents/licenses.csv).
You can download the dataset as [CSV](assets/documents/dependencies.csv).
We ensure, that only the licenses <%- "MIT;Apache-2.0;Python-2.0;BSD-2-Clause;BSD-3-Clause;ISC;CC-BY-3.0;CC0-1.0;PSF;0BSD;BlueOak-1.0.0".split(";").sort().map(license => `[${license}](${licenses[license]}){target=_blank}`).join(", ") -%> are used.

| ID | Dependency | Version | License |
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/cmds/interface/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function main() {
}

function isCLIOnly(commands: string[]) {
return ['server', 'sensors'].includes(commands[0]) || ['open', 'path', 'code'].includes(commands[1])
return ['server', 'sensors', 'info'].includes(commands[0]) || ['open', 'path', 'code'].includes(commands[1])
}

main()
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ Run the following command, to run to benchmark the variability resolving.
yarn benchmark
```

## Licenses
## Dependencies

[license-checker](https://github.com/davglass/license-checker){target=_blank} is used for handling licenses of (transitive) dependencies.
We use [license-checker](https://github.com/davglass/license-checker){target=_blank} for handling licenses of (transitive) dependencies.
To check that (transitive) dependencies are licensed as expected, run the following command.
This check is also executed inside workflows.

```shell linenums="1"
yarn licenses:check
yarn dependencies:check
```


Expand Down
8 changes: 4 additions & 4 deletions docs/docs/contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ To warn the developer, include the following custom marco at the top of the temp

```text linenums="1"
{% raw %}
{{ autogenerated_notice('yarn docs:generate:licenses') }}
{{ autogenerated_notice('yarn docs:generate:dependencies') }}
{% endraw %}
```

This will render the following warning, if the docs are served using `yarn docs:serve` but not when built.

{{ autogenerated_notice('yarn docs:generate:licenses', True) }}
{{ autogenerated_notice('yarn docs:generate:dependencies', True) }}


## Casts
Expand Down Expand Up @@ -117,13 +117,13 @@ This command is also executed during the `release` workflow and, therefore, over
yarn docs:generate:interface
```

## Licenses
## Dependencies

To generate a list of licenses for all (transitive) dependencies, run the following command
This command is also executed during the `release` workflow and, therefore, overwrites respective files.

```shell linenums="1"
yarn docs:generate:licenses
yarn docs:generate:dependencies
```

The list includes information such as package name, version, license, etc. and is written to a CSV file.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ tags:

# Dependencies

{{ autogenerated_notice('yarn docs:generate:licenses') }}
{{ autogenerated_notice('yarn docs:generate:dependencies') }}

We use the following dependencies in production.
You can download the dataset as [CSV](assets/documents/licenses.csv).
You can download the dataset as [CSV](assets/documents/dependencies.csv).
We ensure, that only the licenses [0BSD](https://choosealicense.com/licenses/0bsd){target=_blank}, [Apache-2.0](https://choosealicense.com/licenses/apache-2.0){target=_blank}, [BSD-2-Clause](https://choosealicense.com/licenses/bsd-2-clause){target=_blank}, [BSD-3-Clause](https://choosealicense.com/licenses/bsd-3-clause){target=_blank}, [BlueOak-1.0.0](https://blueoakcouncil.org/license/1.0.0){target=_blank}, [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/){target=_blank}, [CC0-1.0](https://choosealicense.com/licenses/cc0-1.0){target=_blank}, [ISC](https://choosealicense.com/licenses/isc){target=_blank}, [MIT](https://choosealicense.com/licenses/mit){target=_blank}, [PSF](http://docs.python.org/license.html){target=_blank}, [Python-2.0](https://opensource.org/licenses/Python-2.0){target=_blank} are used.

| ID | Dependency | Version | License |
Expand Down
66 changes: 66 additions & 0 deletions docs/docs/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,72 @@ tags:

{{ autogenerated_notice('yarn docs:generate:interface') }}

## vintner info about

general information


=== "CLI"
```shell linenums="1"
vintner info about
```


## vintner info contact

contact us


=== "CLI"
```shell linenums="1"
vintner info contact
```


## vintner info dependencies

dependencies used to implement vintner


=== "CLI"
```shell linenums="1"
vintner info dependencies
```


## vintner info docs

open documentation


=== "CLI"
```shell linenums="1"
vintner info docs
```


## vintner info license

license of vintner


=== "CLI"
```shell linenums="1"
vintner info license
```


## vintner info repo

open repository


=== "CLI"
```shell linenums="1"
vintner info repo
```


## vintner instances adapt

submit sensor data used for adapting the instance
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"git:fix": "git add . && git commit -m fix && git push",
"git:improve-docs": "git add . && git commit -m \"improve docs\" && git push",
"git:open": "open-cli https://github.com/opentosca/opentosca-vintner",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && syncdir src/assets build/assets --quiet",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && syncdir src/assets build/assets --quiet && cp LICENSE build/assets && cp docs/docs/assets/documents/dependencies.csv build/assets",
"package": "pkg --config .pkgrc.json build/cli/index.js",
"deploy": "sudo cp ./dist/vintner-linux-x64 /usr/bin/vintner",
"lint:check": "eslint .",
Expand All @@ -118,7 +118,7 @@
"docs:deploy": "bash docs/cmds/mkdocs gh-deploy --force --strict",
"docs:build:commands": "tsc -p tsconfig.docs.json && tsc-alias -p tsconfig.docs.json && syncdir docs/cmds build-docs/docs/cmds --quiet && syncdir src/assets build-docs/src/assets --quiet && syncdir tests build-docs/tests --quiet",
"docs:generate:interface": "bash docs/cmds/command.sh interface",
"docs:generate:licenses": "bash docs/cmds/command.sh licenses",
"docs:generate:dependencies": "bash docs/cmds/command.sh dependencies",
"docs:generate:tests:variability": "bash docs/cmds/command.sh variability",
"docs:generate:tests:query": "bash docs/cmds/command.sh query",
"docs:generate:sofdcar": "bash docs/cmds/command.sh sofdcar",
Expand All @@ -131,7 +131,7 @@
"docs:export:local": "bash docs/cmds/export/generate.sh http://localhost:8000",
"examples:xopera": "bash examples/xopera-motivation/demo.sh",
"examples:unfurl": "bash examples/unfurl-motivation/demo.sh",
"licenses:check": "license-checker --production --summary --onlyAllow \"MIT;Apache-2.0;Python-2.0;BSD-2-Clause;BSD-3-Clause;ISC;CC-BY-3.0;CC0-1.0;PSF;0BSD;BlueOak-1.0.0\" --excludePackages [email protected]",
"dependencies:check": "license-checker --production --summary --onlyAllow \"MIT;Apache-2.0;Python-2.0;BSD-2-Clause;BSD-3-Clause;ISC;CC-BY-3.0;CC0-1.0;PSF;0BSD;BlueOak-1.0.0\" --excludePackages [email protected]",
"puccini:check": "bash docs/cmds/puccini/check-all.sh",
"puccini:check:single": "bash docs/cmds/puccini/check.sh",
"puml:up": "cd docs && docker-compose up -d",
Expand Down
1 change: 1 addition & 0 deletions src/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not edit this file. This file is overridden during builds.
1 change: 1 addition & 0 deletions src/assets/dependencies.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not edit this file. This file is overridden during builds.
Loading

0 comments on commit bd42cfa

Please sign in to comment.