Skip to content

Commit d3601b5

Browse files
matthewgillettaeftimia
authored andcommitted
Merge pull request #2 from FINRAOS/config-updates
Config updates
2 parents 4c62101 + f615822 commit d3601b5

24 files changed

+1507
-704
lines changed

.circleci/config.yml

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
1-
# Use the latest 2.1 version of CircleCI pipeline process engine.
2-
# See: https://circleci.com/docs/2.0/configuration-reference
31
version: 2.1
42

5-
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6-
# See: https://circleci.com/docs/2.0/orb-intro/
7-
orbs:
8-
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files
9-
# Orb commands and jobs help you with common scripting around a language/tool
10-
# so you dont have to copy and paste it everywhere.
11-
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
12-
python: circleci/[email protected]
13-
14-
# Define a job to be invoked later in a workflow.
15-
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
163
jobs:
17-
build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do!
18-
# These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/
19-
# You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub
20-
# A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python
21-
# The executor is the environment in which the steps below will be executed - below will use a python 3.8 container
22-
# Change the version below to your required version of python
4+
test:
5+
docker:
6+
- image: circleci/python:3.8
7+
steps:
8+
- checkout
9+
- run: sudo apt-get install pandoc
10+
- run: sudo pip install tox
11+
- run: tox
12+
- run: ls -la docs
13+
- persist_to_workspace:
14+
root: docs
15+
paths: html
16+
docs-deploy:
2317
docker:
24-
- image: cimg/python:3.8
25-
# Checkout the code as the first step. This is a dedicated CircleCI step.
26-
# The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.
27-
# Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.
28-
# Then run your tests!
29-
# CircleCI will report the results back to your VCS provider.
18+
- image: node:16.14.2
3019
steps:
3120
- checkout
32-
- python/install-packages:
33-
pkg-manager: pip-dist
34-
pip-dependency-file:
21+
- attach_workspace:
22+
at: docs
23+
- run: mkdir -p website/docs && mv docs/html website/docs/
3524
- run:
36-
name: Run pre-commit
37-
command: pip install pre-commit && pre-commit run --all
25+
name: Disable jekyll builds
26+
command: touch website/.nojekyll
27+
- run: mkdir -p website/.circleci
28+
- run: cp .circleci/config.yml website/.circleci/config.yml
3829
- run:
39-
name: Run tests
40-
# This assumes pytest is installed via the install-package step above
41-
no_output_timeout: 30m
42-
command: pip install pytest && pytest tests
43-
44-
# Invoke jobs via workflows
45-
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
30+
name: Install and configure dependencies
31+
command: |
32+
npm install -g --silent [email protected]
33+
git config user.email "$(git log --format=%ae -n 1)"
34+
git config user.name "$(git log --format=%an -n 1)"
35+
- add_ssh_keys:
36+
fingerprints:
37+
- "4e:e4:68:5b:4b:62:62:47:73:47:d5:b4:99:23:98:b1"
38+
- run:
39+
name: Deploy docs to gh-pages branch
40+
command: gh-pages -b website --dotfiles --message "$(git log --format=%B -n 1)" --dist website
4641
workflows:
47-
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
48-
# Inside the workflow, you define the jobs you want to run.
42+
version: 2
43+
build:
4944
jobs:
50-
- build-and-test
45+
- test:
46+
filters:
47+
branches:
48+
ignore: website
49+
- docs-deploy:
50+
requires:
51+
- test
52+
filters:
53+
branches:
54+
only: main

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
repos:
1111

1212
- repo: https://github.com/ambv/black
13-
rev: 21.7b0
13+
rev: 22.3.0
1414
hooks:
1515
- id: black
1616
language_version: python3.8
1717
args: [--line-length=88, tests, mvtk]
1818

1919
- repo: https://gitlab.com/pycqa/flake8
20-
rev: '3.9.2'
20+
rev: 4.0.1
2121
hooks:
2222
- id: flake8
2323
args: [--max-line-length=88, '--per-file-ignores=__init__.py:F401,F403', tests, mvtk]
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: 'v0.910'
25+
rev: v0.942
2626
hooks:
2727
- id: mypy
2828
files: mvtk/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Check out this repository and `cd` into the directory.
2020

2121
Run `pip install -e ".[doc]"`.
2222

