Skip to content

Commit 1377684

Browse files
committed
Project bootstrap
0 parents  commit 1377684

33 files changed

+3864
-0
lines changed

.eslintrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
}
13+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.vscode/*
2+
!.vscode/extensions.json
3+
!.vscode/launch.json
4+
!.vscode/tasks.json
5+
node_modules/
6+
out/
7+
syntaxes/
8+
src/language/generated/

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
"langium.langium-vscode"
8+
]
9+
}

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": [
14+
"${workspaceFolder}/examples/",
15+
"--extensionDevelopmentPath=${workspaceFolder}"
16+
]
17+
},
18+
{
19+
"name": "Attach to Language Server",
20+
"type": "node",
21+
"port": 6009,
22+
"request": "attach",
23+
"skipFiles": [
24+
"<node_internals>/**"
25+
],
26+
"sourceMaps": true,
27+
"outFiles": [
28+
"${workspaceFolder}/out/**/*.js",
29+
"${workspaceFolder}/node_modules/langium"
30+
]
31+
}
32+
]
33+
}

.vscode/tasks.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build swdc-ml",
8+
"command": "npm run langium:generate && npm run build",
9+
"type": "shell",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"detail": "Langium: Generate grammar and build the swdc language",
15+
"icon": {
16+
"color": "terminal.ansiGreen",
17+
"id": "server-process"
18+
}
19+
}
20+
]
21+
}

.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
langium-quickstart.md

