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

Documentation about our development process #82

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# apple
.DS_Store

# vscode
.vscode/settings.json

# Logs
logs
*.log
Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"biomejs.biome",
"svelte.svelte-vscode"
]
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"editor.insertSpaces": false
"editor.tabSize": 2, // Set the number of spaces per tab
michelguerin marked this conversation as resolved.
Show resolved Hide resolved
"editor.insertSpaces": false, // Use tabs for indentation
"editor.formatOnSave": true, // Automatically format the document on save
"editor.defaultFormatter": null, // Use the built-in formatter
// Svelte settings
"svelte.plugin.svelte.format.enable": true, // Enable Svelte formatting
"svelte.plugin.svelte.format.config.singleQuote": true, // Use single quotes
}
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should discuss this in the team and see if it is compatible with the project.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is a proposition for these Open Source project base files ;)


## Our Pledge

We as members, contributors, and leaders pledge to make participation in 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.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**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.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**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.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**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.

### 4. Permanent Ban

**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.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

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.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# How to contribute

A high-level overview of how the documentation is organized will help you know where to look for certain things:

* [☑ How-Tos](#how-tos) guide you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how the plugins work.
* [👷 Guides](#guides) describe best practices and principles we follow.
* [🗃 References](#references) contain technical reference for APIs and other aspects of the plugins. They describe how it works and how to use it but assume that you have a basic understanding of key concepts.
* [👩‍🏫 Explanations](#explanations) about the architecture and general design of the project

## ☑ How-Tos

* [Setup Project](./doc//how-to/setup.md)

## 👷 Guides

* [Documentation Guidelines](./doc/guidelines/doc_guidelines.md)
* [Documentation Style Guide](./doc/guidelines/doc_styleguide.md)
* [Code Style guidelines](./doc/guidelines/code_style.md)
* [Development process](./doc/guidelines/dev_process.md)

## 👩‍🏫 Explanations
* [1. Record architecture decisions](./doc/adr/0001-record-architecture-decisions.md)
* [2. Use Monorepo-Polypackage Setup](./doc/adr/0002-use-monorepo-polypackage-setup.md)
* [3. Release Process](./doc/adr/0003-release-process.md)


## 🗃 References

* [Release Process](./doc/references/architecture/release-process.md)
27 changes: 4 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,11 @@

This repository contains plugins for the [OpenSCD ↗](https://github.com/openscd/open-scd) project.

## Documentation

A high-level overview of how the documentation is organized will help you know where to look for certain things:
## Contribution

- [☑ How-Tos](#how-tos) guide you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how the plugins work.
- [👷 Guides](#guides) describe best practices and principles we follow.
- [🗃 References](#references) contain technical reference for APIs and other aspects of the plugins. They describe how it works and how to use it but assume that you have a basic understanding of key concepts.
- [👩‍🏫 Explanations](#explanations) about the architecture and general design of the project
Check out our [contributing guidelines](/CONTRIBUTING.md) for ways to contribute.

## ☑ How-Tos
## License

- [Setup Project](./doc//how-to/setup.md)

## 👷 Guides

- [Documentation Guidelines](./doc/guidelines/doc_guidelines.md)
- [Documentation Style Guide](./doc/guidelines/doc_styleguide.md)

## 👩‍🏫 Explanations
- [1. Record architecture decisions](./doc/adr/0001-record-architecture-decisions.md)
- [2. Use Monorepo-Polypackage Setup](./doc/adr/0002-use-monorepo-polypackage-setup.md)
- [3. Release Process](./doc/adr/0003-release-process.md)


## 🗃 References

- [Release Process](./doc/references/architecture/release-process.md)
Content is released under the [Apache License Version 2.0](/LICENSE).
27 changes: 4 additions & 23 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,11 @@

This repository contains plugins for the [OpenSCD ↗](https://github.com/openscd/open-scd) project.

## Documentation

A high-level overview of how the documentation is organized will help you know where to look for certain things:
## Contribution

- [☑ How-Tos](#how-tos) guide you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how the plugins work.
- [👷 Guides](#guides) describe best practices and principles we follow.
- [🗃 References](#references) contain technical reference for APIs and other aspects of the plugins. They describe how it works and how to use it but assume that you have a basic understanding of key concepts.
- [👩‍🏫 Explanations](#explanations) about the architecture and general design of the project
Check out our [contributing guidelines](/CONTRIBUTING.md) for ways to contribute.

## ☑ How-Tos
## License

- [Setup Project](./doc//how-to/setup.md)

## 👷 Guides

- [Documentation Guidelines](./doc/guidelines/doc_guidelines.md)
- [Documentation Style Guide](./doc/guidelines/doc_styleguide.md)

## 👩‍🏫 Explanations
- [1. Record architecture decisions](./doc/adr/0001-record-architecture-decisions.md)
- [2. Use Monorepo-Polypackage Setup](./doc/adr/0002-use-monorepo-polypackage-setup.md)
- [3. Release Process](./doc/adr/0003-release-process.md)


## 🗃 References

- [Release Process](./doc/references/architecture/release-process.md)
Content is released under the [Apache License Version 2.0](/LICENSE).
55 changes: 55 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 4
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
},
"ignore": [
"**/*.cjs",
"**/dist",
"**/.DS_Store",
"**/node_modules",
"**/.svelte-kit",
"**/.env",
"**/.env.*",
"**/pnpm-lock.yaml",
"**/package-lock.json",
"**/yarn.lock"
]
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "none"
}
},
"json": {
"formatter": {
"enabled": true
}
},
"overrides": [
{
"include": ["*.svelte"]
}
]
}
70 changes: 70 additions & 0 deletions doc/adr/0004-structure-convention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 4. Structure convention

Date: 2024-09-24

## Status

Accepted

## Context

The core packages gains more and more logic, we need a way to have small piece of code that are easily maintainable.

## Decision

### Domain Driven
Code is split by domain. Each domain will have its own directory, and within each directory, the code will be further organized by functionality. This structure will help in maintaining a clean and manageable codebase.

### Naming Convention

To maintain consistency across the codebase, we will adopt a clear and concise naming convention. All files and directories will use `kebab-case` for their names. Except for main or index file, each file will be named using the format `name-of-file.name-of-folder.ts`, ensuring uniformity and readability.

#### Examples

- Directories: `data-type-templates`
- Files: `queries.data-type-templates.ts`

It goes the same way for `service` or `utility` files : `service.data-type-templates.ts`

### Type Declaration Files

Type declaration files are special TypeScript files that end with the `.d.ts` extension. These files are used exclusively for declaring types and do not contain any executable code. By using `.d.ts` files, we ensure that type definitions are centralized, easily accessible, and separate from implementation code. These files should remains next to the domain, like the others.

#### Examples

- `types.data-type-templates.d.ts`: Contains type definitions related to data type templates. (inside the `data-type-templates` folder)
- `types.scd-queries.d.ts`: Contains type definitions related to SCD queries. (inside the `scd-queries` folder)

This approach promotes better type management and reduces redundancy, contributing to a more organized and maintainable codebase.


#### Directory Structure

The proposed directory structure is as follows:

```
/src
/domain1
/featureA
/featureB
/domain2
/featureC
/featureD
```

### Benefits

- **Modularity**: Each domain and feature can be developed and tested independently.
- **Scalability**: New domains and features can be added without affecting existing code.
- **Maintainability**: Easier to locate and fix bugs or add new functionality.

### Drawbacks

- **Initial Setup**: Requires initial effort to set up the directory structure.
- **Learning Curve**: New developers may need time to understand the structure.

## Consequences

Adopting this structure will require refactoring existing code to fit into the new directories. However, the long-term benefits of a more organized and maintainable codebase outweigh the initial setup costs.


Loading