Skip to content

Commit

Permalink
removed numpy version pin due to new cq release (#367)
Browse files Browse the repository at this point in the history
* removed pypi pin

* removed numpy pin

* removed env yaml;

* using python action instead of conda

* avoiding pkg error

* added setup tools to docs

* added import test

* added venv to docs
  • Loading branch information
shimwell authored Jan 5, 2025
1 parent 0536cff commit a7fca8c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 49 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@ jobs:
- name: checkout actions
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
micromamba-version: '1.5.8-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: environment_dev.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
python-version: ${{ matrix.python-version }}

- name: install dependencies
shell: bash -el {0}
run: python -m pip install .[tests]
run: |
python -m pip install .
python -c "import paramak"
- name: Test with pytest
shell: bash -el {0}
run: |
python -m pip install .[tests]
pytest -v
python examples/plasma.py
python examples/spherical_tokamak_from_plasma_minimal.py
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/documentation_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
test:
name: Documentation
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- name: Install system packages
run: |
Expand All @@ -27,21 +31,16 @@ jobs:
- name: checkout actions
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
micromamba-version: '1.5.8-0' # any version from https://github.com/mamba-org/micromamba-releases
environment-file: environment_dev.yml
init-shell: bash
cache-environment: true
post-cleanup: 'all'
python-version: ${{ matrix.python-version }}

- name: install dependencies
shell: bash -el {0}
run: python -m pip install .[docs]

- name: Sphinx build tagged version
if: startsWith(github.ref, 'refs/tags/')
shell: bash -el {0}
run: |
sphinx-build docs _build/${{ github.ref_name }}
rm -rf _build/stable
Expand All @@ -50,7 +49,6 @@ jobs:
- name: Sphinx build dev version
if: (github.event_name == 'push' || github.event_name == 'pull_request') && !startsWith(github.ref, 'refs/tags/')
shell: bash -el {0}
run: |
rm -rf _build/dev
mkdir -p _build/dev
Expand Down
24 changes: 17 additions & 7 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
Install
=======

You might wish to create a virtual environment to install Paramak into. This can be done using the venv module in Python. For more information, see the `official Python documentation <https://docs.python.org/3/library/venv.html>`_.

.. code-block:: bash
python -m venv paramak-venv
source paramak-venv/bin/activate
Paramak is distributed via `PyPI <https://pypi.org/project/paramak/>`_ and can be installed using pip.

.. code-block:: bash
pip install paramak
python -m pip install paramak
.. Prerequisites
Expand All @@ -31,7 +40,7 @@ Paramak is distributed via `PyPI <https://pypi.org/project/paramak/>`_ and can b
.. .. code-block:: bash
.. mamba create --name paramak_env python=3.11
.. mamba create --name paramak_env python=3.12
.. Then activate the new environment.
Expand All @@ -56,7 +65,7 @@ Paramak is distributed via `PyPI <https://pypi.org/project/paramak/>`_ and can b
.. .. code-block:: bash
.. conda create --name paramak_env python=3.11
.. conda create --name paramak_env python=3.12
.. Then activate the new environment.
Expand All @@ -78,11 +87,12 @@ Paramak is distributed via `PyPI <https://pypi.org/project/paramak/>`_ and can b
Developer Installation
----------------------

If you want to contribute to the paramak or then you might want to install the
package in a more dynamic manner so that your changes to the code are readily available.
If you want to contribute to Paramak or then you might want to install the
package in a more dynamic manner so that your changes to the code are readily
available.

Download and install MiniConda, create a new python environment and activate the
environment as covered in the installation procedure above.
Create a new Venv, Conda or Mamba virtual environment and activate the
environment as covered in the installation procedure above

Then clone the repository

Expand Down
20 changes: 0 additions & 20 deletions environment_dev.yml

This file was deleted.

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools >= 69.5.1", "setuptools_scm[toml]>=8.1.0"]
requires = ["setuptools>=72.1.0", "setuptools_scm[toml]>=8.1.0"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -19,8 +19,8 @@ license = {file = "LICENSE.txt"}
requires-python = ">=3.8"
keywords = ["python", "geometry", "reactor", "model", "cad", "fusion", "parametric", "dagmc", "openmc"]
dependencies = [
"cadquery",
"numpy<=1.26.4",
"cadquery>=2.5.2",
"numpy",
"mpmath",
"sympy",
"scipy",
Expand All @@ -47,7 +47,8 @@ docs = [
"pydata-sphinx-theme",
"cadquery",
"ipython",
"sphinx_design"
"sphinx_design",
"setuptools",
]

[tool.black]
Expand Down

0 comments on commit a7fca8c

Please sign in to comment.