Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,18 @@ jobs:
- run:
name: Install ffmpeg
command: |
sudo apt update
sudo apt update
sudo apt install ffmpeg
- run:
name: Install latex (for logo)
command: |
sudo apt install texlive-latex-base texlive-fonts-recommended texlive-latex-extra cm-super dvipng

- run:
name: Get Python running
command: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user --progress-bar off -r requirements.txt
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
python -m pip install --user --upgrade --progress-bar off .
python -m pip install --user --upgrade --progress-bar off .[doc]
# python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
- save_cache:
key: pip-cache
Expand Down Expand Up @@ -176,7 +174,7 @@ workflows:
- build_docs:
filters:
tags:
only: /[0-9]+(\.[0-9]+)*$/
only: /[0-9]+(\.[0-9]+)*$/
- deploy_main:
requires:
- build_docs
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,15 @@ jobs:
with:
python-version: "3.10"
- run: which python
- name: Install dependencies
run: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -r requirements.txt
python -m pip install --user --upgrade pytest pytest-cov codecov

- name: Install 'skada' package
run: |
python -m pip install --user -e .
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -e .[test]
# Run Tests
- name: Run Tests without torch
run: pytest skada/ --verbose --cov=skada --cov-report term
# Codecov
# Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down Expand Up @@ -113,18 +110,14 @@ jobs:
with:
python-version: "3.10"
- run: which python
- name: Install dependencies
run: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -r requirements_full.txt
python -m pip install --user --upgrade pytest pytest-cov codecov
- name: Install 'skada' package
run: |
python -m pip install --user -e .
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -e .[deep,test]
# Run Tests
- name: Run Tests with torch
run: pytest skada/ --verbose --cov=skada --cov-report term
# Codecov
# Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ repos:
- tomli
files: ^skada/|^docs/|^examples/
types_or: [python, bib, rst, inc]
args: [
"--ignore-words",
"ignore-words.txt",
]

# yamllint
- repo: https://github.com/adrienverge/yamllint.git
Expand Down
13 changes: 10 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Contributing to SKADA
=====================


First off, thank you for considering contributing to SKADA.
First off, thank you for considering contributing to SKADA.

How to contribute
-----------------
Expand Down Expand Up @@ -32,6 +32,13 @@ GitHub, clone, and develop on a branch. Steps:

This will install the pre-commit hooks that will run on every commit. If the hooks fail, the commit will be aborted.

3. Install the dependencies:

```bash
$ pip install -e .
```
To install an optional dependency (see pyproject.toml), swap the previous command with ```pip install -e .[dependency_name]```.

3. Create a ``feature`` branch to hold your development changes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```bash
Expand Down Expand Up @@ -95,7 +102,7 @@ following rules before you submit a pull request:
to other methods available in SKADA.

- Documentation and high-coverage tests are necessary for enhancements to be
accepted. Bug-fixes or new features should be provided with
accepted. Bug-fixes or new features should be provided with
[non-regression tests](https://en.wikipedia.org/wiki/Non-regression_testing).
These tests verify the correct behavior of the fix or feature. In this
manner, further modifications on the code base are granted to be consistent
Expand All @@ -122,7 +129,7 @@ tools:

```bash
$ pytest skada
```
```

Bonus points for contributions that include a performance analysis with
a benchmark script and profiling output (please report on the mailing
Expand Down
11 changes: 0 additions & 11 deletions docs/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion ignore-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ OT
repid
ist
vor
fro
fro
133 changes: 116 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@


[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"


[project]
dynamic = ["version"]
name = "skada"
Expand All @@ -14,13 +11,8 @@ authors = [
]
license = {file = "COPYING"}
readme = "README.md"
dependencies = [
"numpy >= 1.24",
"scipy >= 1.10",
"scikit-learn >= 1.5.0",
"POT >= 0.9.3",
]
keywords = ["domain-adaptation", "scikit-learn", "pytorch",
requires-python = ">= 3.9"
keywords = ["domain-adaptation", "scikit-learn", "pytorch",
"machine learning", "deep learning"]
classifiers=[
"Intended Audience :: Science/Research",
Expand All @@ -42,19 +34,126 @@ classifiers=[
"Programming Language :: Python :: 3.12",
]

dependencies = [
"numpy >= 1.24",
"scipy >= 1.10",
"scikit-learn >= 1.5.0",
"POT >= 0.9.3",
"pandas>=2.3.0",
]

[project.optional-dependencies]
subspace = ["torch"]

deep = [
"torch",
"torchvision",
"skorch",
]

test = [
"pytest",
"pytest-cov",
"codecov"
]

doc = [
"sphinx",
"sphinx_gallery",
"sphinx_rtd_theme",
"numpydoc",
"memory_profiler",
"myst-parser",
"ipython",
"matplotlib",
"torch",
"torchvision",
"skorch",
]

[project.urls]
homepage = "https://scikit-adaptation.github.io/"
documentation = "https://scikit-adaptation.github.io/"
repository = "https://github.com/scikit-adaptation/skada/"

# Optional dependencies
[project.optional-dependencies]
all = ["torch", "torchvision", "skorch"]
deep = ["torch", "torchvision", "skorch"]
subspace = ["torch"]

[tool.setuptools]
packages = ["skada"]

[tool.setuptools.dynamic]
version = {attr = "skada.version.__version__"}
version = {attr = "skada.version.__version__"}

[tool.pytest.ini_options]

# disable-pytest-warnings should be removed once we rewrite tests
# using yield with parametrize
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
testpaths = "skada"
addopts = [
"--doctest-modules",
"--disable-pytest-warnings",
"--color=yes",
"-rN",
]

[tool.codespell]
skip = [
"./.git",
"./doc/_build",
"./doc/auto_examples",
"./doc/modules/generated"
]

ignore-words = "ignore-words.txt"

[tool.rstcheck]
report_level = "WARNING"
ignore_roles = [
"attr",
"class",
"doc",
"eq",
"exc",
"file",
"footcite",
"footcite:t",
"func",
"gh",
"kbd",
"meth",
"mod",
"newcontrib",
"py:mod",
"ref",
"samp",
"term"
]

ignore_directives = [
"autoclass",
"autofunction",
"automodule",
"autosummary",
"bibliography",
"cssclass",
"currentmodule",
"dropdown",
"footbibliography",
"glossary",
"graphviz",
"grid",
"highlight",
"minigallery",
"tabularcolumns",
"toctree",
"rst-class",
"tab-set",
"towncrier-draft-entries",
"include"
]

ignore_messages = "^.*(Unknown target name|Undefined substitution referenced)[^`]*$"





5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements_full.txt

This file was deleted.

Loading