23-
The `[doc]` is used to install dependencies for building documentation.
23+
The `[doc]` is used to install dependencies for building documentation. You
24+
will need [pandoc](https://pandoc.org/) installed.
2425

2526
# Submodules
2627
You can import:
@@ -29,7 +30,7 @@ You can import:
2930
- `mvtk.interprenet` for building interpretable neural nets.
3031
- `mvtk.thresholding` for adaptive thresholding.
3132
- `mvtk.sobol` for Sobol sensitivity analysis
32-
- `mvtk.supervisor` for divergence anlysis
33+
- `mvtk.supervisor` for divergence analysis
3334
- `mvtk.metrics` for specialised metrics
3435

3536
# Documentation

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@
8787
".txt": "markdown",
8888
".md": "markdown",
8989
}
90+
91+
user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"

docs/contributing.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Everyone can contribute to Model Validation Toolkit, and we value everyone's con
66
ways to contribute, including:
77

88

9-
- Answering questions on Model Validation Toolkit's [discussions page](https://github.com/FINRAOS/model-validation-toolkit/discussions)
9+
- Answering questions on Model Validation Toolkit's [Gitter channel](https://gitter.im/FINRAOS/model-validation-toolkit)
1010
- Improving or expanding Model Validation Toolkit's [documentation](https://finraos.github.io/model-validation-toolkit/docs/html/index.html)
1111
- Contributing to Model Validation Toolkit's [code-base](https://github.com/FINRAOS/model-validation-toolkit/)
1212

@@ -18,7 +18,8 @@ We welcome pull requests, in particular for those issues marked with
1818

1919
For other proposals, we ask that you first open a GitHub
2020
[Issue](https://github.com/FINRAOS/model-validation-toolkit/issues/new/choose) or
21-
[Discussion](https://github.com/FINRAOS/model-validation-toolkit/discussions)
21+
[Gitter channel](https://gitter.im/FINRAOS/model-validation-toolkit)
22+
2223
to seek feedback on your planned contribution.
2324

2425
## Contributing code using pull requests
@@ -80,7 +81,7 @@ Follow these steps to contribute code:
8081
git commit -s -m "Your commit message"
8182
```
8283

83-
Please be sure to sign off your work when you commit it with the `-s` or, equivalently `--sign-off` flag to agree to our [DCO](https://raw.githubusercontent.com/FINRAOS/model-validation-toolkit/main/DCO.txt).
84+
Please be sure to sign off your work when you commit it with the `-s` or, equivalently `--sign-off` flag to agree to our [DCO](https://raw.githubusercontent.com/FINRAOS/model-validation-toolkit/main/DCO).
8485

8586
Then sync your code with the main repo:
8687

@@ -98,7 +99,7 @@ Follow these steps to contribute code:
9899

99100
8. Create a pull request from the Model Validation Toolkit repository and send it for review.
100101
Check the {ref}`pr-checklist` for considerations when preparing your PR, and
101-
consult [GitHub Help](https://help.github.com/articles/about-pull-requests/)
102+
consult [GitHub Help](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
102103
if you need more information on using pull requests.
103104

104105
## Model Validation Toolkit pull request checklist
@@ -107,7 +108,7 @@ As you prepare a Model Validation Toolkit pull request, here are a few things to
107108

108109
### DCO
109110

110-
By contributing to this project, you agree to our [DCO](https://raw.githubusercontent.com/FINRAOS/model-validation-toolkit/main/DCO.txt).
111+
By contributing to this project, you agree to our [DCO](https://raw.githubusercontent.com/FINRAOS/model-validation-toolkit/main/DCO).
111112

112113
### Single-change commits and pull requests
113114

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ The Model Validation Toolkit is a library for model validation, metaanalysis, an
3333
notebooks/divergence/Airlines
3434
notebooks/divergence/DivergenceFunctions
3535
notebooks/divergence/CategoricalColumns
36+
notebooks/divergence/BugDetection
37+
notebooks/divergence/TrainingDatasetDrift
3638

3739
.. toctree::
3840
:maxdepth: 1

docs/interprenet_user_guide.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ and return a scalar value is generally limited to various measures of feature
1414
importance. This can be problematic as what makes a feature "important" can
1515
vary between use cases.
1616

17-
Rather than interpret a neural network as a black box, we seek to constrain
18-
neural network in ways we consider useful and interpretable. In particular, The
19-
`interprenet <interprenet.html>`_ module currently have two such constraints
20-
implemented:
17+
Rather than interpret a neural network as a black
18+
box, we seek to constrain neural network in ways we
19+
consider useful and interpretable. In particular,
20+
The interprenet module currently has two such
21+
constraints implemented:
2122

2223
* Monotonicity
2324
* Lipschitz constraint

0 commit comments

Comments
 (0)