Родитель
691b5d6eba
Коммит
b429dbdb2e
|
@ -129,7 +129,7 @@ When you send a PR the continuous integration will run tests and build the docs.
|
|||
To setup a local development environment, install both local and test dependencies:
|
||||
|
||||
```bash
|
||||
python -m pip install -r requirements/devel.txt
|
||||
python -m pip install -r requirements/test.txt
|
||||
python -m pip install pre-commit
|
||||
```
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ jobs:
|
|||
req = re.sub(r'torch>=[\d\.]+', f'torch>={torch_lut[py_ver]}', open(fpath).read())
|
||||
open(fpath, 'w').write(req)
|
||||
|
||||
for fpath in ('requirements.txt', 'tests/requirements.txt'):
|
||||
for fpath in ('requirements.txt', 'requirements/test.txt', 'requirements/integrate.txt'):
|
||||
req = open(fpath).read().replace('>=', '==')
|
||||
open(fpath, 'w').write(req)
|
||||
shell: python
|
||||
|
@ -68,16 +68,16 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('tests/requirements.txt') }}
|
||||
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/test.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --requirement requirements.txt --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
pip install --requirement tests/requirements.txt --quiet
|
||||
python --version
|
||||
pip --version
|
||||
pip install --requirement requirements/devel.txt --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
pip uninstall -y torchmetrics
|
||||
pip list
|
||||
shell: bash
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
# with:
|
||||
# # git is required to clone the docs theme
|
||||
# # before custom requirement are resolved https://github.com/ammaraskar/sphinx-action/issues/16
|
||||
# pre-build-command: "apt-get update -y && apt-get install -y git && pip install -r docs/requirements.txt --use-feature=2020-resolver"
|
||||
# pre-build-command: "apt-get update -y && apt-get install -y git && pip install -r requirements/docs.txt --use-feature=2020-resolver"
|
||||
# docs-folder: "docs/"
|
||||
# repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
|
@ -39,7 +39,7 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt -U -f https://download.pytorch.org/whl/cpu/torch_stable.html -q --use-feature=2020-resolver
|
||||
pip install -r docs/requirements.txt --use-feature=2020-resolver
|
||||
pip install -r requirements/docs.txt --use-feature=2020-resolver
|
||||
python --version ; pip --version ; pip list
|
||||
shell: bash
|
||||
|
||||
|
@ -68,14 +68,14 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('test.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt -U -f https://download.pytorch.org/whl/torch_stable.html -q --use-feature=2020-resolver
|
||||
pip install -r docs/requirements.txt --use-feature=2020-resolver
|
||||
pip install -r requirements/docs.txt --use-feature=2020-resolver
|
||||
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
|
||||
|
|
|
@ -23,14 +23,14 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/docs.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt -U -f https://download.pytorch.org/whl/cpu/torch_stable.html -q --use-feature=2020-resolver
|
||||
pip install -r docs/requirements.txt --use-feature=2020-resolver
|
||||
pip install -r requirements/docs.txt --use-feature=2020-resolver
|
||||
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
|
||||
|
|
|
@ -16,4 +16,4 @@ formats: all
|
|||
python:
|
||||
version: 3.7
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- requirements: requirements/docs.txt
|
||||
|
|
|
@ -25,6 +25,7 @@ exclude docs
|
|||
|
||||
# Include the Requirements
|
||||
include requirements.txt
|
||||
recursive-exclude requirements *.txt
|
||||
|
||||
# Exclude build configs
|
||||
exclude *.yml
|
||||
|
|
4
Makefile
4
Makefile
|
@ -21,10 +21,10 @@ test: clean env
|
|||
python -m coverage report
|
||||
|
||||
docs: clean
|
||||
pip install --quiet -r docs/requirements.txt
|
||||
pip install --quiet -r requirements/docs.txt
|
||||
python -m sphinx -b html -W --keep-going docs/source docs/build
|
||||
|
||||
env:
|
||||
pip install -r requirements.txt
|
||||
pip install -r tests/requirements.txt
|
||||
pip install -r requirements/test.txt
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ jobs:
|
|||
- bash: |
|
||||
#sudo apt-get install -y cmake
|
||||
# python -m pip install "pip==20.1"
|
||||
pip install --requirement requirements.txt
|
||||
pip install --requirement ./tests/requirements.txt --upgrade-strategy only-if-needed
|
||||
pip install --requirement ./requirements/devel.txt --upgrade-strategy only-if-needed
|
||||
pip uninstall -y torchmetrics
|
||||
pip list
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ PACKAGE_MAPPING = {
|
|||
MOCK_PACKAGES = []
|
||||
if SPHINX_MOCK_REQUIREMENTS:
|
||||
# mock also base packages when we are on RTD since we don't install them there
|
||||
MOCK_PACKAGES += package_list_from_file(os.path.join(_PATH_ROOT, "requirements.txt"))
|
||||
MOCK_PACKAGES += package_list_from_file(os.path.join(_PATH_ROOT, "requirements", "docs.txt"))
|
||||
MOCK_PACKAGES = [PACKAGE_MAPPING.get(pkg, pkg) for pkg in MOCK_PACKAGES]
|
||||
|
||||
autodoc_mock_imports = MOCK_PACKAGES
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# use mandatory dependencies
|
||||
-r ../requirements.txt
|
||||
|
||||
# add the testing dependencies
|
||||
-r test.txt
|
||||
|
||||
# add the integration dependencies
|
||||
-r integrate.txt
|
|
@ -0,0 +1 @@
|
|||
pytorch-lightning>=1.0
|
|
@ -12,7 +12,6 @@ mypy>=0.790
|
|||
yapf>=0.29.0
|
||||
|
||||
cloudpickle>=1.3
|
||||
pytorch-lightning>=1.0
|
||||
scikit-learn>0.22.1
|
||||
scikit-image>0.17.1
|
||||
nltk>=3.3
|
Загрузка…
Ссылка в новой задаче