Skip to content

Commit 880054e

Browse files
authored
Merge pull request #5 from PhonePe/develop_shantanu
Open source sync + Add Zensical documentation + Github workflows
2 parents 3d802cc + 9561739 commit 880054e

196 files changed

Lines changed: 18305 additions & 2409 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 82 additions & 438 deletions
Large diffs are not rendered by default.

.github/workflows/docs.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- '.github/workflows/docs.yml'
10+
pull_request:
11+
paths:
12+
- 'docs/**'
13+
- '.github/workflows/docs.yml'
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: pages-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
pr-build-check:
25+
name: Docs build check (PR)
26+
if: github.event_name == 'pull_request'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout Code
30+
uses: actions/checkout@v4
31+
- name: Setup Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.x'
35+
- name: Install zensical and plugins
36+
run: pip install -r requirements.txt
37+
working-directory: ./docs
38+
- name: Build site
39+
run: zensical build --clean
40+
working-directory: ./docs
41+
42+
deploy:
43+
name: Deploy docs
44+
if: github.event_name != 'pull_request'
45+
permissions:
46+
pages: write
47+
id-token: write
48+
contents: read
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout Code
55+
uses: actions/checkout@v4
56+
- name: Configure Pages
57+
uses: actions/configure-pages@v5
58+
- name: Setup Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: '3.x'
62+
- name: Install zensical and plugins
63+
run: pip install -r requirements.txt
64+
working-directory: ./docs
65+
- name: Build site
66+
run: zensical build --clean
67+
working-directory: ./docs
68+
- name: Upload Pages artifact
69+
uses: actions/upload-pages-artifact@v4
70+
with:
71+
path: docs/site
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Maven Central Repository
11+
uses: actions/setup-java@v4
12+
with:
13+
java-version: '17'
14+
distribution: 'zulu'
15+
server-id: central
16+
server-username: MAVEN_USERNAME
17+
server-password: MAVEN_PASSWORD
18+
gpg-private-key: ${{ secrets.CENTRAL_GPG_KEY }}
19+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
20+
- name: Set version
21+
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
22+
- name: Publish package
23+
run: mvn -P release --batch-mode deploy -DskipTests
24+
env:
25+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN_USERNAME }}
26+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }}
27+
MAVEN_GPG_PASSPHRASE: ${{ secrets.CENTRAL_GPG_KEY_PASSWORD }}
28+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/maven.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '17'
28+
distribution: 'temurin'
29+
cache: maven
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
33+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
34+
- name: Update dependency graph
35+
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

.github/workflows/sonarcloud-checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
restore-keys: ${{ runner.os }}-m2
3333
- name: Build and analyze
3434
env:
35+
USER_NAME: ${{ secrets.PPE_USER_NAME }}
36+
ACCESS_TOKEN: ${{ secrets.PPE_ACCESS_TOKEN }}
3537
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3638
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=PhonePe_mustang
39+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=PhonePe_Mustang

.gitignore

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,6 @@
1-
### Java template
2-
*.class
3-
4-
# Mobile Tools for Java (J2ME)
5-
.mtj.tmp/
6-
7-
# Package Files #
8-
*.jar
9-
*.war
10-
*.ear
11-
12-
hs_err_pid*
13-
### JetBrains template
14-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
15-
16-
*.iml
17-
18-
## File-based project format:
19-
*.ipr
20-
*.iws
21-
22-
## Plugin-specific files:
23-
24-
# IntelliJ
25-
/out/
26-
27-
# mpeltonen/sbt-idea plugin
28-
.idea_modules/
29-
30-
# JIRA plugin
31-
atlassian-ide-plugin.xml
32-
33-
# Crashlytics plugin (for Android Studio and IntelliJ)
34-
com_crashlytics_export_strings.xml
35-
crashlytics.properties
36-
crashlytics-build.properties
37-
38-
39-
## Directory-based project format:
401
/.idea/
412
/target/
42-
benchmarking/.idea/
43-
benchmarking/target/
3+
*/target/
444
*.iml
455
*.ipr
466
*.iws
@@ -50,3 +10,10 @@ benchmarking/target/
5010
.DS_Store
5111

