Skip to content

Commit 94caa23

Browse files
committed
ft: improved conda environment manager, which handles now if or not environment.yml is present, retrieving version from python build files, and decide better with which python should the conda env be created. Improved venv handler when it is run from conda/floatcsep.
build: provided support for py3.12 docs: updated installation instructions tests: updated all unit tests
1 parent 02f3256 commit 94caa23

File tree

9 files changed

+447
-251
lines changed

9 files changed

+447
-251
lines changed

.github/workflows/build-test.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
os: [ubuntu-latest, macos-latest]
18-
python-version: ['3.9', '3.10', '3.11']
17+
os: [ ubuntu-latest, macos-latest ]
18+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
1919
defaults:
2020
run:
2121
shell: bash -l {0}
2222

2323
steps:
24-
- uses: actions/[email protected]
25-
- uses: mamba-org/setup-micromamba@v1
26-
with:
27-
generate-run-shell: true
28-
environment-file: environment.yml
29-
create-args: >-
30-
python=${{ matrix.python-version }}
24+
- uses: actions/[email protected]
25+
- uses: mamba-org/setup-micromamba@v1
26+
with:
27+
generate-run-shell: true
28+
environment-file: environment.yml
29+
create-args: >-
30+
python=${{ matrix.python-version }}
3131
32-
- name: Install floatCSEP
33-
run: |
34-
pip install -e .[dev]
35-
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
32+
- name: Install floatCSEP
33+
run: |
34+
pip install -e .[dev]
35+
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
3636
37-
- name: Test with pytest
38-
run: |
39-
pytest --durations=0
37+
- name: Test with pytest
38+
run: |
39+
pytest --durations=0
4040
41-
- name: Upload coverage
42-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
43-
uses: codecov/codecov-action@v3
44-
with:
45-
token: ${{ secrets.CODECOV_TOKEN }}
46-
fail_ci_if_error: false
41+
- name: Upload coverage
42+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
43+
uses: codecov/codecov-action@v3
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
fail_ci_if_error: false

docs/intro/installation.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installation
33

44
.. important::
55

6-
This application uses ``3.9 <= python <= 3.11``
6+
This application uses ``3.9 <= python <= 3.12``
77

88

99
Latest Version
@@ -25,8 +25,8 @@ Then, let ``conda`` automatically install all required dependencies of **floatCS
2525

2626
.. code-block:: console
2727
28-
$ conda create -n csep_env
29-
$ conda activate csep_env
28+
$ conda env create -f environment.yml
29+
$ conda activate floatcsep
3030
3131
.. note::
3232

@@ -47,6 +47,7 @@ Lastly, install **floatCSEP** into the new environment using ``pip``:
4747

4848
.. code-block:: console
4949
50+
$ git pull
5051
$ conda env update --file environment.yml
5152
$ pip install . -U
5253
@@ -76,10 +77,11 @@ Having a ``conda`` manager installed (see **Note** box above), type in a console
7677

7778
.. code-block:: console
7879
79-
$ conda create -n csep_env
80-
$ conda activate csep_env
80+
$ conda create -n experiment python={PYTHON_VERSION}
81+
$ conda activate experiment
8182
$ conda install -c conda-forge floatcsep
8283
84+
where ``3.9 < {PYTHON_VERSION} <= 3.12`` is at your convenience.
8385

8486
2. From the ``PyPI`` repository
8587
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -111,10 +113,10 @@ It is recommended (not obligatory) to use a ``conda`` environment to make sure y
111113

112114
.. code-block:: console
113115
114-
$ conda create -n csep_dev
115-
$ conda activate csep_dev
116+
$ conda create -n floatcsep_dev
117+
$ conda activate floatcsep_dev
116118
$ git clone https://github.com/${your_fork}/floatcsep
117119
$ cd floatcsep
118-
$ pip install .[dev]
120+
$ pip install -e .[dev]
119121
120122
This will install and configure all the unit-testing, linting, and documentation packages.

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- python <= 3.11
6+
- python <= 3.12
77
- numpy
88
- pycsep
99
- dateparser

0 commit comments

Comments
 (0)