diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..86b48cc --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a30b80..cafc2e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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//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. \ No newline at end of file diff --git a/README.md b/README.md index 77657fa..e757313 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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. +