# ![java-operator-sdk](docsy/static/images/full_logo.png)

![Java CI with Maven](https://github.com/operator-framework/java-operator-sdk/actions/workflows/snapshot-releases.yml/badge.svg)
[![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white)](https://kubernetes.slack.com/archives/CAW0GV7A5 "get invite here: https://communityinviter.com/apps/kubernetes/community" )
[![Discord](https://img.shields.io/discord/723455000604573736.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.com/channels/723455000604573736)

# Build Kubernetes Operators in Java Without Hassle

Java Operator SDK is a production-ready framework that makes implementing Kubernetes Operators in Java easy.

It provides a controller runtime, support for testing operators, and related tooling. In addition to that implementing
conversion hooks and dynamic admission controllers are supported as a separate project
(and much more, see related projects section).

Under the hood it uses the excellent [Fabric8 Kubernetes Client](https://github.com/fabric8io/kubernetes-client),
which provides additional facilities, like generating CRD from source code (and vice versa).

## Documentation

Documentation can be found on the  **[JOSDK WebSite](https://javaoperatorsdk.io/)**.

## Contact us

Join us on [Discord](https://discord.gg/DacEhAy) or feel free to ask any question on
[Kubernetes Slack Operator Channel](https://kubernetes.slack.com/archives/CAW0GV7A5)

**Meet us** every other Wednesday 15:00 CEST (from 26.6.2024) at our **community meeting** on [Zoom](https://zoom.us/j/8415370125)
(Password in the Discord channel, or just ask for it there!)

## How to Contribute

See the [contribution](https://javaoperatorsdk.io/docs/contributing) guide on the website.

## What is Java Operator SDK

Java Operator SDK is a higher level framework and related tooling to support writing Kubernetes Operators in Java.
It makes it easy to implement best practices and patterns for an Operator. Features include:

* Optimal handling Kubernetes API events
* Handling dependent resources, related events, and caching.
* Automatic Retries
* Smart event scheduling
* Handling Observed Generations automatically
* Easy to use Error Handling
* ... and everything that a batteries included framework needs

For all features and their usage see the [related section on the website](https://javaoperatorsdk.io/docs/features).

## Related Projects

* Quarkus Extension: https://github.com/quarkiverse/quarkus-operator-sdk
* Spring Boot Starter: https://github.com/java-operator-sdk/operator-framework-spring-boot-starter
* Kubernetes Glue Operator: https://github.com/csviri/kubernetes-glue-operator
  Meta-operator that builds upon to use JOSDK Workflows and Dependent Resources features and
  allows to create operators by simply applying a custom resource, thus, is a language independent way.
* Kubernetes Webhooks Framework: https://github.com/java-operator-sdk/kubernetes-webooks-framework
  Framework to implement Admission Controllers and Conversion Hooks.
* Operator SDK plugin: https://github.com/operator-framework/java-operator-plugins

## Projects using JOSDK

While we know of multiple projects using JOSDK in production, we don't want to presume these
projects want to advertise that fact here. For this reason, we ask that if you'd like your project
to be featured in this section, please open a PR, adding a link to and short description of your
project, as shown below:

- [ExposedApp operator](https://github.com/halkyonio/exposedapp-rhdblog): a sample operator
  written to illustrate JOSDK concepts and its Quarkus extension in the ["Write Kubernetes
  Operators in Java with the Java Operator SDK" blog series](https://developers.redhat.com/articles/2022/02/15/write-kubernetes-java-java-operator-sdk#).
- [Keycloak operator](https://github.com/keycloak/keycloak/tree/main/operator): the official
  Keycloak operator, built with Quarkus and JOSDK.
- [Apache Flink Kubernetes operator](https://github.com/apache/flink-kubernetes-operator) is the market leader among Flink operators.
- [Strimzi Access operator](https://github.com/strimzi/kafka-access-operator). While the core Strimzi operator development predates
  JOSDK, but new components like the Access operator is using the framework.
- [EureKubeOperator](https://medium.com/@heesuk.dev/implementing-kubernetes-operator-for-eureka-service-discovery-integration-by-java-operator-sdk-d21d8087c38e): integrates service discovery of Eureka and Kubernetes using the framework - developed by 11street. It is not released as an open source yet but is very interesting to read about this problem and how it is solved by an operator written with JOSDK.
- [Locust k8s operator](https://github.com/AbdelrhmanHamouda/locust-k8s-operator): Cloud native solution to run performance tests on any Kubernetes cluster.
- [Strimzi Schema Registry Operator](https://github.com/shangyuantech/strimzi-registry-ksql-operator): A Schema Registry Operator based on JOSDK for running the Confluent Schema Registry with a Strimzi-based Kafka cluster.
- [Airflow Dag Operator](https://github.com/cdmikechen/airflow-dag-operator): Use JOSDK(Quarkus Extension) to replace Airflow Git Sync strategy. The main idea of the project is to start a synchronization container on each airflow pod to synchronize the DAG/files into the DAG folder.
- [Glasskube Operator](https://github.com/glasskube/operator): simplifies the deployment, maintenance and upgrade of popular open source business tools. It is written in Kotlin and uses the JOSDK and fabric8 Kubernetes client with Kotlin-based DSL.
- [Debezium Operator](https://github.com/debezium/debezium-operator): Debezium Operator adds Change-Data-Capture capabilities to your Kubernetes or Openshift cluster by  providing an easy way to run and manage  [Debezium Server](https://debezium.io/documentation/reference/stable/operations/debezium-server.html) instances.


        Modrinth
     —

        Setup
     —

        Docs
     —

        Issues

**HuskHomes** is a powerful, intuitive and flexible teleportation plugin for _Minecraft: Java Edition_ servers. HuskHomes contains a meaty—but not bloated—set of player teleportation features, including set homes, warps, public homes, teleport requests, previous and offline position teleporting—and more.

HuskHomes can be used on your Spigot, Sponge or Fabric server, and with a MySQL Database even works cross-server, letting players teleport across your proxy (Bungee or Velocity) network!

## Features
**⭐ Works cross-server** — Let players seamlessly teleport and set homes across your proxies network of servers using MySQL/MariaDB.

**⭐ Zero learning curve** — Your players already know how to use it! /sethome, /home, /tpa, /rtp—among others—are all built-in and easy-to-use.

**⭐ Quick and beautiful menus** — Sometimes, simple is better. No monolithic chest GUIs—instead, robust and beautiful interactive chat menus.

**⭐ Great admin features** — Comes with all the classic admin commands—/tp and /warp—as well as robust tools for managing other players' homes.

**⭐ Plan & Web map plugin hooks** — Stay in touch with your community through home analytics via Plan and display homes on Dynmap or BlueMap.

**⭐ Extensible API & open-source** — Still not enough? Extend the plugin with the HuskHomes API. Or, submit a pull request—we're open-source!

## Building
HuskHomes requires Java 17 to build. To build for all platforms, simply run the following in the root of the repository:

```bash
./gradlew clean build
```

## License
HuskHomes is licensed under the Apache 2.0 license.

- [License](https://github.com/WiIIiam278/HuskHomes/blob/master/LICENSE)

## Translations
Translations of the plugin locales are welcome to help make the plugin more accessible. Please submit a pull request with your translations as a `.yml` file.

- [Locales Directory](https://github.com/WiIIiam278/HuskHomes/tree/master/common/src/main/resources/locales)
- [English Locales](https://github.com/WiIIiam278/HuskHomes/tree/master/common/src/main/resources/locales/en-gb.yml)

## Links
- [Docs](https://william278.net/docs/huskhomes/) — Read the plugin documentation!
- [Modrinth](https://modrinth.com/plugin/huskhomes) — View the plugin Modrinth page (Also: [Spigot](https://www.spigotmc.org/resources/huskhomes.83767/), [Polymart](https://polymart.org/resource/huskhomes.284/), [Hangar](https://hangar.papermc.io/William278/HuskHomes), & [CurseForge](https://www.curseforge.com/minecraft/mc-mods/huskhomes/))
- [Issues](https://github.com/WiIIiam278/HuskHomes/issues) — File a bug report or feature request
- [Discord](https://discord.gg/tVYhJfyDWG) — Get help, ask questions
- [bStats](https://bstats.org/plugin/bukkit/HuskHomes/8430) — View plugin metrics (Also: [Sponge](https://bstats.org/plugin/sponge/HuskHomes/18423))

---
© [William278](https://william278.net/), 2023. Licensed under the Apache-2.0 License.


![Jolokia - JMX on Capsaicin][1]

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jolokia/jolokia-parent/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/org.jolokia/jolokia-parent/)
[![Build Status](https://github.com/jolokia/jolokia/actions/workflows/ci.yaml/badge.svg?branch=2.0)](https://github.com/jolokia/jolokia/actions/workflows/ci.yaml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=org.jolokia%3Ajolokia&metric=coverage)](https://sonarcloud.io/summary/new_code?id=org.jolokia%3Ajolokia)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=org.jolokia%3Ajolokia&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=org.jolokia%3Ajolokia)

Jolokia is a fresh way to access JMX MBeans remotely. It is
different from JSR-160 connectors in that it is an agent-based
approach which uses JSON over HTTP for its communication in a
REST-stylish way.

Multiple agents are provided for different environments:

* **WAR Agent** for deployment as web application in a Java EE Server.
* **OSGi Agent** for deployment in an [OSGi][2] container. This agent
  is packaged as a bundle and comes in two flavors (minimal,
  all-in-one).
* **JVM+ Agent** which can be used with any Oracle/Sun JVM,
  Version 11 or later and which is able to attach to a running Java process
  dynamically.

## Features

The agent approach as several advantages:

* **Firewall friendly**

  Since all communication is over HTTP, proxying through firewalls
  becomes mostly a none-issue (in contrast to RMI communication, which
  is the default mode for JSR-160)

* **Polyglot**

  No Java installation is required on the client
  side. E.g. [Jmx4Perl][3] provides a rich Perl client library and
  Perl based tools for accessing the agents.

* **Simple Setup**

  The Setup is done by a simple agent deployment. In contrast,
  exporting JMX via JSR-160 can be remarkable complicated (see these
  blog posts for setting up [Weblogic][4] and [JBoss][5] for native
  remote JMX exposure setup)

Additionally, the agents provide extra features not available with
JSR-160 connectors:

* **Bulk requests**

  In contrast to JSR-160 remoting, Jolokia can process many JMX
  requests with a single round trip. A single HTTP POST request puts
  those requests in its JSON payload which gets dispatched on the
  agent side. These bulk requests can increase performance drastically,
  especially for monitoring solutions. The Nagios plugin
  [check_jmx4perl][6] uses bulk requests for its multi-check feature.

* **Fine grained security**

  In addition to standard HTTP security (SSL, HTTP-Authentication)
  Jolokia supports a custom policy with fine grained restrictions
  based on multiple properties like the client's IP address or subnet,
  and the MBean names, attributes, and operations. The policy is
  defined in an XML format with support for allow/deny sections and
  wildcards.

* **Proxy mode**

  Jolokia can operate in an agentless mode where the only requirement
  on the target platform is the standard JSR-160 export of its
  MBeanServer. A proxy listens on the front side for Jolokia requests
  via JSON/HTTP and propagates these to the target server through
  remote JSR-160 JMX calls. Bulk requests get dispatched into
  multiple JSR-160 requests on the proxy transparently.

## Resources

* For bug reports, please use the [GitHub Issue tracker][7].
* For questions and discussions, please use [GitHub discussions][8].

Even more information on Jolokia can be found at [www.jolokia.org][9], including
a complete [reference manual][10].

## Contributions

Contributions in form of pull requests are highly appreciated. All your work must be donated under the
Apache Public License, too. Please sign-off your work before
doing a pull request. The sign-off is a simple line at the end of the patch description,
which certifies that you wrote it or otherwise have the right to
pass it on as an open-source patch.  The rules are very simple: if you
can certify the below (from
[developercertificate.org](https://developercertificate.org/)):

```
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
```

Then you just add a line to every git commit message:

    Signed-off-by: Max Morlock <max.morlock@fcn.de>

Using your real name (sorry, no pseudonyms or anonymous contributions.)

If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

If you fix some documentation (typos, formatting, ...) you are not required to sign-off.
It is possible to sign your commits in retrospective, [too](https://stackoverflow.com/questions/13043357/git-sign-off-previous-commits)
if you forgot it the first time.

 [1]: https://jolokia.org/images/jolokia_logo.png "Jolokia"
 [2]: https://www.osgi.org
 [3]: https://www.jmx4perl.org
 [4]: https://labs.consol.de/blog/jmx4perl/configuring-remote-jmx-access-for-weblogic
 [5]: https://labs.consol.de/blog/jmx4perl/jboss-remote-jmx
 [6]: https://search.cpan.org/~roland/jmx4perl/scripts/check_jmx4perl
 [7]: https://github.com/jolokia/jolokia/issues
 [8]: https://github.com/jolokia/jolokia/discussions
 [9]: https://www.jolokia.org
 [10]: https://www.jolokia.org/reference/html/index.html


![Leshan](https://eclipse.org/leshan/img/multicolor-leshan.png)

[Eclipse Leshan™](https://eclipse.org/leshan) is an OMA Lightweight M2M server and client Java implementation.

[What is OMA LWM2M ?](https://omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/)
[LWM2M Specifications](https://github.com/eclipse/leshan/wiki/Lightweight-M2M-Specification).

Leshan provides libraries which help people to develop their own Lightweight M2M server and client.
The project also provides a client, a server and a bootstrap server demonstration as an example of the Leshan API and for testing purpose.

| LWM2M Version
 Targeted | Leshan
 Version | Minimal
 Java Version | Development
 State |  Build Status	|  Standalone
 Demos |
| - | - | - | - | - | - |
| [v1.0.x](https://github.com/eclipse/leshan/wiki/Lightweight-M2M-Specification#lightweight-m2m-v10x) | [v1.x](https://github.com/eclipse/leshan/tree/1.x)
 [Supported features](https://github.com/eclipse/leshan/wiki/LWM2M-Supported-features) | Java 7 | stable released | [jenkins-1.x](https://ci.eclipse.org/leshan/job/leshan-ci/job/1.x/) | [server-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/1.x/lastSuccessfulBuild/artifact/leshan-server-demo.jar)
 [client-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/1.x/lastSuccessfulBuild/artifact/leshan-client-demo.jar)
 [bsserver-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/1.x/lastSuccessfulBuild/artifact/leshan-bsserver-demo.jar) |
| [**v1.1.x**](https://github.com/eclipse/leshan/wiki/Lightweight-M2M-Specification#lightweight-m2m-v11x)| [**v2.x** (master)](https://github.com/eclipse/leshan/tree/master)
 [Supported features](https://github.com/eclipse/leshan/wiki/LWM2M-1.1-supported-features) | Java 8 | **in development**  |[jenkins-master](https://ci.eclipse.org/leshan/job/leshan-ci/job/master/)     | [server-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar)
 [client-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-client-demo.jar)
 [bsserver-demo](https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-bsserver-demo.jar)  |

Release (stable and milestones) are available on [maven central](https://search.maven.org/search?q=org.eclipse.leshan).
Nightly build (snapshot) are available on [eclipse repo](https://repo.eclipse.org/#view-repositories;leshan-snapshots~browsestorage). ([more details](https://github.com/eclipse/leshan/pull/885))

The Leshan Documentation  is available in our [wiki :blue_book:](https://github.com/eclipse/leshan/wiki).

Contact
-------

Join the project mailing list : [subscribe](https://dev.eclipse.org/mailman/listinfo/leshan-dev).
Mail address: leshan-dev@eclipse.org.
Access to [leshan-dev archives](https://dev.eclipse.org/mhonarc/lists/leshan-dev/).

License
-------

This work is dual-licensed under the Eclipse Public License v2.0 and Eclipse Distribution License v1.0

`SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause`

Test Server Sandbox
------------

You can try live our servers demos instances:

* The **lwm2m server** at https://leshan.eclipseprojects.io/
   _(coap://leshan.eclipseprojects.io:5683  and coaps://leshan.eclipseprojects.io:5684)_
* The **bootstrap server** at https://leshan.eclipseprojects.io/bs/
   _(coap://leshan.eclipseprojects.io:5783  and coaps://leshan.eclipseprojects.io:5784)_

(Automatic deployment of master branch)

![Leshan](https://www.eclipse.org/leshan/img/capture_for_github-v2.png)

Test Leshan Demos locally
-----------------------
Get and run the last binary of our demo **server** :
```
wget https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar
java -jar ./leshan-server-demo.jar
```
Get and run the last binary of our demo **client** :
```
wget https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-client-demo.jar
java -jar ./leshan-client-demo.jar
```
Get and run the last binary of our **bootstrap** demo server :
```
wget https://ci.eclipse.org/leshan/job/leshan-ci/job/master/lastSuccessfulBuild/artifact/leshan-bsserver-demo.jar
java -jar ./leshan-bsserver-demo.jar
```
:information_source: : _All the demos have a `--help` option._

Compile Leshan & Run Demos
-------------
Get sources :
```bash
#using ssh
git clone git@github.com:eclipse/leshan.git
```
or
```bash
#using https
git clone https://github.com/eclipse/leshan.git

```

Compile it, by running in leshan root folder :

```
mvn clean install
```

Run demo **server**:
```
java -jar leshan-server-demo/target/leshan-server-demo-*-SNAPSHOT-jar-with-dependencies.jar
```

Connect on Leshan demo UI: http://localhost:8080
Leshan server Demo provides a very simple UI to get the list of connected clients and interact with clients resources.

Now you can register a LWM2M client by running our **client** demo:
```
java -jar leshan-client-demo/target/leshan-client-demo-*-SNAPSHOT-jar-with-dependencies.jar
```
or trying the [Eclipse Wakaama](http://eclipse.org/wakaama) test client.

You can also try our **bootstrap** demo server:
```
java -jar leshan-bsserver-demo/target/leshan-bsserver-demo-*-SNAPSHOT-jar-with-dependencies.jar
```

Let's start to code !
---------------------
Now you played a bit with our demo, you should start to code your own server or client using our [Getting-started](https://github.com/eclipse/leshan/wiki/Getting-started) guide.


# Akto.io API Security

## Contributors

# What is Akto?

[How it works](https://docs.akto.io/#how-it-works) • [Getting-Started](https://docs.akto.io/#how-to-get-started) • [API Inventory](https://docs.akto.io/api-inventory/api-collections) • [API testing](https://docs.akto.io/testing/run-test) • [Add Test](https://docs.akto.io/testing/test-library) • [Join Discord community](https://discord.com/invite/Wpc6xVME4s) •

Akto is an instant, open source API security platform that takes only 60 secs to get started. Akto is used by security teams to maintain a continuous inventory of APIs, test APIs for vulnerabilities and find runtime issues. Akto offers coverage for all OWASP top 10 and HackerOne Top 10 categories including BOLA, authentication, SSRF, XSS, security configurations, etc. Akto's powerful testing engine runs variety of business logic tests by reading traffic data to understand API traffic pattern leading to reduced false positives. Akto can integrate with multiple traffic sources - burpsuite, AWS, postman, GCP, gateways, etc. Here is our [public roadmap](https://github.com/orgs/akto-api-security/projects/8) for this quarter.

Akto enables security and engineering teams to secure their APIs by doing three things:

1. [API inventory](https://docs.akto.io/api-inventory/api-collections)
2. [Run business logic tests in CI/CD](https://docs.akto.io/testing/run-test)
3. [Find vulnerabilities in run-time](https://docs.akto.io/api-inventory/sensitive-data)

https://user-images.githubusercontent.com/91306853/216407351-d18c396b-5cd0-4cbc-a350-10a76b1d67b3.mp4

## How it works?

Step 1: Create inventory

Step 2: Run tests

## How to get Started?

### Using docker-compose (works for any machine which has Docker installed)
Run the following commands to install Akto. You'll need to have curl and Docker installed in order to run the container..
1. Clone the Akto repo by using this command `git clone https://github.com/akto-api-security/akto.git`
2. Go to the cloned directory `cd akto`
3. Run `docker-compose up -d`

If you are setting this up in your own Cloud (AWS/GCP/Heroku), read this section

Please ensure the following for good security practices
1. Open inbound security rule for port 9090 only. And restrict the source CIDR to VPC CIDR or your IP only.
2. Use an EC2 from a private subnet -

    a. This way, no one will be able to make an inbound request to your machine.

    b. Ensure this private subnet has access to Internet so that outbound calls can succeed!

    c. You might have to set up tunneling to access instance via VPN using `ssh -i pemfile ec2-user@vpn-public-instance -L 9090:private-instance:9090`

    d. In your browser, visit `http://private-instance:9090`

3. Use an EC2 from a public subnet - please don't! If you still want to do this, you can skip 2.b and 2.c. Simply access your instance via `http://ip:9090`

Akto is really powerful in Cloud deployment if you can provide your application's mirrored traffic (0 performance impact). You would also be able to schedule tests in CI/CD and invite more team members on the dashboard. For that, you should install Akto Enterprise edition available [here](https://stairway.akto.io). Read more about it [here](https://www.akto.io/pricing)

## API Security testing tutorials

| Title | Link |
| ------------- | ------------- |
| Introduction | https://www.youtube.com/watch?v=oFt4OVmfE2s |
| **Tutorial 1:** SSRF Port Scanning (OWASP API7:2023) | https://www.youtube.com/watch?v=WjNNh6asAD0 |

## Develop and contribute

Quicksetup using VSCode Devcontainers

### Prerequisites:

1. [Install VSCode](https://code.visualstudio.com/)
2. [Install VSCode Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
3. **Windows:** [Docker Desktop](https://www.docker.com/products/docker-desktop) 2.0+ on Windows 10 Pro/Enterprise. Windows 10 Home (2004+) requires Docker Desktop 2.3+ and the [WSL 2 back-end](https://aka.ms/vscode-remote/containers/docker-wsl2).
4. **macOS**: [Docker Desktop](https://www.docker.com/products/docker-desktop) 2.0+.
5. **Linux**: [Docker CE/EE](https://docs.docker.com/install/#supported-platforms) 18.06+ and [Docker Compose](https://docs.docker.com/compose/install) 1.21+.

**Note**: If using Docker Desktop, consider changing the memory allocation to 8 GB for better performance

### Steps:

#### Clone repo and open in vscode

1. Open terminal
2. `mkdir ~/akto_code`
3. `cd ~/akto_code`
4. `git clone https://github.com/akto-api-security/akto`
5. Open in VScode: `code akto`

#### Start Dev Container

1. Go to View > Command Palette and type: Dev Containers: Reopen in Container

2. Wait for the Dev Container to set up.
3. Open **localhost:9090** in your web browser to see the Akto dashboard

 Manual Setup Instructions

### Prerequisites
OpenJDK 8, node(v18.7.0+ [link](https://nodejs.org/download/release/v18.7.0/)), npm(v8.15.0+), maven (v3.6.3 [link](https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/)), MongoDB (v5.0.3+ [link](https://www.mongodb.com/docs/manual/administration/install-community/))

#### Clone repo
1. `mkdir ~/akto_code`
2. `cd akto_code`
3. `git clone https://github.com/akto-api-security/akto`

#### Setup database

1. `Open a new terminal tab`
2. `cd ~`
3. `mkdir ~/akto_mongo_data`
4. `<path_to_mongo_folder>/bin/mongod --dbpath ~/akto_mongo_data`

#### Setup Frontend

1. `Open a new terminal tab`
2. `cd ~/akto_code/akto`
3. `cd apps/dashboard`
4. `npm install`
5. `npm run hot`

#### Setup Dashboard

1. `Open a new terminal tab`
2. `cd ~/akto_code/akto`
3. `export AKTO_MONGO_CONN="mongodb://localhost:27017"`
4. `export DASHBOARD_MODE="local_deploy"`
5. `mvn clean install`
6. `mvn --projects :dashboard --also-make jetty:run -Djetty.port=9090`

#### Setup Testing

1. `Open a new terminal tab`
2. `cd ~/akto_code/akto`
3. `cd apps/testing`
4. `export AKTO_MONGO_CONN="mongodb://localhost:27017"`
5. `mvn compile; mvn exec:java -Dexec.mainClass="com.akto.testing.Main"`

#### Using Testing CLI tool

Run the following command to run testing CLI tool

```bash
docker run -v ./:/out  \ # needed to generate test report on host machine
    -e TEST_IDS='JWT_NONE_ALGO REMOVE_TOKENS' \ # space separated test ids
    -e AKTO_DASHBOARD_URL='<AKTO_DASHBOARD_URL>' \
    -e AKTO_API_KEY='<AKTO_API_KEY>' \
    -e API_COLLECTION_ID='123' \ # api collection id on which you want to run tests
    -e TEST_APIS='https://demo.com/api/books https://demo.com/api/cars' \ # space separated apis from the api collection on which you want to run tests. If not present, all apis in the collection will be tested. [optional]
    -e OVERRIDE_APP_URL='https://dummy.com' \ # If you want to test on a separate host. [optional]
    aktosecurity/akto-api-testing-cli
```

### Play around

1. Open `localhost:9090` in your favourite browser
2. You will need to signup when logging in for the first time, next time onwards you can login

Debug

1. To debug front end, install Vue.js Chrome extension from [here](https://devtools.vuejs.org/guide/installation.html).
2. To debug backend, run the following before running web server -
  a. Set MAVEN_OPTS variable to enable debugging on your Java process

        export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8081, -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

  b. In Visual Studio code, click on any line number to set a breakpoint.

  c.  Attach the Java debugger from Run and Debug mode. If you are doing this for the first time, click on “Create launch.json file” and then “Add configuration”. Choose “Java: Attach process by ID” and save the file.

  d. A list of running Java processes with show up. Select the web server process to attach the debugger

## Contributing

We welcome contributions to this project. Please read our [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to get involved.

## License

This project is licensed under the [MIT License](LICENSE.md).


# product-mi-tooling

[![Build Status](https://wso2.org/jenkins/buildStatus/icon?job=products/product-mi-tooling)](https://wso2.org/jenkins/job/products/job/product-mi-tooling/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

This repository houses tooling components required for WSO2 Micro Integrator. Each of these components interact with
the Management API of the WSO2 Micro Integrator to provide the information related to a specified server instance.

# product-mi-components
The two main tooling artifacts included here are as follows:
1. [Command Line Interface](https://github.com/wso2/product-mi-tooling/tree/master/cmd) for WSO2 Micro Integrator.
2. [Monitoring Dashboard](https://github.com/wso2/product-mi-tooling/tree/master/monitoring-dashboard) for WSO2 Micro Integrator.

* Please refer the README.md files relevant to each module for more information on each of the modules.
1. [Command Line Interface README.md](https://github.com/wso2/product-mi-tooling/blob/master/cmd/README.md)
2. [Monitoring Dashboard README.md](https://github.com/wso2/product-mi-tooling/blob/master/monitoring-dashboard/README.md)

# How to Contribute
- Please report issues on [Github](https://github.com/wso2/micro-integrator).
- Send your pull requests to [product-mi-tooling](https://github.com/wso2/product-mi-tooling) repository.


# Vineflower

Vineflower is a modern, general purpose JVM language decompiler focused on providing the best quality, speed, and usability.

Vineflower's features include:
- Java 20+ support, including records, sealed classes, switch expressions, and more
- Clean code generation and output, with automatic output formatting
- Multithreaded decompilation

Examples of Vineflower's output, compared to other decompilers, can be found on [the wiki.](https://github.com/Vineflower/vineflower/wiki)

## Use
Want to use Vineflower? There are a few ways! For Minecraft modding, [Loom Vineflower](https://github.com/Juuxel/loom-vineflower) allows you to generate sources with Vineflower.
The [Vineflower Intellij IDEA plugin](https://plugins.jetbrains.com/plugin/18032-quiltflower) replaces Fernflower in IDEA with Vineflower, and allows you to modify its settings.

If you want to run Vineflower from the commandline, head over to the [Releases tab](https://github.com/Vineflower/vineflower/releases) and grab the latest release.
You can then run Vineflower with `java -jar vineflower.jar <arguments> <source> <destination>`.
`<arguments>` is the list of [commandline arguments](https://github.com/Vineflower/vineflower/wiki) that you want to pass to the decompiler.
`<source>` can be a jar, zip, folder, or class file, and `<destination>` can be a folder, zip, jar, or excluded, to print to the console.

To use Vineflower as a library, you can find distributions on maven central. Vineflower 1.9+ requires Java 11 or higher to run.
Vineflower can be imported with gradle with:
```groovy
dependencies {
    implementation 'org.vineflower:vineflower:<version>'
}
```
Instructions on how to interface with Vineflower can be found on [the wiki.](https://github.com/Vineflower/vineflower/wiki)

Make sure to report any issues to the [Issues tab!](https://github.com/Vineflower/vineflower/issues)

### Building
Vineflower can be built simply with `./gradlew build`.

### Support
For support or questions, please join one of the listed [social platforms](https://github.com/Vineflower), or on the [discussion tab](https://github.com/Vineflower/vineflower/discussions).

## Contributing
Contributions are always welcome! We are always looking for help with bugfixes, new features, and enhancements. If you'd like to work on a feature or bugfix, feel free to simply open a PR! If you want to communicate about a change before making it, you can get in touch with the methods listed above.
Vineflower's codebase is rather old and some concepts may be difficult to navigate. For help, please check out [CONTRIBUTING.md](./CONTRIBUTING.md) and [ARCHITECTURE.md](./ARCHITECTURE.md).

### Special Thanks
Vineflower is a fork of both Jetbrains' Fernflower and MinecraftForge's ForgeFlower, and a direct continuation of work on Quiltflower.

* Jetbrains- For maintaining Fernflower
* Forge Team- For maintaining ForgeFlower
* CFR- For its large suite of very useful tests


OrientDB Enterprise Agent
=======================

OrientDB Enterprise Agent an add-on to OrientDB Community edition, designed specifically for applications seeking a scalable, robust, and secure multi-model database. It add professional enterprise tools such as support forAuditing Tools, Metrics recording, Non-Stop Incremental Backups and Delta Synchronization in distributed.

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/orientdb-enterprise-agent)](https://api.reuse.software/info/github.com/SAP/orientdb-enterprise-agent)

### Installation

OrientDB Enterprise Agent is an additional package which can be installed in the [Community Edition](../gettingstarted/Tutorial-Installation.md). Download the Enterprise Agent jar package (or build it from sources) and copy it into the `/<orientdb>/plugins` directory, then start the server.

At run-time, the Enterprise edition logs this message:

```
2016-08-04 09:38:26:589 INFO  ***************************************************************************** [OEnterpriseAgent]
2016-08-04 09:38:26:589 INFO  *                     ORIENTDB  -  ENTERPRISE EDITION                       * [OEnterpriseAgent]
2016-08-04 09:38:26:589 INFO  ***************************************************************************** [OEnterpriseAgent]
2016-08-04 09:38:26:589 INFO  * If you are in Production or Test, you must purchase a commercial license. * [OEnterpriseAgent]
2016-08-04 09:38:26:589 INFO  * For more information look at: http://orientdb.com/orientdb-enterprise/    * [OEnterpriseAgent]
2016-08-04 09:38:26:590 INFO  ***************************************************************************** [OEnterpriseAgent]
```

## Accessing EE Features from Studio

To access the Enterprise features from OrientDB Studio, from the login page, click on `SERVER MANAGEMENT` (top right corner) and enter root username and password

## Building from sources

To build OrientDB Enterprise Agent you need java (at least 8) and maven installed on your machine.
From the mail directory, run the following command:

```
mvn clean install
```

You will find the agent jar file in the `/agent/target` directory

## Documentation

For further documentation, please refer to the official [OrientDB docs](https://orientdb.org/docs/3.2.x/ee/Enterprise-Edition.html)

## Licensing

Copyright 2022 SAP SE or an SAP affiliate company and OrientDB enterprise agent contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/orientdb-enterprise-agent)


# Aiven's JDBC Sink and Source Connectors for Apache Kafka®

This repository includes a Source connector that allows transfering data from a relational database into Apache Kafka topics
and a Sink connector that allows to transfer data from Kafka topics into a relational database
[Apache Kafka Connect](http://kafka.apache.org/documentation.html#connect) over JDBC.

The project originates from Confluent
[kafka-connect-jdbc](https://github.com/confluentinc/kafka-connect-jdbc).
The code was forked before the change of the project's license. We want
to thank the Confluent team for their efforts in developing the
connector and aim to continue keeping this fork well-maintained and
truly open.

## Documentation

The documentation can be found in the `docs/` directory of the source code

For the Source connector it could be found at
[here](docs/source-connector.md).

For the Sink connector it could be found at
[here](docs/sink-connector.md).

## Building from source

Prerequisites for building JDBC connector for Apache Kafka:

* Git
* Java 11

```
git clone git@github.com:aiven/jdbc-connector-for-apache-kafka.git
cd jdbc-connector-for-apache-kafka
./gradlew clean build
```

To publish to maven local use
```
./gradlew clean build publishToMavenLocal
```

## Contribute

[Source Code](https://github.com/aiven/jdbc-connector-for-apache-kafka)

[Issue Tracker](https://github.com/aiven/jdbc-connector-for-apache-kafka/issues)

## License

The project is licensed under the
[Apache 2 license](https://www.apache.org/licenses/LICENSE-2.0). See
[LICENSE](LICENSE).

## Security

Security policies can be found [here](SECURITY.md) and the list of known vulnerabilities [here](cve-list.md)

## Trademark
Apache Kafka, Apache Kafka Connect are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Kafka Connect JDBC is trademark and property of their respective owners. All product and service names used in this page are for identification purposes only and do not imply endorsement.


# Chat2DB

**English** | [中文](README_CN.md)· [Changelog](CHANGELOG.md) · [Doc](https://github.com/chat2db/Chat2db-website-old/blob/main/docs/index.md) · [Report Bug](https://github.com/chat2db/Chat2DB/issues) · [PR](https://github.com/chat2db/Chat2DB/pulls)

Share Chat2DB Repository

  If you think Chat2DB helpful, please click ⭐ Star and Fork this repo in the top right corner

  Or upvote on Product Hunt
    your support is the biggest motivation for Chat2DB to get better

# NEWS

### 🚀🚀🚀 The long-awaited Chat2DB Pro version is finally here, with the following key highlights added.
#### 🔥🔥🔥AI-driven intelligent SQL development

#### ✨✨✨AI-driven Intelligent Reports

#### 🎉🎉🎉AI-driven Data Exploration

### 🎁🎁🎁 We have also open-sourced our first GLM, [Chat2DB-SQL-7B](https://github.com/chat2db/Chat2DB-GLM). You can refer more details from below links.

- github: [Chat2DB-SQL-7B](https://github.com/chat2db/Chat2DB-GLM)
- huggingface🤗：[Chat2DB-SQL-7B](https://huggingface.co/Chat2DB/Chat2DB-SQL-7B)
- modelscope：[Chat2DB-SQL-7B](https://modelscope.cn/models/Chat2DB/Chat2DB-SQL-7B/summary)

### 🎁🎁🎁 Deploy the InternLM model on Chat2DB
Thanks to [InternLM](https://github.com/InternLM/InternLM) for the strong support for this project. In the custom models of this project, multiple model weights from InternLM can be integrated. For more details, please refer to [chat2db-internlm-deploy](https://github.com/chat2db/chat2db-internlm-deploy)

## 🚀 Supported databases
Chat2DB Pro supports all the following databases, including the most requested Redis feature.
- MySQL
- PostgreSQL
- H2
- Oracle
- SQLServer
- SQLite
- MariaDB
- ClickHouse
- DM
- Presto
- DB2
- OceanBase
- Hive
- KingBase
- MongoDB
- Redis
- Snowflake

## ⏬ Download and Install Chat2DB(Pro)

- Download installation package from [official website](https://chat2db.ai/download)
- Double click package to install

## 🌰 Using Chat2DB
Refer to the [Quick Start Guide](https://docs.chat2db.ai/) to get started with Chat2DB.

## Contribution Guide
We welcome and encourage community members to contribute to the Chat2DB project. Whether it's by reporting issues, proposing new features, or directly submitting code fixes and improvements, your help is invaluable.
If you're interested in contributing, please follow our contribution guidelines:

- Report Issues: Report any issues or bugs encountered via GitHub Issues.
- Submit Pull Requests: If you wish to contribute directly to the codebase, please fork the repository and submit a pull request (PR).
- Improve Documentation: Contributions to best practices, example code, documentation improvements, etc., are welcome.

## Stargazers

[![Stargazers repo roster for @chat2db/Chat2DB](https://reporoster.com/stars/chat2db/Chat2DB)](https://github.com/chat2db/Chat2DB/stargazers)

## Forkers

[![Forkers repo roster for @chat2db/Chat2DB](https://reporoster.com/forks/chat2db/Chat2DB)](https://github.com/chat2db/Chat2DB/network/members)

## 👋 Join Us

### On WeChat

### On Discord

[![Discord](https://img.shields.io/badge/-Join%20us%20on%20Discord-%237289DA.svg?style=flat&logo=discord&logoColor=white)](https://discord.com/invite/uNjb3n5JVN)

## LICENSE

The primary license used by this software is the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), supplemented by the [Chat2DB License](./Chat2DB_LICENSE).

## ❤ Acknowledgements

Thanks to all who contributed to Chat2DB~~

## Star History

  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chat2db/chat2db&type=Date&theme=dark" />
    <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chat2db/chat2db&type=Date" />

  </picture>


# Andy

[![tests](https://github.com/SERG-Delft/andy/actions/workflows/tests.yml/badge.svg)](https://github.com/SERG-Delft/andy/actions/workflows/tests.yml)

* [Summary](#andy)
* [Usage](#usage)
* [Configuration](#configuration)
  * [File structure](#file-structure)
  * [Weights](#weights-required)
  * [Classes under test](#classes-under-test-required)
  * [Mode](#mode)
  * [Code coverage](#code-coverage)
  * [Mutation coverage](#mutation-coverage)
  * [Meta tests](#meta-tests)
  * [Penalty meta tests](#penalty-meta-tests)
  * [Code checks](#code-checks)
  * [Penalty code checks](#penalty-code-checks)
  * [Success message](#success-message)
  * [External process](#external-process)
* [Team](#team)
* [License](#license)
* [Acknowledgment](#acknowledgment)

---

**Andy** is a tool for automated assessment of the quality of students' test suites. It was developed for CSE1110, the TU Delft's course on software testing and quality.
Given some method or class to test and the student's test suite, Andy runs a set of checks and metrics and provides students with feedback.

More specifically, Andy provides:

* Test coverage: Line, instruction, and branch coverage (via JaCoCo)
* Mutation coverage: How many mutants the test suite kills (via Pitest)
* Code checks: Static code checks, written by the teacher, to detect specific characteristics of the students' tests.
* Meta tests: A set of manually written mutants that should be killed by the students' tests.

The screenshot below shows the final part of the assessment report, containing the final grade.

![](.github/doc/screenshot.png)

## Usage

There are different ways you can run Andy.

### Using the default launcher

If you just want to run Andy on a solution you have in hands (say, as a teacher, you want to double check the assessment of one of the solutions), you can use the default launcher.

To that, you first need to install Andy and then build a fat JAR. Then, you run it. Note the three parameters:

* _action_ refers to which action to run (e.g., FULL_WITH_HINTS)
* _input_ is a directory containing the three files: Solution.java, Configuration.java, and Library.java.
* _output_ is the directory where the output will be saved

```
# cleans, compiles, and installs everything
mvn clean install

# builds a package with the core
cd andy
mvn package
cd ..

# runs it
java -cp andy/target/andy-1.0.jar nl.tudelft.cse1110.andy.AndyLauncher <action> <input> <output>
```

### Assignments

If you are just solving one of the exercises inside our `/assignments` folder, you can simply call `mvn andy:run` from any of the exercises. Please, read the README.md under `/assignments`.

### TU Delft students

Andy is available in WebLab. You don't have to do anything.

### Using AWS lambda

As a teacher, you may want to deploy Andy as a AWS lambda. Follow the README file inside the `andy-aws-lambda` folder.

## Configuration

Teachers can configure how the student's test should be assessed. To that aim, the teacher writes a `RunConfiguration` class. You can see many examples of configuration files in our [assignment repository](https://github.com/SERG-Delft/andy/tree/main/assignments).

### File structure

When running Andy via the Maven plugin (`mvn andy:run`), Andy expects the directory to have a particular structure. It should be as follows:

```
├── config
│   └── Configuration.java
├── pom.xml
└── src
    ├── main
    │   └── java
    │       └── delft
    │           └── NumberUtils.java
    └── test
        └── java
            └── delft
                └── NumberUtilsTest.java
```

* `Configuration.java` - Andy's configuration file (described below). It must be named exactly `Configuration.java` and it must be placed in a `config` folder in the root of the Maven project.
* `pom.xml` - A Maven POM file defining `andy-maven-plugin` from `io.github.cse1110` as a plugin. [Example](https://github.com/SERG-Delft/andy/blob/main/assignments/domain-and-structural-testing/adding-lists-of-digits/pom.xml)
* `NumberUtils.java` - The class under test. The class name and the package name (and therefore the path) given here are only an example and may be different.
* `NumberUtilsTest.java` - The test suite to be assessed. As with the class under test, the class name and the path may be different.

### Configuration file

Andy's configuration file is a Java class that extends [`RunConfiguration` from `nl.tudelft.cse1110.andy.config`](https://github.com/SERG-Delft/andy/blob/main/andy/src/main/java/nl/tudelft/cse1110/andy/config/RunConfiguration.java).

Andy generates four grade components (branch coverage, mutation coverage, meta tests, and code checks), which it then combines into a single final grade based on the defined weights.

You can find many examples of configuration files under `/andy/src/test/resources/` or under `/assignments`.

#### Weights (required)
The weights of each grading component must be provided in every configuration file. They are passed as a `HashMap`, with each component (`coverage`, `mutation`, `meta`, and `codechecks`) as the key and its weight as the value. The combined weight of all components must sum up to exactly `1.0`. Unused or ungraded components can have their weight set to 0.

```java
@Override
public Map<String, Float> weights() {
    return new HashMap<>() {{
        put("coverage", 0.1f);
        put("mutation", 0.3f);
        put("meta", 0.6f);
        put("codechecks", 0.0f);
    }};
}
```

#### Classes under test (required)

The fully qualified names (FQN) of all classes under test must be provided in the configuration file.

```java
@Override
public List<String> classesUnderTest() {
    return List.of("delft.SoftWhere");
}
```

#### Mode

Andy has three execution modes:

- `PRACTICE` - The default mode, which runs all components (unless otherwise specified in the command) and provides a final grade. It does not show hints unless specifically requested (using `mvn andy:run -Dfull=true`).
- `EXAM` - Checks only code coverage and mutation coverage (i.e., what developers would see in real life) and does not show a final grade. Designed for use in an exam setting, where students should not be able to see code check and meta test results during the exam.
- `GRADING` - Always runs all components, shows hints, and provides a final grade regardless of the command-line options specified. It is often used in scripts to grade students' submissions.

```java
@Override
public Mode mode() {
    return Mode.PRACTICE;
}
```

#### Code coverage

Andy uses JaCoCo to calculate line and branch coverage and to generate a report. In some cases, disabling JaCoCo may be desired, e.g. in a black box testing exercise. This can be done as follows:

```java
@Override
public boolean skipJacoco() {
    return true;
}
```

If JaCoCo is disabled, the weight of the `coverage` grading component must also explicitly be set to 0, as specified above.

By default, if this method is not overridden, JaCoCo will be enabled.

#### Mutation coverage

Andy generates and executes mutants using Pitest. It also generates a Pitest report.

##### Equivalent mutants

In some cases, Pitest may generate equivalent mutants (mutants which are functionally equivalent to the code under test and are therefore impossible to kill). Andy receives two values from Pitest - the number of mutants generated and the number of mutants killed. In such situations, the value specifying the number of mutants generated, which is used for assessment, can be overridden so that students do not lose points for not killing an equivalent mutant. Equivalent mutants cannot be detected automatically by Andy, so this must be checked by hand when creating an exercise.

```java
@Override
public int numberOfMutationsToConsider() {
    return 15;
}
```

If this method is not overridden, Andy assumes that all mutants generated by Pitest are killable.

##### Disabling Pitest

Pitest can be disabled, for example, in black box testing exercises or in exercises for students who do not yet understand what mutation testing is. If you wish to disable Pitest in a particular exercise, you can do so as follows:

```java
@Override
public boolean skipPitest() {
    return true;
}
```

If Pitest is disabled, the weight of the `mutation` grading component must also explicitly be set to 0, as specified above.

By default, if this method is not overridden, Pitest will be enabled.

##### Custom Mutators

Unless otherwise specified, Andy uses Pitest's default mutators. Other mutator groups or specific mutators can be specified if desired. Information about mutators and groups can be found on [the Pitest website](https://pitest.org/quickstart/mutators/).

Mutator groups can be set as follows:

```java
@Override
public List<String> listOfMutants() {
    return STRONGER;
}
```

If necessary, specific mutators can be used as such:

```java
@Override
public List<String> listOfMutants() {
    return List.of("CONDITIONALS_BOUNDARY", "INCREMENTS", "INVERT_NEGS");
}
```

This method usually does not have to be overridden and the default mutator group is sufficient in the vast majority of cases.

#### Meta tests

Meta tests are manually specified mutants which the test suite is evaluated against. They are assessed separately from mutation coverage. A modification is made to the class under test and then the test suite is executed again. If at least one test in the test suite fails or crashes, then the meta test passes (i.e., the test suite succeeded in detecting that bug).

##### Types of meta tests

- String replacement - `MetaTest.withStringReplacement([weight,] name, old, replacement)` - A particular piece of code is searched for and replaced in the class under test. The search can be performed on multiple lines and is not sensitive to indentation differences.
- Line replacement - `MetaTest.withLineReplacement([weight,] name, startLine, endLine, replacement)` - One or more lines are replaced with a different piece of code. The start and end line are inclusive and 1-indexed.
- Line insertion - `MetaTest.insertAt([weight,] name, startLine, content)` - A piece of code is inserted at a particular line (1-indexed), and all following lines in the original code are shifted down to make space.
- External process replacement - `MetaTest.withExternalProcess([weight,] name, externalProcess)` - The external process (described below) is replaced with a different external process. For example, a different binary with a bug can be executed in the background instead of the correctly working one. Used for exercises where students implement system tests of services, such as a web application with Selenium.

##### Usage

```java
@Override
public List<MetaTest> metaTests() {
    return List.of(
            MetaTest.insertAt(2, "returns empty list when list1 is null", 29,
                    "if (list1 == null) return result;"
            ),
            MetaTest.withStringReplacement("returns wrong elements",
                    "if (hashSet.contains(e))",
                    "if (!hashSet.contains(e))"
            ),
            MetaTest.withLineReplacement(3, "compares only elements in the same index", 29, 41,
                    """
                    for (int i = 0; i < list1.size() && i < list2.size(); i++) {
                        if (list1.get(i).equals(list2.get(i))) {
                            result.add(list1.get(i));
                        }
                    }
                    """
            ),
            MetaTest.withExternalProcess(2, "background service does not work",
                    new CommandExternalProcess(
                            "java -jar BrokenSpringWebApp.jar",
                            null)
            )
    );
}
```

Weights are used to calculate the meta test grading component. If a meta test does not have an explicit weight specified, it will be set to 1 by default.

Weights are integer values and define how important meta tests are in relation to each other. For example, if an exercise has two meta tests, one with weight 2 and one with weight 3, the one with weight 3 will be responsible for 60% of the points of the meta test grading component. This behaviour is the same as code check weights.

If meta tests are not used in a particular exercise, the `metaTests` method should not be overridden in order to disable this component. In such cases, the `meta` grading component must also have a weight of 0.

##### Report

Meta test results in the final report look like this:

```
--- Meta tests
4/8 passed
Meta test: returns empty list when list1 is null (weight: 2) PASSED
Meta test: returns wrong elements (weight: 1) FAILED
Meta test: compares only elements in the same index (weight: 3) FAILED
Meta test: background service does not work (weight: 2) PASSED
```
#### Penalty meta tests

Penalty meta tests work in a similar way to regular meta tests. However, they are not considered a grading component. Instead, if a penalty meta test passes, this has no effect on the final score. However, if it fails, its weight is subtracted from the final grade.

Penalty meta tests must have a positive weight, but there is no upper limit on their total weight. For example, if there are two penalty meta tests where one of them has a weight of 10 and the other one 100 (see the example below), and a student fails both of them, the total applied penalty would be 110. In case this makes the final grade negative, the grade is reported as 0 instead.

Penalty meta tests can be defined as follows:

```java
@Override
public List<MetaTest> penaltyMetaTests() {
        return List.of(
            MetaTest.insertAt(2, "returns empty list when list1 is null", 29,
                "if (list1 == null) return result;"
            ),
            MetaTest.withStringReplacement("returns wrong elements",
                "if (hashSet.contains(e))",
                "if (!hashSet.contains(e))"
            ),
            MetaTest.withLineReplacement(3, "compares only elements in the same index", 29, 41,
                    """
                    for (int i = 0; i < list1.size() && i < list2.size(); i++) {
                        if (list1.get(i).equals(list2.get(i))) {
                            result.add(list1.get(i));
                        }
                    }
                    """
            )
        );
}
```

If this method is not overridden, penalty meta tests are disabled.

#### Code checks

Code checks are manually specified static checks executed on the source code of the test suite. They can, for example, be used to evaluate whether students mock or do not mock the right classes in an exercise about test doubles.

##### Types of code checks

Andy provides different checks for JUnit, Mockito, and JQWik tests:

- Test methods:
    - `NumberOfTests`: checks whether the test suite has a minimum number of tests.
    - `TestMethodsHaveAssertions`: checks whether all test methods have assertions.
    - `LoopInTestMethods`: checks whether there is a loop in a test method.
    - `UseOfStringLiterals`: checks whether there is a string literal in a test method.
    - `MethodCalledInTestMethod`: checks whether a method was invoked in a test method.
    - `ClassUsedInSolution`: checks whether a class was used anywhere in the test suite.
    - `MethodCalledAnywhere`: checks whether a method was invoked in any scope.

- Mockito:
    - `MockClass`: Checks whether a class was mocked in the test suite.
    - `MockitoSpy`: Checks whether spies are used.
    - `MockitoVerify`: Checks whether a specific verify has happened.
    - `MockitoWhen`: Checks whether a specific when() has happened.

- JQWik:
    - `JQWikProperty`: checks whether the test suite has a minimum number of properties.
    - `JQWikProvide`: checks whether the test suite has a minimum number of provide.
    - `JQWikCombinator`: checks whether a Combinator was used.
    - `JQWikArbitrary`: checks whether a specific Arbitrary<X> is provided by any method in the test suite.
    - `JQWikArbitraries`: checks whether a Arbitraries.x() is used in the test suite.
    - `JQWikProvideAnnotations`: checks whether tests use Provide annotations, e.g., @ForAll, @Positive.

Each of these checks receives different parameters. Check their specific Javadoc for more details. [All code checks and their full documentation can be found here.](https://github.com/SERG-Delft/andy/tree/main/andy/src/main/java/nl/tudelft/cse1110/andy/codechecker/checks)

##### Boolean logic

Code checks can be inverted by passing `true` as the third argument of SingleCheck.

Code checks can also be combined using `AndCheck` and `OrCheck`.

##### Usage

```java
@Override
public CheckScript checkScript() {
    return new CheckScript(List.of(
            new SingleCheck(2, "should NOT have loops", true
                    new LoopInTestMethods()),
            new SingleCheck(2, "should have properties",
                    new JQWikProperty(Comparison.GTE, 1)),
            new OrCheck(8, "either make use of Arbitraries or JQWik IntRange-like annotations",
                    List.of(
                        new AndCheck(List.of(
                                new SingleCheck(new JQWikArbitrary()),
                                new SingleCheck(new JQWikProvide(Comparison.GTE, 1))
                        )),
                        new AndCheck(List.of(
                                new SingleCheck(new JQWikProvide(Comparison.EQ, 0)),
                                new SingleCheck(new JQWikProperty(Comparison.GTE, 3)),
                                new SingleCheck(new JQWikProvideAnnotations())
                        ))
                    )
                )
    ));
}
```

##### Weights

Weights are used to calculate the code check grading component. If a code check does not have an explicit weight specified, it will be set to 1 by default.

Note that if you provide a name and/or weight to any of the internal checks inside of an `AndCheck` or `OrCheck`, those parameters will be ignored; only the name and weight of the outermost "and" or "or" check are taken into account.

Weights are integer values and define how important code checks are in relation to each other. For example, if an exercise has two code checks, one with weight 2 and one with weight 3, the one with weight 3 will be responsible for 60% of the points of the code check grading component. This behaviour is the same as meta test weights.

##### Report

Code check results in the final report look like this:

```
--- Code checks
2/12 passed
should NOT have loops: PASS (weight: 2)
should have properties: FAIL (weight: 2)
either make use of Arbitraries or JQWik IntRange-like annotations: FAIL (weight: 8)
```

#### Penalty code checks

Penalty code checks work in a similar way to regular code checks. However, they are not considered a grading component. Instead, if a penalty code check passes, this has no effect on the final score. However, if it fails, its weight is subtracted from the final grade.

Penalty code checks must have a positive weight, but there is no upper limit on their total weight. For example, if there are two penalty code checks where one of them has a weight of 10 and the other one 100 (see the example below), and a student fails both of them, the total applied penalty would be 110. In case this makes the final grade negative, the grade is reported as 0 instead.

Penalty code checks can be defined as follows:

```java
@Override
public CheckScript penaltyCheckScript() {
    return new CheckScript(List.of(
            // this check deducts 10 points if it fails
            new SingleCheck(10, "Trip Repository should be mocked",
                    new MockClass("TripRepository")),
            // this check overrides the grade to 0 if it fails
            new SingleCheck(100, "Reservation Repository should be mocked",
                    new MockClass("ReservationRepository"))
    ));
}
```

If this method is not overridden, penalty code checks are disabled.

#### Success message

When a student gets a result of 100/100, a custom message can be defined to be shown in the final report.

```java
@Override
public String successMessage() {
    return "Congratulations! You did it!";
}
```

If this method is not overridden, a custom message will not be shown.

#### External process

A background service can be started before executing the test suite. This can be, for example, a web application that students need to write system tests for using Selenium.

An initialization signal can also be provided. This is a string that Andy will search for in the program's standard output, and it will not execute the test suite until that string is found. This can be used to ensure that the tests are run after the service has finished initializing and is ready to accept requests. The initialization signal can be set to `null` in order to start executing the test suite immediately after starting the process.

External process meta tests, as described above, can be used to replace the background service with a different one in order to evaluate the test suite.

External processes can also be used for other tasks, such as executing a shell script or decompressing an archive file before starting the tests; it does not necessarily have to be a background service.

```java
@Override
public ExternalProcess externalProcess() {
    return new CommandExternalProcess(
            "java -jar SpringApp.jar",
            "Started successfully");
}
```

If this method is not overridden, the external process functionality is disabled.

## Developing Andy

Andy uses a multi-module Maven configuration. IntelliJ should recognize it right away (make sure your Maven plugin is enabled). The Maven tab in IntelliJ is also a useful one in case you need to refresh things.

In the command-line, a great way to see if Andy is working is to install and run all the tests. Call it from the root directory of the project:

```
mvn clean install -DexcludedGroups=selenium
```

Other useful commands:

* `mvn test -pl andy -DexcludedGroups=selenium` runs all tests, with the exception of tests you don't have credentials to run
* `mvn test -pl andy -DexcludedGroups=assignments` runs all fast tests in Andy's core
* `mvn test -pl andy -Dgroups=assignments` ensures that all the solutions of our assignments are assessed to 100/100
* `mvn -pl andy package -DskipTests` creates a package of Andy core
* `mvn -pl weblab-runner package -DskipTests` creates a package of Weblab runner

## Team

Andy was envisioned by Maurício Aniche and Frank Mulder.

Summer 2021 team: Nadine Kuo, Jan Warchocki, Florena Buse, Teodor Oprescu, Martin Mladenov, Yoon Hwan Jeong, Thijs Nulle, Paul Hübner.

## License

This code is licensed under the MIT license.

## Acknowledgment

Andy is named after [Andy Zaidman](https://azaidman.github.io), professor in Software Quality at the
Delft University of Technology in the Netherlands. Andy is a strong proponent of software testing, and
even teaches it in his 1st year introduction to programming course!
Have you seen [Andy's TED talk](https://www.youtube.com/watch?v=IfXVEz_mMHI) on testing?


++++

++++

== HiveMQ Edge

image:https://img.shields.io/github/actions/workflow/status/hivemq/hivemq-edge/check.yml?branch=master[GitHub Workflow Status (with branch),link=https://github.com/hivemq/hivemq-edge/actions/workflows/check.yml?query=branch%3Amaster]

HiveMQ Edge is a Java-based open-source, modular, secure by design platform which consolidates industrial workloads, unifying them into open-standards MQTT to connect to the enterprise.
Seamlessly defining UNS by deployment, using targeted data model & transformation plugins, allows IT and OT to unify and ‘control by policy’, data collected at the Edge.

It is a Java-based open source MQTT and MQTT-SN broker that fully supports MQTT 3.x,5 and MQTT-SN 1.2.

image::docs/edge-intro.gif[title=Edge Intro, align="center"]

* Website: https://www.hivemq.com/
* Documentation: https://docs.hivemq.com/hivemq-edge/index.html
* Community Forum: https://community.hivemq.com/
* Contribution guidelines: link:CONTRIBUTING.adoc[Contributing.adoc]
* License: The source files in this repository are made available under the link:LICENSE[Apache License Version 2.0].

When you deploy HiveMQ Edge using Docker, you will have a preview of commercially licensed features.

== Features

* Converters for OPC UA, Modbus, and other protocols into MQTT messages
* All MQTT 3.1, 3.1.1 and MQTT 5.0 features
* MQTT over TCP, TLS, WebSocket and Secure WebSocket transport
* Integrated MQTT-SN gateway allowing constrained devices to access the MQTT broker.
* Bidirectional MQTT bridge functionality to connect to enterprise MQTT brokers
* Java Extension SDK for:
** Authentication
** Authorization
** Client Initializers
** MQTT Packet Interceptors
** Interacting with Publishes, Retained Messages, Clients and Subscriptions
* Running on Windows, Linux and MacOS (Linux is recommended)

=== MQTT Broker

HiveMQ Edge incorporates a fully standards compliant MQTT broker.
Connect your devices to the broker to subscribe and gain access to data obtained from devices on the Edge.

HiveMQ Edge is compatible with all MQTT 3.x and MQTT 5 clients, including Eclipse Paho and https://github.com/hivemq/hivemq-mqtt-client[HiveMQ MQTT Client].

=== MQTT-SN Gateway

HiveMQ Edge incorporates an MQTT-SN gateway allowing constrained devices to access the MQTT broker.

MQTT-SN is an optimized version of the MQTT specification designed for use on small, low powered, sensor devices, often running on the edge of the network; typical of the IoT.

=== Protocol Adapters

A protocol adapter contributes code to connect to PLCs and converts the data retrieved from these devices into MQTT messages which are PUBLISHED into the local MQTT broker.
More Protocol adapters will be added to the project over time.

* OPC UA
* Modbus
* Siemens S7
* Beckhoff ADS
* Allen-Bradley Ethernet/IP
* HTTP
* and many more

=== MQTT Bridging

HiveMQ allows you to backhaul your data into an enterprise broker using MQTT bridges.
Connect any number of bridges to transport Edge data upstream. By connecting Edge to enterprise MQTT brokers like https://www.hivemq.com/[HiveMQ] you can build a flexible https://www.hivemq.com/unified-namespace-uns-essentials-iiot-industry-40/[Unified Namespace (UNS)] solution based on open standards.

== Documentation

The documentation for the HiveMQ Edge can be found https://docs.hivemq.com/hivemq-edge/index.html[here].

Additional Resources

* https://www.hivemq.com/mqtt-essentials/[MQTT Essentials]
* https://www.hivemq.com/mqtt-5/[MQTT 5 Essentials]
* https://www.hivemq.com/unified-namespace-uns-essentials-iiot-industry-40/[UNS Essentials]

== HiveMQ Community Forum

The ideal place for questions or discussions about the HiveMQ Edge Edition is our brand new https://community.hivemq.com/[HiveMQ Community Forum].

== How to Use

=== Quick Start

* Download the latest https://github.com/hivemq/hivemq-edge/releases/latest[HiveMQ Edge binary package].
* Unzip the package.
* Run the run.sh (Linux/OSX) or run.bat (Windows) in the bin folder of the package.

[source,bash]
----
cd hivemq-edge-<version>
bin/run.sh
----

[IMPORTANT]
At least Java version 11 is required to run HiveMQ Edge.
If you are in doubt, you can check the installed Java version by entering `java -version` on your command line.

You can now connect MQTT clients to `<ip address>:1883`.

[CAUTION]
If you want to connect devices on external networks to HiveMQ Edge, please make sure your server is reachable from those networks and the required ports (default: 1883) are accessible through your firewall.

=== Run with Docker

All releases are available in the https://hub.docker.com/r/hivemq/hivemq-edge[hivemq/hivemq-edge] repository on DockerHub.
To execute this image, simply run the following command:

[source,bash]
----
docker run --name hivemq-edge -d -p 1883:1883 -p 8080:8080 hivemq/hivemq-edge
----

When the container is running you can connect MQTT clients at port 1883 and access the UI at http://localhost:8080/.

Default credentials for the UI are user: `admin`, password: `hivemq`

To run the current state of `master` branch instead of the latest released version you can use the `snapshot` tag.
----
docker run --name hivemq-edge -p 1883:1883 -p 8080:8080 hivemq/hivemq-edge:snapshot
----

To change the default log level you can set the environment variable `HIVEMQ_LOG_LEVEL` when running the container:

[source,bash]
----
docker run --name hivemq-edge -e HIVEMQ_LOG_LEVEL=INFO -d -p 1883:1883 -p 8080:8080 hivemq/hivemq-edge

----

=== Building from Source

==== Building the Binary Package

Check out the git repository and build the binary package.

[source,bash]
----
git clone https://github.com/hivemq/hivemq-edge.git

cd hivemq-edge

./gradlew :hivemqEdgeZip
----

The package `hivemq-edge-<version>.zip` is created in the sub-folder `build/distributions/`.

==== Building the Docker Image

Check out the git repository and build the Docker image.

[source,bash]
----
git clone https://github.com/hivemq/hivemq-edge.git

cd hivemq-edge

docker/build.sh
----

The Docker image `hivemq/hivemq-edge:snapshot` is created locally.

For further development instructions see the link:CONTRIBUTING.adoc[contribution guidelines].

== Contributing

If you want to contribute to HiveMQ Edge, see the link:CONTRIBUTING.adoc[contribution guidelines].

== License

HiveMQ Edge is licensed under the `APACHE LICENSE, VERSION 2.0`.
A copy of the license can be found link:LICENSE[here].

== Privacy settings

HiveMQ Edge uses a limited number of tracking technologies within the web application. These technologies enable us to analyse usage behavior within the Edge product, in order to measure and improve performance.

The following technologies are currently configured:

- https://www.heap.io/[Heap Analytics], check their information regarding the data collected https://help.heap.io/getting-started/how-heap-works/autocaptured-data/[by the auto-capture configuration]

A consent form will be displayed in the browser at first usage. Opt-in or pot-out will be recorded into the local storage of the browser and the tracker activated - or not - accordingly.

There are two ways you can opt-out before installation and running:

- modify the Edge configuration via the `config.xml` (the `usage-tracking` property allows corporate-wide consent)

[#dissable-tracking]
.Example configuration to disable usage tracking centrally for all users
[source,xml]
----
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <usage-tracking>
        <enabled>false</enabled>
    </usage-tracking>
</hivemq>
----

- modify the frontend configuration (the `VITE_MONITORING_?????` properties in the `./.env` file contains HiveMQ unique application id required to activate the different trackers).

Note that you can also change the `VITE_MONITORING_?????` values to your own account(s) if you use any. It will allow you to collect behaviour on your own infrastructure


# Forgified Fabric API

[![Build](https://github.com/Sinytra/ForgifiedFabricAPI/actions/workflows/build.yml/badge.svg)](https://github.com/Sinytra/ForgifiedFabricAPI/actions/workflows/build.yml)
[![Latest Release](https://img.shields.io/github/v/release/Sinytra/ForgifiedFabricAPI?style=flat&label=Release)](https://github.com/Sinytra/ForgifiedFabricAPI/releases/latest)
[![CurseForge](https://cf.way2muchnoise.eu/forgified-fabric-api.svg)](https://www.curseforge.com/minecraft/mc-mods/forgified-fabric-api)
[![Modrinth](https://img.shields.io/modrinth/dt/Aqlf1Shp?logo=modrinth&label=Modrinth&color=00AF5C)](https://modrinth.com/mod/forgified-fabric-api)
[![Discord](https://discordapp.com/api/guilds/1141048834177388746/widget.png?style=shield)](https://discord.gg/mamk7z3TKZ)

Essential hooks for modding with Fabric ported to MinecraftForge.

Fabric API is the library for essential hooks and interoperability mechanisms for mods. Examples include:

- Exposing functionality that is useful but difficult to access for many mods such as particles, biomes and dimensions
- Adding events, hooks and APIs to improve interopability between mods.
- Essential features such as registry synchronization and adding information to crash reports.
- An advanced rendering API designed for compatibility with optimization mods and graphics overhaul mods.

For support and discussion for both developers and users,
visit [GitHub Discussions](https://github.com/Sinytra/ForgifiedFabricAPI/discussions).

## About

The Forgified Fabric API (FFAPI) is a direct port of [Fabric API](https://github.com/FabricMC/fabric) to Minecraft
Forge, regularly kept up to date with the upstream repository. It is designed to make cross platform mod development
easier by allowing developers to use Fabric API as a common library to interact with the game's code on both platforms.
However, it is not an abstraction layer, and loader-specific code still needs to be handled separately for each
platform.

### Compatibility

The Forgified Fabric API has checks in place to ensure full api compatibility with Fabric API. This usually
includes `net.fabricmc.*.api` packages and other non-internal code. However, we make no guarantees for implementation
code and internal APIs, as they are subject to change at any time. For the best results, avoid using internal classes
and look for native solutions offered by your platform.

Where possible, Fabric APIs such as `FabricItem`, `ItemStorage` and `FluidStorage` are bridged to Forge's counterparts.
More information on how to properly consume bridged APIs can be found in their module's README.

### Extension methods

In some places, Fabric API uses Fabric Loader classes (such as `ModContainer`) in API method headers. These are not
available on Forge, and will result in a crash when referenced by mods at runtime. To solve this problem, FFAPI
introduces new overload methods using their respective FML counterpart (`IModInfo`).

### Design Goals

Our goal is to port as much of Fabric API to use Forge's systems as possible and keep modifications to minecraft's code
at minimum, in order to increase mod compatibility and reduce maintenance costs. On the other hand, it's important that
using Forge API doesn't come at the expense of preserving intended behavior.

## Using Forgified Fabric API to play with mods

Make sure you have installed MinecraftForge first. More information about installing Forge can be
found [here](https://github.com/minecraftforge/minecraftforge/#installing-forge).

The Forgified Fabric API is available for download on the following platforms:

- [GitHub Releases](https://github.com/Sinytra/ForgifiedFabricAPI/releases)
- [CurseForge](https://www.curseforge.com/minecraft/mc-mods/forgified-fabric-api)
- [Modrinth](https://modrinth.com/mod/forgified-fabric-api)

The downloaded jar file should be placed in your `mods` folder.

## Using Forgified Fabric API to develop mods

To set up a Forge development environment, check out
the [MinecraftForge docs](https://docs.minecraftforge.net/en/latest/gettingstarted) and follow the instructions there.

The Forgified Fabric API is published under the `dev.su5ed.sinytra.fabric-api` group. To include the full Forgified
Fabric API with all modules in the development environment, add the following to your `dependencies` block in the gradle
buildscript:

### Groovy DSL

```groovy
repositories {
    maven {
        url "https://maven.su5ed.dev/releases"
    }
}
dependencies {
    compileOnly "dev.su5ed.sinytra.fabric-api:fabric-api:FABRIC_API_VERSION"
    runtimeOnly fg.deobf("dev.su5ed.sinytra.fabric-api:fabric-api:FABRIC_API_VERSION")
}
```

### Kotlin DSL

```kotlin
repositories {
    maven("https://maven.su5ed.dev/releases")
}
dependencies {
    compileOnly("dev.su5ed.sinytra.fabric-api:fabric-api:FABRIC_API_VERSION")
    runtimeOnly(fg.deobf("dev.su5ed.sinytra.fabric-api:fabric-api:FABRIC_API_VERSION"))
}
```

<!--Linked to gradle documentation on properties-->
Instead of hardcoding version constants all over the build script, Gradle properties may be used to replace these
constants. Properties are defined in the `gradle.properties` file at the root of a project. More information is
available [here](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#declare_properties_in_gradle_properties_file).

## Modules

Fabric API is designed to be modular for ease of updating. This also has the advantage of splitting up the codebase into
smaller chunks.

Each module contains its own `README.md`* explaining the module's purpose and additional info on using the module.

\* The README for each module is being worked on; not every module has a README at the moment

## Porting Status

| API                                  |          State           |  Lifecycle   |
|:-------------------------------------|:------------------------:|:------------:|
| fabric-api-base                      |         ✅ Tested         |    Stable    |
| fabric-api-lookup-api-v1             |         ✅ Tested         |    Stable    |
| fabric-biome-api-v1                  |         ✅ Tested         |    Stable    |
| fabric-block-api-v1                  |         ✅ Tested         |    Stable    |
| fabric-block-view-api-v2             |         ✅ Tested         |    Stable    |
| fabric-blockrenderlayer-v1           |         ✅ Tested         |    Stable    |
| fabric-client-tags-api-v1            |         ✅ Tested         |    Stable    |
| fabric-command-api-v2                |         ✅ Tested         |    Stable    |
| fabric-content-registries-v0         |         ✅ Tested         |    Stable    |
| fabric-convention-tags-v1            |         ✅ Tested         |    Stable    |
| fabric-crash-report-info-v1          | 🚧 Not Planned [[1]](#1) |    Stable    |
| fabric-data-generation-api-v1        |         ✅ Tested         |    Stable    |
| fabric-dimensions-v1                 |         ✅ Tested         |    Stable    |
| fabric-entity-events-v1              |         ✅ Tested         |    Stable    |
| fabric-events-interaction-v0         |         ✅ Tested         |    Stable    |
| fabric-game-rule-api-v1              |         ✅ Tested         |    Stable    |
| fabric-gametest-api-v1               | 🚧 Not Planned [[2]](#2) |    Stable    |
| fabric-item-api-v1                   |         ✅ Tested         |    Stable    |
| fabric-item-group-api-v1             |         ✅ Tested         |    Stable    |
| fabric-key-binding-api-v1            |         ✅ Tested         |    Stable    |
| fabric-lifecycle-events-v1           |         ✅ Tested         |    Stable    |
| fabric-loot-api-v2                   |         ✅ Tested         |    Stable    |
| fabric-message-api-v1                |         ✅ Tested         |    Stable    |
| fabric-mining-level-api-v1           |         ✅ Tested         |    Stable    |
| fabric-model-loading-api-v1          |         ✅ Tested         |    Stable    |
| fabric-networking-api-v1             |         ✅ Tested         |    Stable    |
| fabric-object-builder-api-v1         |         ✅ Tested         |    Stable    |
| fabric-particles-v1                  |         ✅ Tested         |    Stable    |
| fabric-recipe-api-v1                 |         ✅ Tested         |    Stable    |
| fabric-registry-sync-v0              |         ✅ Tested         |    Stable    |
| fabric-renderer-api-v1               |         ✅ Tested         |    Stable    |
| fabric-renderer-indigo               |         ✅ Tested         |    Stable    |
| fabric-rendering-fluids-v1           |         ✅ Tested         |    Stable    |
| fabric-rendering-v1                  |         ✅ Tested         |    Stable    |
| fabric-resource-conditions-api-v1    |         ✅ Tested         |    Stable    |
| fabric-resource-loader-v0            |         ✅ Tested         |    Stable    |
| fabric-screen-api-v1                 |         ✅ Tested         |    Stable    |
| fabric-screen-handler-api-v1         |         ✅ Tested         |    Stable    |
| fabric-sound-api-v1                  |         ✅ Tested         |    Stable    |
| fabric-transfer-api-v1               |         ✅ Tested         | Experimental |
| fabric-transitive-access-wideners-v1 |         ✅ Tested         |    Stable    |
| fabric-command-api-v1                |         ✅ Tested         |  Deprecated  |
| fabric-commands-v0                   |        ⚠ Missing        |  Deprecated  |
| fabric-containers-v0                 |        ⚠ Missing        |  Deprecated  |
| fabric-events-lifecycle-v0           |        ⚠ Missing        |  Deprecated  |
| fabric-keybindings-v0                |        ⚠ Missing        |  Deprecated  |
| fabric-loot-tables-v1                |        ⚠ Missing        |  Deprecated  |
| fabric-models-v0                     |         ✅ Tested         |  Deprecated  |
| fabric-networking-v0                 |        ⚠ Missing        |  Deprecated  |
| fabric-renderer-registries-v1        |        ⚠ Missing        |  Deprecated  |
| fabric-rendering-data-attachment-v1  |         ✅ Tested         |  Deprecated  |
| fabric-rendering-v0                  |        ⚠ Missing        |  Deprecated  |


# <img src="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png" alt="OpenTelemetry Icon" width="45" height=""> OpenTelemetry Android

[![Continuous Build][ci-image]][ci-url]
[![Maven Central][maven-image]][maven-url]

## Status: Experimental

* [About](#about)
* [Getting Started](#getting-started)
* [Features](#contributing)
* [Contributing](#contributing)

# About

The repository contains the OpenTelemetry Android SDK for generating mobile
client telemetry for real user monitoring (RUM). It is built on top
of the [OpenTelemetry Java SDK](https://github.com/open-telemetry/opentelemetry-java).

# Getting Started

> If your project's minSdk is lower than 26, then you must enable
> [corelib desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring).
> See [#73](https://github.com/open-telemetry/opentelemetry-android/issues/73) for more information.
> If your project's minSdk is lower than 24, in order to run instrumentation tests or run the app
> built on debug, you must use AGP 8.3.0+ and set the `android.useFullClasspathForDexingTransform`
> property in `gradle.properties` to `true` to ensure desugaring runs properly. For the full
> context for this workaround, please see
> [this issue](https://issuetracker.google.com/issues/230454566#comment18).

For an overview of how to contribute, see the contributing guide
in [CONTRIBUTING.md](CONTRIBUTING.md).

We are also available in the [#otel-android](https://cloud-native.slack.com/archives/C05J0T9K27Q)
channel in the [CNCF slack](https://slack.cncf.io/). Please join us there for further discussions.

## Gradle

To use this android instrumentation library in your application, first add a dependency
in your gradle build script:

```kotlin
dependencies {
    //...
    implementation("io.opentelemetry.android:android-agent:0.6.0-alpha")
    //...
}
```

# Features

This android library builds on top of
the [OpenTelemetry Java SDK](https://github.com/open-telemetry/opentelemetry-java).
Some of the additional features provided include:

* Crash reporting
* ANR detection
* Network change detection
* Full Android Activity and Fragment lifecycle monitoring
* Access to the OpenTelemetry APIs for manual instrumentation
* Helpers to redact any span from export, or change span attributes before export
* Slow / frozen render detection
* Offline buffering of telemetry via storage

Note: Use of these features is not yet well documented.

# Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## Approvers ([@open-telemetry/android-approvers](https://github.com/orgs/open-telemetry/teams/android-approvers)):

- [Hanson Ho](https://github.com/bidetofevil), Embrace
- [Jack Berg](https://github.com/jack-berg), New Relic
- [Manoel Aranda Neto](https://github.com/marandaneto), PostHog
- [Trask Stalnaker](https://github.com/trask), Microsoft

## Maintainers ([@open-telemetry/android-maintainers](https://github.com/orgs/open-telemetry/teams/android-maintainers)):

- [Jason Plumb](https://github.com/breedx-splk), Splunk
- [Cesar Munoz](https://github.com/likethesalad), Elastic

[ci-image]: https://github.com/open-telemetry/opentelemetry-android/actions/workflows/build.yaml/badge.svg

[ci-url]: https://github.com/open-telemetry/opentelemetry-android/actions?query=workflow%3Abuild+branch%3Amain

[maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry.android/instrumentation/badge.svg

[maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry.android/instrumentation


# <img alt="Smithy" src="docs/_static/favicon.png" width="28"> Smithy
[![Build Status](https://github.com/smithy-lang/smithy/workflows/ci/badge.svg)](https://github.com/smithy-lang/smithy/actions/workflows/ci.yml)

Smithy defines and generates clients, services, and documentation for
any protocol.

* [Smithy Homepage][docs]
* [Specifications][specs]
* [Java API documentation][javadocs]
* [Smithy Gradle Plugin][Smithy Gradle Plugin]
* [Awesome Smithy][awesome-smithy]

# Smithy IDL

Smithy models define a service as a collection of resources, operations, and
shapes.

```smithy
$version: "2"

namespace example.weather

service Weather {
    version: "2006-03-01"
    resources: [City]
    operations: [GetCurrentTime]
}

resource City {
    identifiers: { cityId: CityId }
    read: GetCity
    list: ListCities
    resources: [Forecast]
}

// See the full example at https://smithy.io/2.0/quickstart.html#complete-example
```

Find out more about modeling a service with Smithy in the [Quick Start
guide][quickstart].

# Building Smithy models
> [!IMPORTANT]
> Before you proceed, make sure you have the [Smithy CLI installed](https://smithy.io/2.0/guides/smithy-cli/cli_installation.html#cli-installation).

The [Smithy CLI] is the easiest way to get started with building Smithy models. First, create a [`smithy-build.json`] file:

```json
{
    "version": "1.0",
    "sources": ["model"]
}
```

Next, create your first model `model/main.smithy`:

```smithy
$version: "2"

namespace com.example

service ExampleService {
    version: "2020-05-27"
}
```

Finally, run `smithy build` to build the model with the [Smithy CLI].

Find out more about building artifacts of your Smithy model in the [Building
Smithy Models][building] guide. For more examples, see the
[examples repository](https://github.com/smithy-lang/smithy-examples)

# License

This library is licensed under the Apache 2.0 License.

[docs]: https://smithy.io/
[specs]: https://smithy.io/2.0/spec/
[javadocs]: https://smithy.io/javadoc/latest/
[quickstart]: https://smithy.io/2.0/quickstart.html
[Smithy Gradle Plugin]: https://github.com/awslabs/smithy-gradle-plugin/
[Smithy CLI]: https://smithy.io/2.0/guides/smithy-cli/index.html
[`smithy-build.json`]: https://smithy.io/2.0/guides/building-models/build-config.html#using-smithy-build-json
[building]: https://smithy.io/2.0/guides/building-models/index.html
[awesome-smithy]: https://github.com/smithy-lang/awesome-smithy


Amoro(former name was Arctic) is a Lakehouse management system built on open data lake formats.
Working with compute engines including Flink, Spark, and Trino, Amoro brings pluggable and self-managed features for Lakehouse to provide out-of-the-box data warehouse experience,
and helps data platforms or products easily build infra-decoupled, stream-and-batch-fused and lake-native architecture.

## Architecture

Here is the architecture diagram of Amoro:

* AMS: Amoro Management Service provides Lakehouse management features, like self-optimizing, data expiration, etc.
  It also provides a unified catalog service for all compute engines, which can also be combined with existing metadata services.
* Plugins: Amoro provides a wide selection of external plugins to meet different scenarios.
    * Optimizers: The self-optimizing execution engine plugin asynchronously performs merging, sorting, deduplication,
      layout optimization, and other operations on all type table format tables.
    * Terminal: SQL command-line tools, provide various implementations like local Spark and Kyuubi.
    * LogStore: Provide millisecond to second level SLAs for real-time data processing based on message queues like Kafka and Pulsar.

## Supported table formats

Amoro can manage tables of different table formats, similar to how MySQL/ClickHouse can choose different storage engines.
Amoro meets diverse user needs by using different table formats. Currently, Amoro supports four table formats:

* Iceberg format: Users can directly entrust their Iceberg tables to Amoro for maintenance, so that users can not only use all the functions of Iceberg tables, but also enjoy the performance and stability improvements brought by Amoro.
* Mixed-Iceberg format: Amoro provides a set of more optimized formats for streaming update scenarios on top of the Iceberg format. If users have high performance requirements for streaming updates or have demands for CDC incremental data reading functions, they can choose to use the Mixed-Iceberg format.
* Mixed-Hive format: Many users do not want to affect the business originally built on Hive while using data lakes. Therefore, Amoro provides the Mixed-Hive format, which can upgrade Hive tables to Mixed-Hive format only through metadata migration, and the original Hive tables can still be used normally. This ensures business stability and benefits from the advantages of data lake computing.
* Paimon format: Amoro supports displaying metadata information in the Paimon format, including Schema, Options, Files, Snapshots, DDLs, and Compaction information.

## Supported engines

### Iceberg format

Iceberg format tables use the engine integration method provided by the Iceberg community.
For details, please refer to: [Iceberg Docs](https://iceberg.apache.org/docs/latest/).

### Mixed format

Amoro support multiple processing engines for Mixed format as below:

| Processing Engine | Version                | Batch Read  | Batch Write | Batch Overwrite | Streaming Read | Streaming Write | Create Table | Alter Table |
|-------------------|------------------------|-------------|-------------|-----------------|----------------|-----------------|--------------|-------------|
| Flink             | 1.15.x, 1.16.x, 1.17.x |  ✔   |   ✔   |       ✖   |      ✔   |       ✔   |    ✔   |   ✖   |
| Spark             | 3.1, 3.2, 3.3          |  ✔   |   ✔   |       ✔   |      ✖   |       ✖   |    ✔   |   ✔   |
| Hive              | 2.x, 3.x               |  ✔  |   ✖  |       ✔  |      ✖  |       ✖  |    ✖  |   ✔  |
| Trino             | 406                    |  ✔  |   ✖  |       ✔  |      ✖  |       ✖  |    ✖  |   ✔  |

## Features

- Self-optimizing - Continuously optimizing tables, including compacting small files, change files, regularly delete expired files to keep high query performance and reducing storage costs.
- Multiple Formats - Support different table formats such as Iceberg, Mixed-Iceberg and Mixed-Hive to meet different scenario requirements and provide them with unified management capabilities.
- Catalog Service - Provide a unified catalog service for all compute engines, which can also used with existing metadata store service such as Hive Metastore and AWS Glue.
- Rich Plugins - Provide various plugins to integrate with other systems, like continuously optimizing with Flink and data analysis with Spark and Kyuubi.
- Management Tools - Provide a variety of management tools, including WEB UI and standard SQL command line, to help you get started faster and integrate with other systems more easily.
- Infrastructure Independent - Can be easily deployed and used in private environments, cloud environments, hybrid cloud environments, and multi-cloud environments.

## Modules

Amoro contains modules as below:

- `amoro-core` contains core abstractions and common implementation for other modules
- `amoro-ams` is amoro management service module
    - `ams-api` contains ams thrift api and common interfaces
    - `ams-dashboard` is the dashboard frontend for ams
    - `ams-server` is the backend server for ams
    - `ams-optimizer` provides default optimizer implementation
- `amoro-mixed-format` provides Mixed format implementation
    - `amoro-hive` integrates with Apache Hive and implements Mixed Hive format
    - `amoro-flink` provides Flink connectors for Mixed format tables (use amoro-flink-runtime for a shaded version)
    - `amoro-spark` provides Spark connectors for Mixed format tables (use amoro-spark-runtime for a shaded version)
    - `amoro-trino` provides Trino connectors for Mixed format tables

## Building

Amoro is built using Maven with Java 1.8 and Java 17(only for `mixed-format/trino` module).

* To build Trino module need config `toolchains.xml` in `${user.home}/.m2/` dir, the content is

```
<?xml version="1.0" encoding="UTF-8"?>
<toolchains>
    <toolchain>
        <type>jdk</type>
        <provides>
            <version>17</version>
            <vendor>sun</vendor>
        </provides>
        <configuration>
            <jdkHome>${YourJDK17Home}</jdkHome>
        </configuration>
    </toolchain>
</toolchains>
```

* To invoke a build and run tests: `mvn package -P toolchain`
* To skip tests: `mvn -DskipTests package -P toolchain`
* To package without trino module and JAVA 17 dependency: `mvn clean package -DskipTests -pl '!mixed-format/trino'`
* To build with hadoop 2.x(the default is 3.x) `mvn clean package -DskipTests -Dhadoop=v2`
* To indicate Flink version for optimizer (the default is 1.18.1): `mvn clean package -Dflink-optimizer.flink-version=1.15.4`. If the version of Flink is below 1.15.0, you also need to add the `-Pflink-pre-1.15` parameter: `mvn clean package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6`.
  `mvn clean package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6 -DskipTests`

>Spotless is skipped by default in `trino` module. So if you want to perform checkstyle when building `trino` module, you must be in a Java 17 environment.

* To invoke a build include `mixed-format/trino` module in Java 17 environment: `mvn clean package -DskipTests -P trino-spotless`
* To only build `mixed-format/trino` and its dependent modules in Java 17 environment: `mvn clean package -DskipTests -P trino-spotless -pl 'mixed-format/trino' -am`
## Quickstart

Visit [https://amoro.netease.com/quick-demo/](https://amoro.netease.com/quick-demo/) to quickly
explore what amoro can do.

## Join Community

If you are interested in Lakehouse, Data Lake Format, welcome to join our community, we welcome any organizations, teams
and individuals to grow together, and sincerely hope to help users better use Data Lake Format through open source.

Join the Amoro WeChat Group: Add " `kllnn999` " as a friend on WeChat and specify "Amoro lover".

## Contributors
This project exists thanks to all the people who contribute.

Made with [contrib.rocks](https://contrib.rocks).

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=NetEase/amoro&type=Date)](https://star-history.com/#NetEase/amoro&Date)