Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial project setup - add documents and build workflow #5

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Bug Report
about: Create a bug report to help us improve
labels: bug
---

<!-- Please provide a detailed description of the bug and provide any additional information available. -->
<!-- Additional information can be in the form of logs, screenshots, screencasts. -->

5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://github.com/eclipse-emfcloud/emfcloud/discussions
about: Please ask questions on the EMF Cloud discussions page.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
labels: enhancement
---

<!-- Is your feature request related to a problem? Please describe -->
<!-- Describe the solution you'd like -->
<!-- Describe alternatives you've considered -->
67 changes: 67 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
pull_request:
paths:
- 'examples/**'
- 'ext/**'
- 'npm/**'
- '.github/workflows/build-ci.yml'
- '!**/*.md'
push:
branches:
- main
paths:
- 'examples/**'
- 'ext/**'
- 'npm/**'
- '.github/workflows/build-ci.yml'
- '!**/*.md'

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup Node 20
uses: actions/[email protected]
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install tools and libraries
run: sudo apt-get install -y build-essential libx11-dev libxkbfile-dev libsecret-1-dev

- name: Use Python 3.11
uses: actions/[email protected]
with:
python-version: '3.11'

- name: Install and Build
shell: bash
run: |
yarn global add node-gyp
yarn --skip-integrity-check --network-timeout 100000
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build example applications
run: |
yarn browser build
yarn electron build
env:
NODE_OPTIONS: --max_old_space_size=4096

- name: Lint with ESLint
run: yarn lint

- name: Run tests
run: yarn test
71 changes: 71 additions & 0 deletions .github/workflows/publish-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Publish ModelHub Packages

on:
workflow_run:
workflows: ['CI']
types:
- completed
branches: [main]
workflow_dispatch:

permissions:
contents: write
packages: write

jobs:
verify-and-publish:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 0 # pulls all history and tags for Lerna to detect which packages changed

- name: Setup Node 20
uses: actions/[email protected]
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install tools and libraries
run: sudo apt-get install -y build-essential libx11-dev libxkbfile-dev libsecret-1-dev

- name: Use Python 3.11
uses: actions/[email protected]
with:
python-version: '3.11'

- name: Install and Build
shell: bash
run: |
yarn global add node-gyp
yarn --skip-integrity-check --network-timeout 100000
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build example applications
run: |
yarn browser build
yarn electron build
env:
NODE_OPTIONS: --max_old_space_size=4096

- name: Lint with ESLint
run: yarn lint

- name: Run tests
run: yarn test

# Publish the ModelHub packages. Ignore lifecycle scripts and add verbose logging
# Scripts are ignored because we build and lint before this step
- name: Publish packages
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
yarn lerna publish -y --ignore-scripts --loglevel=verbose
env:
NPM_CONFIG_PROVENANCE: 'true'
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "davidanson.vscode-markdownlint", "aeschli.vscode-css-formatter"],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
66 changes: 66 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// If one would like to add/remove/modify user preferences without modifying the content of the
// workspace settings file, then one would need to modify the `settings.json` under here:
// - Windows: %APPDATA%\Code\User\settings.json
// - Linux: $HOME/.config/Code/User/settings.json
// - Mac: $HOME/Library/Application Support/Code/User/settings.json
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.validate": ["javascript", "javascriptreact", "html", "typescript", "typescriptreact"],
"prettier.prettierPath": "node_modules/prettier",
"search.exclude": {
"**/node_modules": true,
"**/lib": true
},
"task.autoDetect": "off",
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsons]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"markdownlint.config": {
"no-inline-html": {
"allowed_elements": [
"br",
"details",
"kbd",
"summary"
]
},
"MD007": {
"indent": 4
},
"MD029": false,
"MD030": {
"ul_single": 3,
"ul_multi": 3
},
"MD046": false
}
}
94 changes: 94 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Community Code of Conduct

**Version 2.0
January 1, 2023**

## Our Pledge

In the interest of fostering an open and welcoming environment, we as community members, contributors, Committers[^1], and Project Leads (collectively "Contributors") pledge to make participation in our projects and our community a harassment-free and inclusive experience for everyone.

This Community Code of Conduct ("Code") outlines our behavior expectations as members of our community in all Eclipse Foundation activities, both offline and online. It is not intended to govern scenarios or behaviors outside of the scope of Eclipse Foundation activities. Nor is it intended to replace or supersede the protections offered to all our community members under the law. Please follow both the spirit and letter of this Code and encourage other Contributors to follow these principles into our work. Failure to read or acknowledge this Code does not excuse a Contributor from compliance with the Code.

## Our Standards

Examples of behavior that contribute to creating a positive and professional environment include:

- Using welcoming and inclusive language;
- Actively encouraging all voices;
- Helping others bring their perspectives and listening actively. If you find yourself dominating a discussion, it is especially important to encourage other voices to join in;
- Being respectful of differing viewpoints and experiences;
- Gracefully accepting constructive criticism;
- Focusing on what is best for the community;
- Showing empathy towards other community members;
- Being direct but professional; and
- Leading by example by holding yourself and others accountable

Examples of unacceptable behavior by Contributors include:

