Skip to content

Commit

Permalink
Merge pull request #193 from fusion-energy/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
shimwell authored Feb 23, 2022
2 parents 8e25ed3 + 21472bd commit cec738b
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 47 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/anaconda-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest
# This container includes libgl1-mesa-glx, anaconda-client and conda-build
# https://github.com/shimwell/miniconda3_docker_image/blob/main/Dockerfile
container: ghcr.io/shimwell/miniconda

container: continuumio/miniconda3:4.10.3

steps:
- uses: actions/checkout@v2

- name: Set up conda
run: |
apt-get --allow-releaseinfo-change update
apt install -y libgl1-mesa-glx
conda install -y anaconda-client conda-build
conda config --set anaconda_upload no
conda install boa -c conda-forge
- name: Build and publish to conda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda build conda_dev -c fusion-energy -c cadquery -c conda-forge --config-file conda_dev/conda_build_config.yaml
conda mambabuild conda_dev -c fusion-energy -c cadquery -c conda-forge --config-file conda_dev/conda_build_config.yaml
conda convert /opt/conda/conda-bld/linux-64/*.tar.bz2 --platform osx-64
anaconda upload -f /opt/conda/conda-bld/*/*.tar.bz2
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/anaconda-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: continuumio/miniconda3:4.10.3

steps:
- uses: actions/checkout@v1
- name: publish-to-conda
uses: shimwell/anaconda-publish@main
with:
subDir: 'conda'
channels: '-c fusion-energy -c cadquery -c conda-forge'
AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}
publish: true
test_all: true
convert_win: true
convert_osx: true
- uses: actions/checkout@v2

- name: Set up conda
run: |
apt-get --allow-releaseinfo-change update
apt install -y libgl1-mesa-glx
conda install -y anaconda-client conda-build
conda config --set anaconda_upload no
conda install boa -c conda-forge
- name: Build and publish to conda
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
conda mambabuild conda -c fusion-energy -c cadquery -c conda-forge --config-file conda/conda_build_config.yaml
conda convert /opt/conda/conda-bld/linux-64/*.tar.bz2 --platform osx-64
conda convert /opt/conda/conda-bld/linux-64/*.tar.bz2 --platform win-64
anaconda upload -f /opt/conda/conda-bld/*/*.tar.bz2
18 changes: 9 additions & 9 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@ requirements:
- python {{ python }}
- setuptools
run:
- cadquery
# - gmsh [not win] TODO include in with cq 2.2 release
# - moab [not win] TODO include in with cq 2.2 release
# - brep_to_h5m import [not win] TODO include in with cq 2.2 release
# - brep_part_finder [not win] TODO include in with cq 2.2 release
- python {{ python }}
- cadquery {{ cadquery }}
- matplotlib
- mpmath
- numpy
- plasmaboundaries
- plotly
- pytest-cov
- python
- scipy
- sympy
- nbformat
- nbconvert
- ipywidgets
# - gmsh [not win] TODO include in with cq 2.2 release
# - moab [not win] TODO include in with cq 2.2 release
# - brep_to_h5m import [not win] TODO include in with cq 2.2 release
# - brep_part_finder [not win] TODO include in with cq 2.2 release
# - jupyter-cadquery not available on conda

test:
Expand All @@ -44,14 +43,15 @@ test:
- tests
requires:
- pytest
- pytest-cov
# - dagmc_h5m_file_inspector [not win] TODO include in with cq 2.2 release
source_files:
- tests/
# - tests_examples/ # TODO include if cadquery_jupyter gets a conda install
# - tests_h5m/ # TODO include in with cq 2.2 release
- examples/
# commands:
# - pytest -v tests
commands:
- pytest -v tests
# - pytest -v tests_examples # TODO include if cadquery_jupyter gets a conda install
# - tests_h5m # TODO include in with cq 2.2 release
# - tests_show # TODO include if cadquery_jupyter gets a conda install
Expand Down
7 changes: 1 addition & 6 deletions conda_dev/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
python:
- 3.9
- 3.8
- 3.7
- 3.6
cadquery:
- master
moab:
- 5.3.1
22 changes: 10 additions & 12 deletions conda_dev/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ requirements:
- python {{ python }}
- setuptools
run:
- python
- matplotlib
- python {{ python }}
- mpmath
- plasmaboundaries
- plasmaboundaries # scipy numpy sympy matplotlib with versions pinned
- plotly
- scipy
- sympy
- nbformat
- nbconvert
- nbformat # might be able to move this to tests
- nbconvert # might be able to move this to tests
- ipywidgets
- brep_part_finder
- brep_to_h5m [not win]
# - cadquery==master is included in brep_part_finder
- brep_part_finder # numpy
# brep_to_h5m includes moab numpy trimesh networkx gmsh python-gmsh
- brep_to_h5m # [not win]
# - cadquery {{ cadquery }} is included in brep_part_finder
# - gmsh is included in brep_to_h5m
# - moab is included in brep_to_h5m
# - stl_to_h5m is included in brep_to_h5m
Expand All @@ -44,7 +42,7 @@ test:
- tests
requires:
- pytest
- dagmc_h5m_file_inspector [not win]
- dagmc_h5m_file_inspector # [not win]
source_files:
- tests/
- tests_h5m/
Expand All @@ -53,7 +51,7 @@ test:
# - tests_show/ # TODO include if cadquery_jupyter gets a conda install
commands:
- pytest -v tests
- pytest -v tests_h5m
- pytest -v tests_h5m # [not win]
# - pytest -v tests_examples # TODO include if cadquery_jupyter gets a conda install
# - pytest -v tests_show # TODO include if cadquery_jupyter gets a conda install

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ dependencies:
- numpy
- matplotlib
- pillow
- plasmaboundaries
- pip:
- sympy
- plasmaboundaries
- sphinx-autodoc-typehints
- sphinxcadquery
- defusedxml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class PlasmaBoundaries(Plasma):
"""Creates a double null tokamak plasma shape that is controlled
by 5 shaping parameters using the plasmaboundaries package to calculate
points. For more details see:
http://github.com/RemDelaporteMathurin/plasma-boundaries
http://github.com/fusion-energy/plasmaboundaries
Args:
A (float, optional): plasma parameter see plasmaboundaries doc.
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ install_requires=
plasmaboundaries >= 0.1.8
jupyter-client < 7
jupyter-cadquery >= 2.2.0
brep_part_finder >= 0.2.0
brep_to_h5m >= 0.1.0
brep_part_finder >= 0.3.16
brep_to_h5m >= 0.2.8

[options.extras_require]
tests =
Expand Down

0 comments on commit cec738b

Please sign in to comment.