From e316d8a0b2a4a08262b3fa5c136c949dab3b06fd Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Sat, 21 Dec 2024 15:57:40 -0500 Subject: [PATCH] adding caching of dependencies --- .github/workflows/tests.yml | 9 +++++++ CONTRIBUTING.md | 49 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c32638c..19ff181 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,15 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies run: | sudo apt-get install -y libopenmpi-dev diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1be7392 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing + +We appreciate your interest in improving this project. Here are some guidelines: + +1. Fork the repository and create a new branch. +2. Follow existing code styles and conventions. +3. Write clear commit messages. +4. Test your changes thoroughly. +5. Open a Pull Request with a concise summary. + +## Setting Up the Development Environment + +To set up the development environment, follow these steps: + +1. **Clone the repository**: + ```sh + git clone https://github.com/your-username/JaxPM.git + cd JaxPM + ``` + +2. **Create a virtual environment**: + ```sh + python -m venv --system-site-packages venv + source venv/bin/activate # On Windows use `venv\Scripts\activate` + ``` + +3. **Install the dependencies**: + ```sh + pip install -r requirements-test.txt + pip install -e . + ``` + +4. **Install pre-commit hooks**: + ```sh + pre-commit install + ``` + This will run code formatting and linting checks before each commit. + +## Running Tests + +To run the tests, use the following command: + +```sh +pytest +``` + +Make sure all tests pass before submitting your changes. + +Thank you for contributing!