Skip to content

Commit

Permalink
Merge pull request #2 from deel-ai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Algue-Rythme authored Mar 20, 2024
2 parents 5d3655c + ecd2958 commit c43e6c7
Show file tree
Hide file tree
Showing 67 changed files with 13,732 additions and 1,341 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/python-linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: lip-dp linters

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
checks:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Check lint
run: tox -e py311-lint
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: tests

on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]

jobs:
build-and-test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest]

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
cache: 'pip'
- name: Install dependencies
run: |
set -xe
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -r requirements_dev.txt
shell: bash
- name: Build
run: |
set -xe
python -VV
python -m pip install .
shell: bash
- name: Run tests
timeout-minutes: 60
run: |
set -xe
python -VV
python -c "import tensorflow as tf; print('tf', tf.__version__)"
pytest tests
shell: bash
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
rev: v3.0.0a5
hooks:
- id: pylint
args: [--enable=unused-import --max-line-length=100, --disable=all]
args: [--disable=all]


# - repo: https://github.com/commitizen-tools/commitizen
Expand Down
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Thanks for taking the time to contribute!

From opening a bug report to creating a pull request: every contribution is
appreciated and welcome. If you're planning to implement a new feature or change
the api please create an [issue first](https://https://github.com/deel-ai/dp-lipschitz/issues/new). This way we can ensure that your precious
the api please create an [issue first](https://github.com/Algue-Rythme/lip-dp/issues). This way we can ensure that your precious
work is not in vain.


## Setup with make

- Clone the repo `git clone https://github.com/deel-ai/dp-lipschitz.git`.
- Go to your freshly downloaded repo `cd lipdp`
- Clone the repo `git clone git@github.com:Algue-Rythme/lip-dp.git`.
- Go to your freshly downloaded repo `cd lip-dp`
- Create a virtual environment and install the necessary dependencies for development:

`make prepare-dev && source lipdp_dev_env/bin/activate`.
Expand All @@ -26,9 +26,8 @@ This command activate your virtual environment and launch the `tox` command.


`tox` on the otherhand will do the following:
- run pytest on the tests folder with python 3.6, python 3.7 and python 3.8
> Note: If you do not have those 3 interpreters the tests would be only performs with your current interpreter
- run pylint on the deel-datasets main files, also with python 3.6, python 3.7 and python 3.8
- run pytest on the tests folder
- run pylint on the deel-datasets main files
> Note: It is possible that pylint throw false-positive errors. If the linting test failed please check first pylint output to point out the reasons.
Please, make sure you run all the tests at least once before opening a pull request.
Expand All @@ -42,7 +41,7 @@ Basically, it will check that your code follow a certain number of convention. A

After getting some feedback, push to your fork and submit a pull request. We
may suggest some changes or improvements or alternatives, but for small changes
your pull request should be accepted quickly (see [Governance policy](https://github.com/deel-ai/lipdp/blob/master/GOVERNANCE.md)).
your pull request should be accepted quickly (see [Governance policy](https://github.com/Algue-Rythme/lip-dp/blob/release-no-advertising/GOVERNANCE.md)).

Something that will increase the chance that your pull request is accepted:

Expand Down
Loading

0 comments on commit c43e6c7

Please sign in to comment.