From bad9674c1b98e58c6284b83ad2609a5d3a956d51 Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Wed, 28 Feb 2024 14:46:37 +0100 Subject: [PATCH 01/10] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 31 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..b56f04e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: vedran-kasalica + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behaviour** +A clear and concise description of what you expected to happen. + +**RESTful APE version** +The version used [e.g. 0.2.0] + +**Desktop (please complete the following information):** + - OS: [e.g. Ubuntu] + - OS version [e.g. 22.04] + +**Additional context** +Please feel free to add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..0bf5de3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: vedran-kasalica + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From c2f19c6fc85ee875cfe6e5ed93f71c4045b0da4a Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Fri, 1 Mar 2024 22:28:51 +0100 Subject: [PATCH 02/10] Update main class --- .../nl/esciencecenter/RestapeApplication.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/nl/esciencecenter/RestapeApplication.java b/src/main/java/nl/esciencecenter/RestapeApplication.java index 96dff2f..110992f 100644 --- a/src/main/java/nl/esciencecenter/RestapeApplication.java +++ b/src/main/java/nl/esciencecenter/RestapeApplication.java @@ -1,5 +1,9 @@ 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; @@ -7,12 +11,24 @@ 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); + } } From 1aa430f02c2429581089a61ce4b7041927e2721e Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Fri, 1 Mar 2024 22:29:23 +0100 Subject: [PATCH 03/10] Update the contribution guide --- CONTRIBUTION.md | 55 +++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index a5fc3ee..5b858cd 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -1,7 +1,6 @@ -# 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 @@ -9,56 +8,58 @@ helps, and credit will always be given. 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. From f90ae30d9344081f559a48d8a8768df696619093 Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Fri, 1 Mar 2024 22:36:09 +0100 Subject: [PATCH 04/10] Add templates (Issues/PR) --- .github/ISSUE_TEMPLATE/bug_report.md | 45 ++++++++++++----------- .github/ISSUE_TEMPLATE/feature_request.md | 30 +++++++++------ .github/pull_request_template.md | 43 ++++++++++++++++++++++ 3 files changed, 85 insertions(+), 33 deletions(-) create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b56f04e..a37df20 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,31 +1,34 @@ --- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' +name: Bug Report +about: Create a report to help improve the RESTful APE service +title: '[BUG] ' +labels: 'bug' assignees: vedran-kasalica --- -**Describe the bug** -A clear and concise description of what the bug is. +**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. -**To Reproduce** -Steps to reproduce the behaviour: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error +## Description + -**Expected behaviour** -A clear and concise description of what you expected to happen. +## Endpoint + -**RESTful APE version** -The version used [e.g. 0.2.0] +## HTTP Method + -**Desktop (please complete the following information):** - - OS: [e.g. Ubuntu] - - OS version [e.g. 22.04] +## Request Payload + -**Additional context** -Please feel free to add any other context about the problem here. +## Expected Behavior + + +## Actual Behavior + + +## APE Version + + +## Spring Boot Version + -**Describe the solution you'd like** -A clear and concise description of what you want to happen. +## Problem Statement + -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +## Proposed Solution + -**Additional context** -Add any other context or screenshots about the feature request here. +## Alternatives Considered + + +## Use Cases + + +## Additional Context + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a8f7fc5 --- /dev/null +++ b/.github/pull_request_template.md @@ -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 + + +## Related Issue(s) + + +## Motivation and Context + + +## How Has This Been Tested? + + +## Types of changes + +- [ ] 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: + +- [ ] 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 + + +## Screenshots (if applicable) + + From a1c77992209dd669864aa6637476e1dbef1df5c1 Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Wed, 6 Mar 2024 13:32:21 +0100 Subject: [PATCH 05/10] Reference the documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dc721b5..d29354c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ | **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) | From a7935d208839ee9c14944c3cdfc3063ce7933a0a Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Thu, 7 Mar 2024 11:01:24 +0100 Subject: [PATCH 06/10] Update POM dependencies --- pom.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index e6294f7..8bf6d84 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ org.springframework.boot spring-boot-starter-web - 3.2.2 + 3.2.3 @@ -61,14 +61,14 @@ org.springframework.boot spring-boot-starter-actuator - 3.2.2 + 3.2.3 org.springframework.boot spring-boot-starter-data-jpa - 3.2.2 + 3.2.3 @@ -78,6 +78,7 @@ 2.2.224 runtime + io.github.sanctuuary @@ -96,7 +97,7 @@ org.graalvm.js js - 23.0.2 + 23.0.3 From 75a107952f385b76b746e3312be2fd3e80d41d4b Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Thu, 7 Mar 2024 11:36:48 +0100 Subject: [PATCH 07/10] Update the logo --- README.md | 17 ++++++++--------- pom.xml | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d29354c..4803baa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -![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) - +RestAPE Logo +RestAPE Logo | Badges | | |:----:|----| @@ -11,8 +10,6 @@ | **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. @@ -35,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 ```` @@ -49,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-.jar +mvn install:install-file -Dfile=APE-.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 ```` diff --git a/pom.xml b/pom.xml index 8bf6d84..4b02d2b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ nl.esciencecenter restape - 0.3.1 + 0.3.2 restape RESTful API for the APE library From 4afa7191d5c9c7b62d666fec3d6aa7da7929b750 Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Thu, 7 Mar 2024 11:38:01 +0100 Subject: [PATCH 08/10] Change the logo size --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4803baa..d934d1c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -RestAPE Logo -RestAPE Logo +RestAPE Logo +RestAPE Logo | Badges | | |:----:|----| From 8ec0d1f4a797c34b0e5ffab330b82baf4c40053a Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Thu, 7 Mar 2024 11:45:22 +0100 Subject: [PATCH 09/10] Rename the referenced logo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d934d1c..10aa40f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -RestAPE Logo -RestAPE Logo +RestAPE Logo +RestAPE Logo | Badges | | |:----:|----| From c161c15a5e37e783e0fc65f6eb54e0dee644d8c2 Mon Sep 17 00:00:00 2001 From: Vedran Kasalica Date: Mon, 11 Mar 2024 15:36:04 +0100 Subject: [PATCH 10/10] Fix formatting --- src/main/java/nl/esciencecenter/RestapeApplication.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/nl/esciencecenter/RestapeApplication.java b/src/main/java/nl/esciencecenter/RestapeApplication.java index 110992f..59cd077 100644 --- a/src/main/java/nl/esciencecenter/RestapeApplication.java +++ b/src/main/java/nl/esciencecenter/RestapeApplication.java @@ -24,11 +24,10 @@ public class RestapeApplication { public static void main(String[] args) { SpringApplication app = new SpringApplication(RestapeApplication.class); - - app.setDefaultProperties(Collections - .singletonMap("server.port", "4444")); + + app.setDefaultProperties(Collections.singletonMap("server.port", "4444")); log.info("Starting RestApe API server..."); - app.run(args); - } + app.run(args); + } }