-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from deel-ai/develop
Merge "develop" into "master", preparing version 1.3.0
- Loading branch information
Showing
30 changed files
with
2,404 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ __pycache__ | |
# IDE / Tools files | ||
.vscode | ||
.tox | ||
deel_lip_dev_env | ||
|
||
# Files generated: | ||
logs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Contributing | ||
|
||
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. This way we can ensure that your precious | ||
work is not in vain. | ||
|
||
|
||
## Setup the development environment | ||
|
||
- Clone the repo and go to your local `deel-lip` folder | ||
- Create a virtual environment and install the development requirements: | ||
|
||
`make prepare-dev && source deel_lip_dev_env/bin/activate`. | ||
- You are ready to install the library: | ||
|
||
`pip install -e .` | ||
|
||
Welcome to the team! | ||
|
||
|
||
## Check your code changes | ||
|
||
Before opening a pull request, please make sure you check your code and you run the | ||
unit tests: | ||
|
||
```bash | ||
# Using make: | ||
$ make test | ||
|
||
# Or using directly tox in your development environment: | ||
$ tox | ||
``` | ||
|
||
This command will: | ||
- check your code with black PEP-8 formatter and flake8 linter. | ||
- run `unittest` on the `tests/` folder with Python 3.6, 3.7 and 3.8. | ||
> Note: If you do not have those 3 interpreters, the tests will only be only performed | ||
with your current interpreter. | ||
|
||
|
||
## Submitting your changes | ||
|
||
You can submit a pull request. Something that will increase the chance that your pull | ||
request is accepted: | ||
|
||
- Write tests and ensure that the existing ones pass. | ||
- If `make test` is successful, you have fair chances to pass the CI workflows (linting | ||
and tests) | ||
- Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) (we follow a lowercase convention). | ||
- For a major fix/feature make sure your PR has an issue and if it doesn't, please | ||
create one. This would help discussion with the community, and polishing ideas in case | ||
of a new feature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.PHONY: help prepare-dev test test-disable-gpu doc ipynb-to-rst | ||
.DEFAULT: help | ||
|
||
help: | ||
@echo "make prepare-dev" | ||
@echo " create and prepare development environment, use only once" | ||
@echo "make test" | ||
@echo " run tests and linting on py36, py37, py38" | ||
@echo "make test-disable-gpu" | ||
@echo " run test with gpu disabled" | ||
@echo "make doc" | ||
@echo " build Sphinx docs documentation" | ||
@echo "ipynb-to-rst" | ||
@echo " Transform notebooks to .rst files in documentation and generate the doc" | ||
|
||
prepare-dev: | ||
python3 -m pip install virtualenv | ||
python3 -m venv deel_lip_dev_env | ||
. deel_lip_dev_env/bin/activate && pip install --upgrade pip | ||
. deel_lip_dev_env/bin/activate && pip install -e . | ||
. deel_lip_dev_env/bin/activate && pip install -e .[dev] | ||
. deel_lip_dev_env/bin/activate && pip install -e .[docs] | ||
|
||
test: | ||
. deel_lip_dev_env/bin/activate && tox | ||
|
||
test-disable-gpu: | ||
. deel_lip_dev_env/bin/activate && CUDA_VISIBLE_DEVICES=-1 tox | ||
|
||
doc: | ||
. deel_lip_dev_env/bin/activate && cd doc && make html && cd - | ||
|
||
ipynb-to-rst: | ||
. deel_lip_dev_env/bin/activate && cd doc && ./generate_doc.sh && cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.