Skip to content

Commit

Permalink
TP4 exercices: Open Source (#120)
Browse files Browse the repository at this point in the history
* TP4.md open-source part

* Added CONTRIBUTING.md, CODE_OF_CONDUCT.md, LICENSE and updated TP4 exercises part of open source

* Badges changes, GitHub actions badge not working cause maybe repo is not public. To confirm if I can put samiusss as the owner in the links

* details added and deleted

* mergee
  • Loading branch information
samiusss authored May 1, 2024
1 parent a227f17 commit 7cfc93a
Show file tree
Hide file tree
Showing 5 changed files with 262 additions and 118 deletions.
62 changes: 62 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Restalo Code of conduct

## Our pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our collective
and 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.

## Our standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* 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

Examples of unacceptable behavior by participants include:

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

## Our responsibilities

The Restalo project maintainers are responsible for the clarity of the information they provide
and are expected to take appropriate and fair corrective action in response to
any instances of unacceptable behavior.

The Restalo 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.

Three strikes will be given to any contributor who does not follow the code of
conduct, with the third strike resulting in a permanent ban from the community.

## Scope

Since there is no physical event linked to the project Restalo, the code of conduct will
apply to all interactions between members of the community, including but not
limited to:

* The use of the project’s code repositories
* The use of the project’s communication channels


## Attribution

This Restalo code of conduct is inspired from the [Contributor Covenant][homepage],
version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to Restalo

First off, thank you for considering contributing to Restalo. It's people like you that make Restalo such a great tool.

## Code of Conduct

This project and everyone participating in it is governed by the [Restalo Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).

## How Can I Contribute?

### Reporting Bugs

This section guides you through submitting a bug report for Restalo. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report).

#### Before Submitting A Bug Report

* **Perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aissue+archived%3Afalse+sort%3Aupdated-desc+user%3ARestalo+)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.

#### How Do I Submit A Good Bug Report?

Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#before-submitting-a-bug-report) your bug is related to, create an issue on that repository and provide the following information by filling in [the template](.github/ISSUE_TEMPLATE/bug_report.md).

Explain the problem and include additional details to help maintainers reproduce the problem:

* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started the Restalo, e.g. which command exactly you used in the terminal, or how you started Restalo otherwise. When listing steps, **don't just say what you did, but explain how you did it**.
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.

### Pull Requests

The process described here has several goals:

- Maintain Restalo's quality
- Fix problems that are important to users
- Engage the community in working toward the best possible Restalo
- Enable a sustainable system for Restalo's maintainers to review contributions

Please follow these steps to have your contribution considered by the maintainers:

1. Make sure you are following all the guidelines in the [code of conduct](.github/CODE_OF_CONDUCT.md)
2. After you submit your pull request, verify that all status checks are passing <details><summary>What if the status checks are failing?</summary>If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.</details>
3. While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

## Any questions?

Don't hesitate to ask! Open an issue and we'll do our best to help you out.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2024] [Restalo]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
70 changes: 48 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,76 @@
# Projet - Restalo
# Restalo

Le meilleur logiciel de réservation en restauration!
Restalo is an API for managing restaurant reservations. It provides functionalities for creating and managing
reservations, searching for restaurants and reservations, and reviewing restaurants.

## Requis
[![Java](https://img.shields.io/badge/java-21-blue)](https://www.oracle.com/java/technologies/javase-jdk21-downloads.html)
[![junit](https://img.shields.io/badge/junit-4.13.2-blue)](https://junit.org/junit4/)
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven/apache-maven.svg)](https://maven.apache.org)
[![Known Vulnerabilities](https://snyk.io/test/github/samiusss/restalo/badge.svg)](https://snyk.io/test/github/samiusss/restalo)
[![GitHub Actions](https://github.com/samiusss/restalo/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/samiusss/restalo/actions)
[![Checkstyle](https://img.shields.io/badge/checkstyle-8.45-blue)](https://checkstyle.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing
purposes.

### Prerequisites

- Java 21
- Maven 3.x

## Commandes
### Installation

### Compilation
Clone the repository:

```
mvn compile
```bash
git clone https://github.com/username/restalo.git
cd restalo
```

### Exécution
Build the project:

```bash
mvn clean install
```
mvn exec:java

Run the project:

```bash
mvn spring-boot:run
```

### Run Docker Image
Docker build image

```bash
docker build -t restalo .
```

Docker run image

```bash
docker compose up -d
```

### Stop Docker Image
Docker stop image

```
```bash
docker compose down -v
```

### Choose persistence

```
In SystemProperty, choose the persistence with -Dpersistence=... (mongo or inmemory)
```
## Open Source files

### For conecting to the database
For more information about the project and how to contribute, please refer to the following files:

```
Create a mongo username and password though the Edit Configuration window,
and connect with the URL structure provided.
```
- [CONTRIBUTING](CONTRIBUTING.md)
- [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)
- [LICENSE](LICENSE)

## License

This project is lisenced under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

Thanks to all contributors who participated in this project and helped make it better.
Loading

0 comments on commit 7cfc93a

Please sign in to comment.