Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer at hicham@bakir.io. All complaints will be reviewed and investigated promptly and fairly.

All contributors are expected to follow the code of conduct in all community venues—online and in-person—as well as in all one-on-one communications pertaining to community business.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
43 changes: 39 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,45 @@ This project is part of a personal journey back into equity derivatives, with a
## 🚀 Getting Started

1. **Fork** the repository.
2. **Clone** your fork and set up the project locally.
3. Use **Maven** or **Gradle** to build and test.
2. **Clone** your fork locally and checkout the `main` branch:

Example (using Maven):
```bash
git clone https://github.com/<your-username>/option-pricing-java.git
cd option-pricing-java
```
3. Use the Gradle wrapper (`./gradlew`) as the primary build tool to compile and run tests:

```bash
./gradlew clean check
```

4. To launch the application locally:

```bash
./gradlew bootRun
```

## 🧪 Running Tests

All tests are written in Groovy using the Spock framework. To run specific suites:

```bash
mvn clean install
# Unit tests
./gradlew test

# Integration tests
./gradlew integrationTest

# End-to-end tests
./gradlew e2eTest

# Or run them all (unit + integration + e2e)
./gradlew check
```

## 📝 Pull Request Guidelines

- Create feature branches from `main` (e.g., `feature/add-black-scholes`).
- Write clear, descriptive commit messages and reference any related issues.
- Ensure all tests pass before pushing: `./gradlew clean check`.
- Open a pull request targeting the `main` branch and describe your changes.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ tech mindset.
- ✅ Implied volatility solver (coming soon)
- ✅ CLI or REST interface (planned)
- ✅ 100% unit tested
## Prerequisites

- Java 17 or higher
- Git

## Usage

Expand All @@ -25,6 +29,21 @@ BlackScholesCalculator.calcPrice(
);
```

## Running the application

You can start the Spring Boot service via the Gradle wrapper:

```bash
./gradlew bootRun
```

By default, the server listens on port 8080. Check health with:

```bash
curl http://localhost:8080/
# OK
```

## Motivation

I worked on the exotic derivatives desk in the late 90s as a UI developer. This is my way of returning — not as a trader
Expand All @@ -40,19 +59,23 @@ Copyright (c) 2025 Hicham BAKIR

## Building and Testing

Use the Gradle Wrapper to build and test the project:
Use the included Gradle wrapper (`./gradlew`) as the main build tool to compile and test:

```bash
./gradlew clean check
```

Tests are organized into:
Tests are written in Groovy using the Spock framework and organized into:

- **Unit tests** (src/test/groovy)
- **Integration tests** (src/integrationTest/groovy)
- **End-to-end tests** (src/e2eTest/groovy)
- **Unit tests** (`src/test/groovy`)
- **Integration tests** (`src/integrationTest/groovy`)
- **End-to-end tests** (`src/e2eTest/groovy`)

## Continuous Integration

A GitHub Actions workflow is configured in `.github/workflows/ci.yml` to run tests on push and pull requests to `main`. Merges to `main` should require passing this CI.

## Contributing & Code of Conduct

Contributions are welcome! Please review [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute, and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for community standards.

Loading