Skip to content

Commit

Permalink
Merge pull request #57 from sanctuuary/issue-templates
Browse files Browse the repository at this point in the history
Update Contribution Guidelines and Add Issue & PR Templates
  • Loading branch information
kretep committed Mar 11, 2024
2 parents ad0f58c + c161c15 commit 94597fd
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 42 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug Report
about: Create a report to help improve the RESTful APE service
title: '[BUG] '
labels: 'bug'
assignees: vedran-kasalica

---

**Note:** Not all fields are obligatory, but the more details you provide, the easier it will be for us to address the issue. Feel free to omit sections that you feel are not relevant to your report.

## Description
<!-- Provide a clear and concise description of what the bug is. -->

## Endpoint
<!-- Specify the API endpoint(s) involved in the bug. -->

## HTTP Method
<!-- Indicate the HTTP method(s) (GET, POST, PUT, DELETE, etc.) used when the bug occurred. -->

## Request Payload
<!-- If applicable, provide the request payload or parameters. Use code blocks for JSON or other data formats. -->

## Expected Behavior
<!-- Describe what you expected to happen. -->

## Actual Behavior
<!-- Describe what actually happened. Include complete HTTP response status, error messages, screenshots, or logs if possible. -->

## APE Version
<!-- Specify the version of the APE library being used. -->

## Spring Boot Version
<!-- Specify
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature Request
about: Suggest a new feature or enhancement for the RESTful APE service
title: '[FEATURE]'
labels: 'enhancement'
assignees: vedran-kasalica

---

## Feature Description
<!-- Provide a clear and concise description of the feature you're proposing. -->

## Problem Statement
<!-- Describe the problem you are facing or the limitation you wish to address with this feature request. -->

## Proposed Solution
<!-- Detail the solution you'd like to see implemented. Describe how this new feature would work and how it would improve the RESTful APE service. -->

## Alternatives Considered
<!-- Discuss any alternative solutions or features you've considered. Why might these alternatives be less preferable than your proposed solution? -->

## Use Cases
<!-- Provide examples of how this feature would be used. This helps to understand the feature's potential impact and its value to the service. -->

## Additional Context
<!-- Add any other context, examples, or screenshots about the feature request here. This can include potential benefits, how it complements existing functionalities, or reference implementations. -->
43 changes: 43 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Pull Request
about: Propose changes to the RESTful APE project
title: ''
labels: ''
assignees: ''

---

**Note:** Not all fields are obligatory, but the more details you provide, the easier it will be for us to address the issue. Feel free to omit sections that you feel are not relevant to your report.

## Pull Request Description
<!-- Provide a detailed description of the changes you are proposing. Include the problem you are solving or the feature you are adding. -->

## Related Issue(s)
<!-- List any related issues this PR addresses. Use the format `#issue_number` to automatically link them. -->

## Motivation and Context
<!-- Explain why these changes are necessary and what problems they solve. -->

## How Has This Been Tested?
<!-- Describe how you have tested your changes. Include details of your testing environment, tests ran, and any specific setup. -->

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update

## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [ ] My code follows the code style of this project.
- [ ] I have added or updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

## Additional Information
<!-- Include any additional information, configuration details, environment specifics, screenshots, or any other context relevant to the PR. -->

## Screenshots (if applicable)
<!-- If your changes are visual (e.g., OpenAPI documentation), include screenshots here to better explain the impact of your changes. -->

55 changes: 28 additions & 27 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
# Contributing
# Contributing to RESTful APE

Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.
Contributions are welcome and greatly appreciated! Every little bit helps, and credit will always be given.

## Types of Contributions

### Report Bugs

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.

### Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

### Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

### Write Documentation

You can never have enough documentation! Please feel free to contribute to any
part of the documentation, such as the official docs, docstrings, or even
on the web in blog posts, articles, and such.
You can never have enough documentation! Please feel free to contribute to any part of the documentation, such as the official docs, docstrings, or even on the web in blog posts, articles, and such.

### Submit Feedback

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)

## Best Coding Practices for Java and Spring Boot

When contributing code, please ensure it adheres to the following best practices:

- **Follow Java and Spring Boot best practices**: This includes proper use of annotations, configuration management, and exception handling. Utilize Spring's dependency injection to keep your code clean and testable.
- **Code Style**: Adhere to the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) to ensure consistency and readability in the codebase.
- **Documentation**: All public methods and classes should be documented with Javadoc comments. This is crucial for maintainability and for other contributors to understand your code.
- **Testing**: Include unit tests for new features and bug fixes. We use JUnit and Spring Boot Test for testing. Aim for high coverage to ensure quality and prevent regressions.

## Get Started!

Ready to contribute? Here's how to set up `RESTful APE` for local development.
Ready to contribute? Here's how to set up `RESTful APE` for local development:

1. Download a copy of `RESTful APE` locally.
2. **Fork** the `RESTful APE` repo on GitHub
3. **Clone** the project to your own machine
4. Make changes to the code. When you're done making changes, check that your changes conform to any code formatting requirements and pass any tests.
2. **Fork** the `RESTful APE` repo on GitHub.
3. **Clone** the project to your own machine.
4. Make changes to the code. Ensure your changes adhere to the coding practices mentioned above and pass all tests.
5. Commit and push your changes.
6. Open a pull request.


## Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include additional tests if appropriate.
2. If the pull request adds functionality, the docs should be updated.
3. The pull request should work for all currently supported operating systems and versions of Python.
1. The pull request should include tests proving the new feature works or the bug is fixed.
2. If the pull request adds functionality, update the documentation accordingly.
3. Ensure your code changes are compatible with the latest versions of Java and Spring Boot used by the project.

## Code of Conduct

Please note that the `RESTful APE` project is released with a
Code of Conduct. By contributing to this project you agree to abide by its terms.
Please note that the `RESTful APE` project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
![RestAPE Logo](https://user-images.githubusercontent.com/11068408/225042915-416975d6-56c9-40d3-97b9-e2854cc19a1c.png#gh-dark-mode-only)
![RestAPE Logo](https://user-images.githubusercontent.com/11068408/225042428-824741e2-9618-413c-9546-bc352b3bb23b.png#gh-light-mode-only)

<img src="https://raw.githubusercontent.com/sanctuuary/.github/main/logos/RESTful-APE-dark-logo.png#gh-dark-mode-only" alt="RestAPE Logo" style="width: 80%;">
<img src="https://raw.githubusercontent.com/sanctuuary/.github/main/logos/RESTful-light-logo.png#gh-light-mode-only" alt="RestAPE Logo" style="width: 80%;">

| Badges | |
|:----:|----|
| **Fairness** | [![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/8082/badge)](https://www.bestpractices.dev/projects/8082) |
| **Packages and Releases** | [![Latest release](https://img.shields.io/github/release/sanctuuary/RESTAPE.svg)](https://github.com/sanctuuary/APE/releases/latest) [![Static Badge](https://img.shields.io/badge/RSD-RESTfulAPE-ape)](https://research-software-directory.org/software/restape) |
| **Build Status** | ![build](https://github.com/sanctuuary/RestAPE/actions/workflows/maven.yml/badge.svg) [![CodeQL](https://github.com/sanctuuary/restape/actions/workflows/codeql.yml/badge.svg)](https://github.com/sanctuuary/restape/actions/workflows/codeql.yml) |
| **Documentation** | [![Documentation Status](https://readthedocs.org/projects/ape-framework/badge/?version=latest)](https://ape-framework.readthedocs.io/en/latest/docs/restful-ape/introduction.html) |
| **DOI** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10048236.svg)](https://doi.org/10.5281/zenodo.10048236) |
| **License** | [![GitHub license](https://img.shields.io/github/license/sanctuuary/RESTAPE)](https://github.com/sanctuuary/RESTAPE/blob/master/LICENSE) |



A RESTful API for the APE library (RESTful APE) provides a way for users to interact with APE's automated pipeline exploration capabilities through HTTP requests. APE is a command line tool and Java API that automates the exploration of possible computational pipelines from large collections of computational tools.

The RESTful API allows users to submit requests to the APE server for pipeline exploration, which returns results in a standard format such as JSON or XML. Users can interact with APE through a web browser or any other HTTP client, and the API can be integrated into other applications for seamless pipeline exploration.
Expand All @@ -34,9 +32,8 @@ and then run the jar package

`java -jar target/restape-[version].jar`



OpenAPI documentation is available at

````
[host]:[port]]/swagger-ui/index.html
````
Expand All @@ -48,11 +45,14 @@ you can install APE in your local repository and use it to build the back-end.
To do so, [download](https://github.com/sanctuuary/APE#releases)
or [compile](https://github.com/sanctuuary/APE#build-ape-from-source-using-maven) the APE version you wish to use.
In the location where you have the resulting APE.jar file, run the following command:

````shell
$ mvn install:install-file -Dfile=APE-<version>.jar
mvn install:install-file -Dfile=APE-<version>.jar
````

This adds the specified APE file to your local Maven repository.
You can now build the back-end using:

````shell
$ mvn package -DskipTests=true
mvn package -DskipTests=true
````
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>nl.esciencecenter</groupId>
<artifactId>restape</artifactId>
<version>0.3.1</version>
<version>0.3.2</version>
<name>restape</name>
<description>RESTful API for the APE library</description>
<licenses>
Expand Down Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>3.2.2</version>
<version>3.2.3</version>
</dependency>

<dependency>
Expand All @@ -61,14 +61,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>3.2.2</version>
<version>3.2.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>3.2.2</version>
<version>3.2.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation -->
Expand All @@ -85,6 +85,7 @@
<version>2.2.224</version>
<scope>runtime</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/io.github.sanctuuary/APE -->
<dependency>
<groupId>io.github.sanctuuary</groupId>
Expand All @@ -103,7 +104,7 @@
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>23.0.2</version>
<version>23.0.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/nl/esciencecenter/RestapeApplication.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
package nl.esciencecenter;

import java.util.Collections;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.servers.Server;

/**
* The main class for the RESTful APE API.
*
* @version 0.3.0
*/
@SpringBootApplication
@OpenAPIDefinition(info = @Info(title = "RestApe API", version = "0.3.0", description = "RESTfull API for the APE (Automated Pipeline Explorer) library."), servers = @Server(url = "http://localhost:4444", description = "Local server"))
public class RestapeApplication {

private static final Logger log = LoggerFactory.getLogger(RestapeApplication.class);

public static void main(String[] args) {
SpringApplication.run(RestapeApplication.class, args);
SpringApplication app = new SpringApplication(RestapeApplication.class);

app.setDefaultProperties(Collections.singletonMap("server.port", "4444"));
log.info("Starting RestApe API server...");
app.run(args);
}

}

0 comments on commit 94597fd

Please sign in to comment.