- The use of sexualized language or imagery;
- Unwelcome sexual attention or advances;
- Trolling, insulting/derogatory comments, and personal or political attacks;
- Public or private harassment, repeated harassment;
- Publishing others' private information, such as a physical or electronic address, without explicit permission;
- Violent threats or language directed against another person;
- Sexist, racist, or otherwise discriminatory jokes and language;
- Posting sexually explicit or violent material;
- Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history;
- Personal insults, especially those using racist or sexist terms;
- Excessive or unnecessary profanity;
- Advocating for, or encouraging, any of the above behavior; and
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

With the support of the Eclipse Foundation employees, consultants, officers, and directors (collectively, the "Staff"), Committers, and Project Leads, the Eclipse Foundation Conduct Committee (the "Conduct Committee") is responsible for clarifying the standards of acceptable behavior. The Conduct Committee takes appropriate and fair corrective action in response to any instances of unacceptable behavior.

## Scope

This Code applies within all Project, Working Group, and Interest Group spaces and communication channels of the Eclipse Foundation (collectively, "Eclipse spaces"), within any Eclipse-organized event or meeting, and in public spaces when an individual is representing an Eclipse Foundation Project, Working Group, Interest Group, or their communities. Examples of representing a Project or community include posting via an official social media account, personal accounts, or acting as an appointed representative at an online or offline event. Representation of Projects, Working Groups, and Interest Groups may be further defined and clarified by Committers, Project Leads, or the Staff.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Conduct Committee via [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Without the explicit consent of the reporter, the Conduct Committee is obligated to maintain confidentiality with regard to the reporter of an incident. The Conduct Committee is further obligated to ensure that the respondent is provided with sufficient information about the complaint to reply. If such details cannot be provided while maintaining confidentiality, the Conduct Committee will take the respondent‘s inability to provide a defense into account in its deliberations and decisions. Further details of enforcement guidelines may be posted separately.

Staff, Committers and Project Leads have the right to report, remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code, or to block temporarily or permanently any Contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Any such actions will be reported to the Conduct Committee for transparency and record keeping.

Any Staff (including officers and directors of the Eclipse Foundation), Committers, Project Leads, or Conduct Committee members who are the subject of a complaint to the Conduct Committee will be recused from the process of resolving any such complaint.

## Responsibility

The responsibility for administering this Code rests with the Conduct Committee, with oversight by the Executive Director and the Board of Directors. For additional information on the Conduct Committee and its process, please write to <[email protected]>.

## Investigation of Potential Code Violations

All conflict is not bad as a healthy debate may sometimes be necessary to push us to do our best. It is, however, unacceptable to be disrespectful or offensive, or violate this Code. If you see someone engaging in objectionable behavior violating this Code, we encourage you to address the behavior directly with those involved. If for some reason, you are unable to resolve the matter or feel uncomfortable doing so, or if the behavior is threatening or harassing, please report it following the procedure laid out below.

Reports should be directed to <[email protected]>. It is the Conduct Committee’s role to receive and address reported violations of this Code and to ensure a fair and speedy resolution.

The Eclipse Foundation takes all reports of potential Code violations seriously and is committed to confidentiality and a full investigation of all allegations. The identity of the reporter will be omitted from the details of the report supplied to the accused. Contributors who are being investigated for a potential Code violation will have an opportunity to be heard prior to any final determination. Those found to have violated the Code can seek reconsideration of the violation and disciplinary action decisions. Every effort will be made to have all matters disposed of within 60 days of the receipt of the complaint.

## Actions

Contributors who do not follow this Code in good faith may face temporary or permanent repercussions as determined by the Conduct Committee.

This Code does not address all conduct. It works in conjunction with our [Communication Channel Guidelines](https://www.eclipse.org/org/documents/communication-channel-guidelines/), [Social Media Guidelines](https://www.eclipse.org/org/documents/social_media_guidelines.php), [Bylaws](https://www.eclipse.org/org/documents/eclipse-foundation-be-bylaws-en.pdf), and [Internal Rules](https://www.eclipse.org/org/documents/ef-be-internal-rules.pdf) which set out additional protections for, and obligations of, all contributors. The Foundation has additional policies that provide further guidance on other matters.

It’s impossible to spell out every possible scenario that might be deemed a violation of this Code. Instead, we rely on one another’s good judgment to uphold a high standard of integrity within all Eclipse Spaces. Sometimes, identifying the right thing to do isn’t an easy call. In such a scenario, raise the issue as early as possible.

## No Retaliation

The Eclipse community relies upon and values the help of Contributors who identify potential problems that may need to be addressed within an Eclipse Space. Any retaliation against a Contributor who raises an issue honestly is a violation of this Code. That a Contributor has raised a concern honestly or participated in an investigation, cannot be the basis for any adverse action, including threats, harassment, or discrimination. If you work with someone who has raised a concern or provided information in an investigation, you should continue to treat the person with courtesy and respect. If you believe someone has retaliated against you, report the matter as described by this Code. Honest reporting does not mean that you have to be right when you raise a concern; you just have to believe that the information you are providing is accurate.

False reporting, especially when intended to retaliate or exclude, is itself a violation of this Code and will not be accepted or tolerated.

Everyone is encouraged to ask questions about this Code. Your feedback is welcome, and you will get a response within three business days. Write to <[email protected]>.

## Amendments

The Eclipse Foundation Board of Directors may amend this Code from time to time and may vary the procedures it sets out where appropriate in a particular case.

### Attribution

This Code was inspired by the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).

[^1]: Capitalized terms used herein without definition shall have the meanings assigned to them in the Bylaws.
Loading