CODE_OF_CONDUCT.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
# Code of Conduct
3+
4+
5+
## Short Version
6+
We as members, contributors, and leaders pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
7+
8+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
9+
10+
## Need Help?
11+
If ANY behavior makes you uncomfortable, or you believe it breaches the intent of this code of conduct, please contact a project maintainer:
12+
13+
* [Sergio Morales](https://github.com/tirafrutas/) (he/him)
14+
15+
---
16+
17+
## Long Version
18+
19+
As contributors and maintainers in this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
20+
21+
We are committed to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
22+
23+
## Our Standards
24+
25+
Examples of behavior that contributes to creating a positive environment include:
26+
27+
* Demonstrating empathy and kindness toward other people
28+
* Using welcoming and inclusive language
29+
* Being respectful of differing viewpoints and experiences
30+
* Giving and gracefully accepting constructive feedback
31+
* Focusing on what is best for the community
32+
* Showing empathy towards other community members
33+
34+
Examples of unacceptable behavior by participants include:
35+
36+
* Violent threats or language directed against another person.
37+
* Sexist, racist, or otherwise discriminatory jokes and language.
38+
* Trolling, insulting/derogatory comments, and personal or political attacks
39+
* Public or private harassment
40+
* Publishing others' private information, such as a physical or electronic
41+
address, without explicit permission
42+
* Other conduct which could reasonably be considered inappropriate in a
43+
professional setting
44+
45+
## Enforcement Responsibilities
46+
47+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
48+
49+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all project spaces, including contributors, maintainers, administrators, and any kind of participant in the project.
54+
55+
Project maintainers will enforce this code at all times. We expect cooperation from all participants to ensure a safe environment for everyone.
56+
57+
The Code of Conduct, and the project leaders, can only address behavior in the present, not past behavior or fears of what someone might do based on past behavior.
58+
59+
## Enforcement
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
61+
reported by contacting the project maintainers at:
62+
63+
* [Sergio Morales](https://github.com/tirafrutas/) (he/him)
64+
65+
Complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
66+
67+
The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
68+
69+
Project maintainers who do not follow or enforce the Code of Conduct in good
70+
faith may face temporary or permanent repercussions as determined by other
71+
members of the project's leadership.
72+
73+
## Enforcement Guidelines
74+
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
75+
76+
### 1. Correction
77+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
80+
81+
### 2. Warning
82+
**Community Impact**: A violation through a single incident or series of actions.
83+
84+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
85+
86+
### 3. Temporary Ban
87+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
88+
89+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
90+
91+
### 4. Permanent Ban
92+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
93+
94+
**Consequence**: A permanent ban from any sort of public interaction within the community.
95+
96+
## Attribution
97+
98+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct/
99+
100+
Community Impact Guidelines were inspired by [Mozilla’s code of conduct enforcement ladder](https://github.com/mozilla/diversity).
101+
102+
[homepage]: https://www.contributor-covenant.org
103+
104+
For answers to common questions about this code of conduct, see
105+
https://www.contributor-covenant.org/faq

GOVERNANCE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Project Governance
3+
4+
The development and community management of the project will follow the governance rules described in this document.
5+
6+
## Project Maintainers
7+
8+
Project maintainers have admin access to the GitHub repository. The team of project maintainer is the following:
9+
10+
* [Sergio Morales](https://github.com/tirafrutas/)
11+
12+
## Project Collaborators & Contributors
13+
14+
Any member willing to participate in the development of the project will be considered as a collaborator.
15+
16+
Collaborators may propose changes to the project's source code. The mechanism to propose such a change is a GitHub pull request. A collaborator proposing a pull request is considered a contributor. Project maintainers will review and merge pull requests.
17+
18+
## Issue governance
19+
20+
Both collaborators and project maintainers may propose issues. The participation in the issue discussion is open and must follow the [Code of Conduct](CODE_OF_CONDUCT.md).
21+
22+
The group of project maintainers will be responsible for assigning labels to issues, as well as assign the issue to a project maintainer or contributor.
23+
24+
The group of project maintainers commit to give an answer to any issue in a period of time of 48 hours.
25+
26+
## Pull Request governance
27+
28+
Both collaborators and project maintainers may propose pull requests. When a collaborator proposes a pull request, is considered contributor.
29+
30+
Pull requests should comply with the template provided. The assignment of labels and assignees to the pull request is the responsibility of the project maintainers.
31+
32+
The group of project maintainers commit to give an answer to any pull request in a period of time of 48 hours.
33+
34+
The decision of accepting (or rejecting) a pull request will be taken by the group of project maintainers. The decision will be based on the following criteria:
35+
36+
* One project maintainer must approve a pull request before the pull request can be merged.
37+
* Approving a pull request indicates that the contributor accepts responsibility for the change.
38+
* If a project maintainer opposes a pull request, the pull request cannot be merged (i.e., _veto_ behavior). Often, discussions or further changes result in collaborators removing their opposition.

LICENSE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
MIT License
3+
4+
Copyright (c) 2023 SOM Research Lab
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Software Diversity Card
2+
3+
TBC.
4+
5+
## Repository Structure
6+
7+
The following tree shows the list of the repository's relevant sections:
8+
9+
- The *examples* folders contains an example of a software diveristy card created using the DSL.
10+
- The *src* folder contains the project's source code:
11+
- The *cli* folder is the generated grammar and AST from Langium. You may not want to dive in it as it is a generated asset.
12+
- The *extension* folder contains all the code of the generation service. Could be a good place to start if you want to improve the generation of the tool.
13+
- The *language* folder contains all the language features, and the grammar declaration. If you want to improve the grammar, or some of the features the plugin offers here is the place you may want to start.
14+
15+
## Usage: Defining Software Diversity Cards
16+
17+
TBC.
18+
19+
An example of grammar instance for a software diversity card would be: MISSING LINK.
20+
21+
## Contributing
22+
23+
This project is being development as part of a research line of the [SOM Research Lab](https://som-research.github.io/), but we are open to contributions from the community. If you are interested in contributing to this project, please read the [GOVERNANCE.md](GOVERNANCE.md) document.
24+
25+
At SOM Research Lab we are dedicated to creating and maintaining welcoming, inclusive, safe, and harassment-free development spaces. Anyone participating will be subject to and agrees to sign on to our [code of conduct](CODE_OF_CONDUCT.md).
26+
27+
## Publications
28+
29+
This repository is the companion to the following research paper:
30+
31+
> MISSING LINK
32+
33+
## License
34+
35+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36+
37+
The source code for the site is licensed under the MIT License, which you can find in the LICENSE.md file.
38+
39+
All graphical assets are licensed under the
40+
[Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/).

bin/cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
import '../out/cli/main.js';
4+
//require("../out/cli").default();

esbuild.mjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
//@ts-check
2+
import * as esbuild from 'esbuild';
3+
4+
const watch = process.argv.includes('--watch');
5+
const minify = process.argv.includes('--minify');
6+
7+
const success = watch ? 'Watch build succeeded' : 'Build succeeded';
8+
9+
function getTime() {
10+
const date = new Date();
11+
return `[${`${padZeroes(date.getHours())}:${padZeroes(date.getMinutes())}:${padZeroes(date.getSeconds())}`}] `;
12+
}
13+
14+
function padZeroes(i) {
15+
return i.toString().padStart(2, '0');
16+
}
17+
18+
const plugins = [{
19+
name: 'watch-plugin',
20+
setup(build) {
21+
build.onEnd(result => {
22+
if (result.errors.length === 0) {
23+
console.log(getTime() + success);
24+
}
25+
});
26+
},
27+
}];
28+
29+
const ctx = await esbuild.context({
30+
// Entry points for the vscode extension and the language server
31+
entryPoints: ['src/extension/main.ts', 'src/language/main.ts'],
32+
outdir: 'out',
33+
bundle: true,
34+
target: "ES2017",
35+
// VSCode's extension host is still using cjs, so we need to transform the code
36+
format: 'cjs',
37+
// To prevent confusing node, we explicitly use the `.cjs` extension
38+
outExtension: {
39+
'.js': '.cjs'
40+
},
41+
loader: { '.ts': 'ts' },
42+
external: ['vscode'],
43+
platform: 'node',
44+
sourcemap: !minify,
45+
minify,
46+
plugins
47+
});
48+
49+
if (watch) {
50+
await ctx.watch();
51+
} else {
52+
await ctx.rebuild();
53+
ctx.dispose();
54+
}

examples/example.swdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
deploymentContext contextUno
2+
socialContext socialUno
3+
description: 'chumpinflas'
4+
region: 'US'
5+
spokenLanguages: ['en-US', 'es-US']
6+
culturalTraits: ['una', 'dos', 'tres']

0 commit comments

Comments
 (0)