Skip to content

Commit 07a6fea

Browse files
gselzerctrueden
authored andcommitted
Clean up build process
The github actions script now is much more similar to PyImageJ's.
1 parent b63a664 commit 07a6fea

File tree

5 files changed

+73
-32
lines changed

5 files changed

+73
-32
lines changed
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,32 @@ jobs:
2828
'3.9',
2929
'3.10'
3030
]
31+
# Breaks due to https://github.com/jpype-project/jpype/issues/1009
32+
# Should be included once the fix is released
33+
exclude:
34+
- os: windows-latest
35+
python-version: "3.10"
3136

3237
steps:
3338
- uses: actions/checkout@v2
34-
- uses: conda-incubator/setup-miniconda@v2
39+
40+
- uses: actions/setup-python@v3
3541
with:
36-
auto-update-conda: true
37-
python-version: ${{ matrix.python-version }}
38-
- name: Add conda to system path
39-
run: |
40-
# $CONDA is an environment variable pointing to the root of the miniconda directory
41-
echo $CONDA/bin >> $GITHUB_PATH
42-
- name: Install mamba
43-
run: |
44-
conda install -c conda-forge mamba
45-
- name: Install dependencies
42+
python-version: ${{matrix.python-version}}
43+
44+
- uses: actions/setup-java@v3
45+
with:
46+
java-version: '8'
47+
distribution: 'zulu'
48+
49+
- name: Install ScyJava
4650
run: |
47-
mamba env update --file environment-test.yml --name base
48-
- name: Install current project in dev mode
51+
python -m pip install --upgrade pip
52+
python -m pip install -e '.[dev]'
53+
54+
- name: Test ScyJava
4955
run: |
50-
python -m pip install -e .
51-
- name: Run test suite
52-
run: python -m pytest -p no:faulthandler --color=yes
56+
python -m pytest -p no:faulthandler --color=yes
5357
5458
lint:
5559
runs-on: ubuntu-latest
@@ -74,7 +78,7 @@ jobs:
7478
conda install -c conda-forge mamba
7579
- name: Install dependencies
7680
run: |
77-
mamba env update --file environment-test.yml --name base
81+
mamba env update --file dev-environment.yml --name base
7882
- name: Install current project in dev mode
7983
run: |
8084
pip install -e .

dev-environment.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Use this file to construct an environment
2+
# for developing scyjava from source.
3+
#
4+
# mamba env create -f dev-environment.yml
5+
# conda activate scyjava-dev
6+
#
7+
# In addition to the dependencies needed for using scyjava, it includes tools
8+
# for developer-related actions like running automated tests (pytest),
9+
# linting the code (black), and generating the API documentation (sphinx).
10+
# If you want an environment without these tools, use environment.yml.
11+
name: scyjava-dev
12+
channels:
13+
- conda-forge
14+
- defaults
15+
dependencies:
16+
# Project dependencies
17+
- jpype1 >= 1.3.0
18+
- jgo
19+
# Test dependencies
20+
- numpy
21+
- pandas
22+
# Developer tools
23+
- black
24+
- build
25+
- pytest
26+
- pytest-cov
27+
# Project from source
28+
- pip
29+
- pip:
30+
- -e .
31+

environment-test.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

environment.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
# Use this file to construct an environment for working
2+
# with scyjava in a runtime setting
3+
#
4+
# mamba env create
5+
# conda activate scyjava
6+
#
7+
# It includes the dependencies needed for using scyjava but not tools
8+
# for developer-related actions like running automated tests (pytest),
9+
# linting the code (black), and generating the API documentation (sphinx).
10+
# If you want an environment including these tools, use dev-environment.yml.
11+
112
name: scyjava
213
channels:
314
- conda-forge
415
- defaults
516
dependencies:
17+
# Project dependencies
618
- jpype1 >= 1.3.0
719
- jgo
8-
- scyjava
20+
- openjdk=8
21+
# Project from source
22+
- pip
23+
- pip:
24+
- -e .

setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ where = src
4848
[options.extras_require]
4949

5050
# Ensure any changes to this list are also added to environment-test.yml!
51-
test =
51+
dev =
52+
black
53+
build
5254
pytest
55+
pytest-cov
5356
numpy
5457
pandas

0 commit comments

Comments
 (0)