5212
/bin/
13+
14+
benchmarking/.idea/
15+
benchmarking/target/
16+
benchmarking/dependency-reduced-pom.xml
17+
18+
# Zensical docs build output
19+
docs/site/

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

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

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

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

2525
## Our Responsibilities
2626

@@ -34,13 +34,10 @@ This Code of Conduct applies both within project spaces and in public spaces whe
3434

3535
## Enforcement
3636

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mohammed.irfanulla.s1@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening a GitHub issue or contacting the maintainers listed in [CODEOWNERS](CODEOWNERS). All complaints will be reviewed and investigated, and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
4040

4141
## Attribution
4242

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44-
45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
43+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/).

CONTRIBUTING.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Contributing to Mustang
2+
3+
Thank you for your interest in contributing to Mustang! We welcome contributions in all forms — bug reports, feature requests, documentation improvements, and code changes.
4+
5+
---
6+
7+
## Code of Conduct
8+
9+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
10+
11+
---
12+
13+
## How to Contribute
14+
15+
### Reporting Bugs
16+
17+
Before opening a bug report, please:
18+
1. Search [existing issues](https://github.com/PhonePe/mustang/issues) to avoid duplicates.
19+
2. Use the latest released version if possible.
20+
21+
When filing a bug, include:
22+
- A clear description of the problem and expected behaviour.
23+
- The version of Mustang you are using.
24+
- A minimal reproducible example (code snippet or unit test).
25+
- Stack traces or error logs, if relevant.
26+
27+
### Suggesting Features
28+
29+
Open a [GitHub issue](https://github.com/PhonePe/mustang/issues) with the label `enhancement`. Describe:
30+
- The problem you are trying to solve.
31+
- The proposed solution and any alternatives you considered.
32+
33+
---
34+
35+
## Development Setup
36+
37+
### Prerequisites
38+
39+
- **Java 17+** (OpenJDK or Temurin recommended)
40+
- **Maven 3.9+**
41+
- Git
42+
43+
### Build
44+
45+
```bash
46+
git clone https://github.com/PhonePe/mustang.git
47+
cd mustang
48+
mvn clean verify
49+
```
50+
51+
This compiles all modules (`mustang-models`, `mustang-core`, `mustang-dw-bundle`) and runs the full test suite.
52+
53+
### Running Tests
54+
55+
```bash
56+
mvn test
57+
```
58+
59+
To run tests for a specific module:
60+
61+
```bash
62+
mvn test -pl mustang-core
63+
```
64+
65+
### Code Style
66+
67+
- This project uses standard Java conventions with [Lombok](https://projectlombok.org/) for boilerplate reduction.
68+
- Indentation: **tabs** (see `lombok.config` and `.editorconfig`).
69+
- Line length: **120 characters** maximum.
70+
- All public types and methods should have Javadoc.
71+
72+
---
73+
74+
## Pull Request Process
75+
76+
1. **Fork** the repository and create your branch from `main`.
77+
2. **Write tests** for any new functionality or bug fixes.
78+
3. **Ensure all tests pass**: `mvn clean verify`
79+
4. **Update documentation** — update the relevant docs in `docs/` and `README.md` if you change behaviour.
80+
5. **Open a Pull Request** against `main` with:
81+
- A clear title and description.
82+
- References to any related issues (`Fixes #123`).
83+
84+
### PR Requirements
85+
86+
- All CI checks must pass.
87+
- At least one approval from a [CODEOWNER](CODEOWNERS).
88+
- No unresolved review comments.
89+
90+
---
91+
92+
## Release Process
93+
94+
Releases are performed by maintainers:
95+
96+
1. Bump the version in all `pom.xml` files.
97+
2. Tag the release on `main`.
98+
3. The [`maven-central-publish.yml`](.github/workflows/maven-central-publish.yml) workflow deploys to Maven Central.
99+
100+
---
101+
102+
## Questions?
103+
104+
Open a [GitHub Discussion](https://github.com/PhonePe/mustang/discussions) or file an issue.

0 commit comments

Comments
 (0)