-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into patch/v0.10.4
- Loading branch information
Showing
88 changed files
with
3,057 additions
and
686 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,15 +36,51 @@ options are defined in `setup.cfg`. | |
## Docstrings | ||
We adhere to the `numpy` style docstrings (https://numpydoc.readthedocs.io/en/stable/format.html) | ||
with the exception of ommiting argument types in docstrings in favour of type hints in function | ||
and class signatures. If you're using a `PyCharm`, you can configure this under | ||
`File -> Settings -> Tools -> Python Integrated Tools -> Docstrings`. | ||
and class signatures. If you use an IDE, you may be able to configure it to assist you with writing | ||
docstrings in the correct format. For `PyCharm`, you can configure this under | ||
`File -> Settings -> Tools -> Python Integrated Tools -> Docstrings`. For `Visual Studio Code`, you can obtain | ||
docstring generator extensions from the [VisualStudio Marketplace](https://marketplace.visualstudio.com/). | ||
|
||
When documenting Python classes, we adhere to the convention of including docstrings in their `__init__` method, | ||
rather than as a class level docstring. Docstrings should only be included at the class-level if a class does | ||
not posess an `__init__` method, for example because it is a static class. | ||
|
||
## Building documentation | ||
We use `sphinx` for building documentation. You can call `make build_docs` from the project root, | ||
the docs will be built under `doc/_build/html`. | ||
|
||
## CI | ||
All PRs triger a Github Actions build to run linting, type checking, tests, and build docs. | ||
All PRs triger a Github Actions build to run linting, type checking, tests, and build docs. The status of each | ||
Github Action can be viewed on the [actions page](https://github.com/SeldonIO/alibi-detect/actions). | ||
|
||
### Debugging via CI | ||
|
||
For various reasons, CI runs might occasionally fail. They can often be debugged locally, but sometimes it is helpful | ||
to debug them in the exact enviroment seen during CI. For this purpose, there is the facilty to ssh directly into | ||
the CI Guthub Action runner. | ||
|
||
#### Instructions | ||
|
||
1. Go to the "CI" workflows section on the Alibi Detect GitHub Actions page. | ||
|
||
2. Click on "Run Workflow", and select the "Enable tmate debugging" toggle. | ||
|
||
3. Select the workflow once it starts, and then select the build of interest (e.g. `ubuntu-latest, 3.10`). | ||
|
||
4. Once the workflow reaches the `Setup tmate session` step, click on the toggle to expand it. | ||
|
||
5. Copy and paste the `ssh` command that is being printed to your terminal e.g. `ssh [email protected]`. | ||
|
||
6. Run the ssh command locally. Assuming your ssh keys are properly set up for github, you should now be inside the GutHub Action runner. | ||
|
||
7. The tmate session is opened after the Python and pip installs are completed, so you should be ready to run `alibi-detect` and debug as required. | ||
|
||
#### Additional notes | ||
|
||
- If the registered public SSH key is not your default private SSH key, you will need to specify the path manually, like so: ssh -i <path-to-key> <tmate-connection-string>. | ||
- Once you have finished debugging, you can continue the workflow (i.e. let the full build CI run) by running `touch continue` whilst in the root directory (`~/work/alibi-detect/alibi-detect`). This will close the tmate session. | ||
- This new capability is currently temperamental on the `MacOS` build due to [this issue](https://github.com/mxschmitt/action-tmate/issues/69). If the MacOS build fails all the builds are failed. If this happens, it is | ||
recommended to retrigger only the workflow build of interest e.g. `ubuntu-latest, 3.10`, and then follow the instructions above from step 3. | ||
|
||
## Optional Dependencies | ||
|
||
|
@@ -104,4 +140,4 @@ replaced with an instance of the MissingDependency class. For example: | |
... | ||
``` | ||
- Developers can use `make repl tox-env=<tox-env-name>` to run a python REPL with the specified optional dependency | ||
installed. This is to allow manual testing. | ||
installed. This is to allow manual testing. |
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.