File tree 7 files changed +57
-54
lines changed
actions/install-python-and-package
7 files changed +57
-54
lines changed Original file line number Diff line number Diff line change
1
+ name : " Install Python and DIANNA"
2
+ description : " Installs Python, updates pip and installs DIANNA together with its dependencies."
3
+ inputs :
4
+ python-version :
5
+ required : false
6
+ description : " The Python version to use. Specify major and minor version, e.g. '3.9'."
7
+ default : " 3.9"
8
+ runs :
9
+ using : " composite"
10
+ steps :
11
+ - name : Set up Python ${{ inputs.python-version }}
12
+ uses : actions/setup-python@v2
13
+ with :
14
+ python-version : ${{ inputs.python-version }}
15
+ cache : ' pip'
16
+ cache-dependency-path : setup.cfg
17
+ - name : Python info
18
+ shell : bash {0}
19
+ run : |
20
+ which python3
21
+ python3 --version
22
+ - name : Upgrade pip and install dependencies
23
+ shell : bash {0}
24
+ run : |
25
+ python3 -m pip install --upgrade pip setuptools
26
+ python3 -m pip install .[dev,publishing]
Original file line number Diff line number Diff line change 1
- name : Python package
1
+ name : build
2
2
3
3
on :
4
4
push :
20
20
python-version : ['3.7', '3.8', '3.9']
21
21
steps :
22
22
- uses : actions/checkout@v2
23
- - name : Set up Python ${{ matrix.python-version }}
24
- uses : actions/setup-python@v2
23
+ - uses : ./.github/actions/install-python-and-package
25
24
with :
26
25
python-version : ${{ matrix.python-version }}
27
- - name : Python info
28
- shell : bash -l {0}
29
- run : |
30
- which python3
31
- python3 --version
32
- - name : Upgrade pip and install dependencies
33
- run : |
34
- python3 -m pip install --upgrade pip setuptools
35
- python3 -m pip install .[dev,publishing]
36
26
- name : Run unit tests
37
27
run : pytest -v
38
28
- name : Verify that we can build the package
Original file line number Diff line number Diff line change 17
17
fail-fast : false
18
18
steps :
19
19
- uses : actions/checkout@v2
20
- - name : Set up Python 3.9
21
- uses : actions/setup-python@v2
22
- with :
23
- python-version : 3.9
24
- - name : Python info
25
- shell : bash -l {0}
26
- run : |
27
- which python3
28
- python3 --version
29
- - name : Upgrade pip and install dependencies
30
- run : |
31
- python3 -m pip install --upgrade pip setuptools
32
- python3 -m pip install .[dev,publishing]
20
+ - uses : ./.github/actions/install-python-and-package
33
21
- name : Check style against standards using prospector
34
22
run : prospector
35
23
- name : Check import order
Original file line number Diff line number Diff line change
1
+ name : notebooks
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+
13
+ notebooks :
14
+ name : Run notebooks on (3.9, ${{ matrix.os }})
15
+ runs-on : ${{ matrix.os }}
16
+ strategy :
17
+ fail-fast : false
18
+ matrix :
19
+ os : ['ubuntu-latest', 'macos-latest', 'windows-latest']
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - uses : ./.github/actions/install-python-and-package
23
+ - name : Run tutorial notebooks
24
+ run : pytest --nbmake tutorials
Original file line number Diff line number Diff line change 13
13
steps :
14
14
- uses : actions/checkout@v2
15
15
16
- - uses : actions/setup-python@v2
17
- name : Install Python
18
- with :
19
- python-version : ' 3.9'
20
-
21
- - name : Upgrade pip and install dependencies
22
- run : |
23
- python3 -m pip install --upgrade pip setuptools
24
- python3 -m pip install .[publishing]
16
+ - uses : ./.github/actions/install-python-and-package
25
17
26
18
- name : Build wheel
27
19
run : python setup.py bdist_wheel
36
28
steps :
37
29
- uses : actions/checkout@v2
38
30
39
- - uses : actions/setup-python@v2
40
- name : Install Python
41
- with :
42
- python-version : ' 3.9'
43
-
44
- - name : Upgrade pip and install dependencies
45
- run : |
46
- python3 -m pip install --upgrade pip setuptools
47
- python3 -m pip install .[publishing]
31
+ - uses : ./.github/actions/install-python-and-package
48
32
49
33
- name : Build sdist
50
34
run : python setup.py sdist
Original file line number Diff line number Diff line change 18
18
- uses : actions/checkout@v2
19
19
with :
20
20
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
21
- - name : Set up Python
22
- uses : actions/setup-python@v2
23
- with :
24
- python-version : 3.9
25
- - name : Python info
26
- shell : bash -l {0}
27
- run : |
28
- which python3
29
- python3 --version
30
- - name : Install dependencies
31
- run : python3 -m pip install .[dev]
21
+ - uses : ./.github/actions/install-python-and-package
32
22
- name : Check style against standards using prospector
33
23
run : prospector --zero-exit --output-format grouped --output-format pylint:pylint-report.txt
34
24
- name : Run unit tests with coverage
Original file line number Diff line number Diff line change 65
65
sphinx-autoapi
66
66
torchtext
67
67
coverage [toml]
68
+ nbmake
68
69
publishing =
69
70
twine
70
71
wheel
You can’t perform that action at this time.
0 commit comments