Skip to content

Commit

Permalink
Merge pull request #203 from fusion-energy/develop
Browse files Browse the repository at this point in the history
packaging and component updates
  • Loading branch information
shimwell authored Mar 14, 2022
2 parents cec738b + b778c83 commit fbab092
Show file tree
Hide file tree
Showing 68 changed files with 2,254 additions and 591 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/anaconda-publish-develop.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/anaconda-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ jobs:
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
conda convert /opt/conda/conda-bld/linux-64/*.tar.bz2 --platform osx-64 --platform win-64 -o /opt/conda/conda-bld/
anaconda upload -f /opt/conda/conda-bld/*/*.tar.bz2
2 changes: 1 addition & 1 deletion .github/workflows/ci_with_docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v2

- name: Build with Docker
run: docker build -t paramak --build-arg cq_version=2.1 .
run: docker build -t paramak --build-arg cq_version=master .

- name: Run unit tests
run: docker run --rm paramak pytest ./tests
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci_with_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ jobs:
testing:
runs-on: ubuntu-latest
container:
image: ghcr.io/fusion-energy/paramak:dependencies
image: ghcr.io/fusion-energy/paramak_cq_master:dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: install package
run: |
pip install --upgrade pip
pip install .
python -c "import paramak"
- name: install package with tests
run: |
pip install .[tests]
- name: Run tests
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/conda-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: conda-build-test

on:
workflow_dispatch:
pull_request:
branches:
- develop
- main

jobs:
build:
runs-on: ubuntu-latest
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 test
env:
GIT_DESCRIBE_TAG: 0.1
run: |
conda mambabuild conda -c fusion-energy -c cadquery -c conda-forge --config-file conda/conda_build_config.yaml
6 changes: 3 additions & 3 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
cq_version=master
paramak_version=${{ github.ref_name }}
- name: Build and push dependencies Docker image CQ=2.1
- name: Build and push dependencies Docker image CQ=master
uses: docker/build-push-action@v2
with:
push: true
target: dependencies
tags: ghcr.io/fusion-energy/paramak:dependencies
build-args: |
cq_version=2.1
cq_version=master
paramak_version=${{ github.ref_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
Expand All @@ -74,4 +74,4 @@ jobs:
push: true
tags: ghcr.io/fusion-energy/paramak
build-args: |
cq_version=2.1
cq_version=master
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install black
- name: Lint code
run: |
python -m pip install --upgrade pip
pip install black
pip install flake8
flake8 . --show-source --statistics --max-line-length 120
- name: Install black
run: |
pip install black==22.1.0
- name: Run black
run: |
black .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: ghcr.io/fusion-energy/paramak:dependencies
image: ghcr.io/fusion-energy/paramak_cq_master:dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
9 changes: 7 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ authors:
given-names: "Liam"
- family-names: "Peter"
given-names: "Hill"
orcid: "https://orcid.org/0000-0003-3092-1858 "
orcid: "https://orcid.org/0000-0003-3092-1858"
- family-names: "Frank"
given-names: "Schoofs"
- family-names: "Steve"
given-names: "Lilley"
orcid: "https://orcid.org/0000-0002-0547-9378"
title: "The Paramak: automated parametric geometry construction for fusion reactor designs"
version: 0.6.5
version: 0.7.1
date-released: 2021-1-6
url: "https://github.com/fusion-energy/paramak"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN echo installing CadQuery version $cq_version && \
conda install -c conda-forge moab && \
conda install -c conda-forge gmsh && \
conda install -c conda-forge python-gmsh && \
pip install jupyter-cadquery==2.2.0 && \
pip install jupyter-cadquery && \
conda clean -afy


Expand Down
8 changes: 3 additions & 5 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
python:
- 3.8
- 3.7
- 3.6
- 3.9
# - 3.10 can't solve environment currently as not all dependencies support 3.10
cadquery:
- 2.1
moab:
- 5.3.1
- master
24 changes: 7 additions & 17 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,11 @@ requirements:
run:
- python {{ python }}
- cadquery {{ cadquery }}
- matplotlib
- mpmath
- numpy
- plasmaboundaries
- plotly
- 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
- brep_part_finder # [not win]
- brep_to_h5m # [not win]
# - jupyter-cadquery not available on conda

test:
Expand All @@ -43,18 +34,17 @@ test:
- tests
requires:
- pytest
- pytest-cov
# - dagmc_h5m_file_inspector [not win] TODO include in with cq 2.2 release
- dagmc_h5m_file_inspector # [not win]
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/
- tests_h5m/ # [not win]
# - tests_examples/ # TODO include if cadquery_jupyter gets a conda install
commands:
- pytest -v tests_h5m # [not win]
- pytest -v tests
# - pytest -v tests_show # TODO include if cadquery_jupyter gets a conda install
# - 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

about:
home: "https://github.com/fusion-energy/paramak"
Expand Down
12 changes: 0 additions & 12 deletions conda_dev/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions conda_dev/conda_build_config.yaml

This file was deleted.

70 changes: 0 additions & 70 deletions conda_dev/meta.yaml

This file was deleted.

Loading

0 comments on commit fbab092

Please sign in to comment.