Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7f4b061
feat: move loc of "scripts" to "scripts" folder
RobPasMue Aug 23, 2023
9b19df8
feat: add missing license headers to Python files
RobPasMue Aug 23, 2023
62aca01
feat: update pre-commit hooks
RobPasMue Aug 23, 2023
5f4b879
fix: pre-commit automated changes
RobPasMue Aug 23, 2023
58c827b
feat: move Docker files to "docker" folder
RobPasMue Aug 23, 2023
0deceb7
docs: Ansys Additive not "additive"
RobPasMue Aug 23, 2023
fe0e0dc
feat: limit to Python 3.X
RobPasMue Aug 23, 2023
3914c7d
feat: proper metadata
RobPasMue Aug 23, 2023
04048df
feat: versioning scheme is MAJOR.MINOR.devX/PATCH
RobPasMue Aug 23, 2023
9d5f1ee
feat: tox HTML build dir in common location
RobPasMue Aug 23, 2023
85ce01f
cicd: improving workflow structure
RobPasMue Aug 23, 2023
31ba587
fix: proper linkcheck TODOs
RobPasMue Aug 23, 2023
f0932cc
fix: make.bat missing statements
RobPasMue Aug 23, 2023
6fba567
fix: docstrings
RobPasMue Aug 23, 2023
b819e7f
feat: use Enum classes for constants
RobPasMue Aug 23, 2023
ed99e08
fix: pre-commit
RobPasMue Aug 23, 2023
9f27066
fix: broken workflow file
RobPasMue Aug 23, 2023
8dc6180
fix: accessing enum values
RobPasMue Aug 23, 2023
f2c91ff
fix: default values
RobPasMue Aug 23, 2023
2e38ac3
fix: revert enum class implementation
RobPasMue Aug 24, 2023
62299d6
feat: fixing test dependencies
RobPasMue Aug 24, 2023
d5669a4
feat: fixing star imports
RobPasMue Aug 24, 2023
005a9ec
docs: using autoapi
RobPasMue Aug 24, 2023
c557897
fix: accept vale word
RobPasMue Aug 24, 2023
11dec02
feat: allow for warnings in docs build
RobPasMue Aug 24, 2023
22bbf19
fix: missing stage to be adapted
RobPasMue Aug 24, 2023
60a11a1
Update microstructure.py
pkrull-ansys Aug 24, 2023
fa2b8cf
feat: weekly dependabot updates
RobPasMue Aug 25, 2023
fee7c53
Merge branch 'feat/tech-review' of https://github.com/ansys-internal/…
RobPasMue Aug 25, 2023
1ede0a7
feat: pre-commit
RobPasMue Aug 25, 2023
276589b
Update src/ansys/additive/machine.py
pkrull-ansys Aug 25, 2023
af9355e
Update README.rst
MaxJPRey Aug 25, 2023
7f1017e
Update src/ansys/additive/additive.py
pkrull-ansys Aug 25, 2023
a49aa61
Update src/ansys/additive/additive.py
pkrull-ansys Aug 25, 2023
737da36
Update README.rst
RobPasMue Aug 26, 2023
5d85885
feat: alllow CI/CD on merge queue
RobPasMue Aug 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "maintenance"
- "dependencies"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
labels:
- "maintenance"
48 changes: 24 additions & 24 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: GitHub CI
on:
pull_request:
merge_group:
workflow_dispatch:
push:
tags:
Expand All @@ -12,10 +13,8 @@ env:
MAIN_PYTHON_VERSION: "3.10"
DOCUMENTATION_CNAME: "additive.docs.pyansys.com"
LIBRARY_NAME: "ansys-additive"
LIBRARY_NAMESPACE: "ansys.additive"
ANSYS_PRODUCT_IMAGE: "ghcr.io/ansys/additive:latest"
ANSYS_PRODUCT_CONTAINER: "ansys-additive-container"

PYANSYS_PYPI_PRIVATE_PAT: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
PIP_INDEX_URL: "https://${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/"

Expand All @@ -35,24 +34,25 @@ jobs:
name: "Running documentation style checks"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3

- name: "Running documentation style checks"
uses: ansys/actions/doc-style@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkout: false

smoke-tests:
name: "Build wheelhouse for Python versions"
runs-on: ${{ matrix.os }}
needs: [code-style]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
exclude:
- should-release: false
os: macos-latest
steps:
- name: "Build a wheelhouse of the Python library"
uses: ansys/actions/build-wheelhouse@v4
Expand All @@ -73,8 +73,6 @@ jobs:
steps:
- name: "Run pytest"
uses: ansys/actions/tests-pytest@v4
with:
pytest-extra-args: "--cov=${{ env.LIBRARY_NAMESPACE }} --cov-report=term --cov-report=html:.cov/html"

doc-build:
name: "Building library documentation"
Expand Down Expand Up @@ -115,6 +113,7 @@ jobs:
uses: ansys/actions/doc-build@v4
with:
checkout: false
sphinxopts: "-j auto"
env:
GENERATING_DOCS: 1
ANSYS_ADDITIVE_ADDRESS: "localhost:50052"
Expand All @@ -125,6 +124,7 @@ jobs:
uses: ansys/actions/doc-build@v4
with:
checkout: false
sphinxopts: "-j auto"
env:
GENERATING_DOCS: 1
ANSYS_ADDITIVE_ADDRESS: "localhost:50052"
Expand All @@ -142,21 +142,9 @@ jobs:
name: docker-logs.txt
path: docker-logs.txt

doc-deploy-dev:
name: "Deploy developers documentation"
runs-on: ubuntu-latest
needs: doc-build
if: github.event_name == 'push'
steps:
- name: "Deploy the latest documentation"
uses: ansys/actions/doc-deploy-dev@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

build-library:
name: "Build library artifacts"
needs: [tests, doc-deploy-dev]
needs: [tests, doc-build]
runs-on: ubuntu-latest
steps:
- name: "Build library source and wheel artifacts"
Expand All @@ -183,6 +171,18 @@ jobs:
with:
library-name: ${{ env.LIBRARY_NAME }}

upload_dev_docs:
name: "Deploy developers documentation"
runs-on: ubuntu-latest
needs: [build-library]
if: github.event_name == 'push'
steps:
- name: "Deploy the latest documentation"
uses: ansys/actions/doc-deploy-dev@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

upload_docs_release:
name: "Upload release documentation"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ instance/
# Sphinx documentation
doc/source/examples
_autosummary/
doc/_build

# PyBuilder
.pybuilder/
Expand Down
25 changes: 20 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.7.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.1.0
hooks:
- id: flake8

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
rev: v2.2.5
hooks:
- id: codespell
args: ["--ignore-words", "doc/styles/Vocab/ANSYS/accept.txt"]
exclude_types: ["jupyter"]

# To be activated after quick dev cycles
Expand All @@ -30,13 +43,15 @@ repos:
# exclude: "tests/"

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.22.0
rev: 0.24.1
hooks:
- id: check-github-workflows
14 changes: 9 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##########
PyAdditive
##########

.. readme_start

|pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black|

.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
Expand Down Expand Up @@ -34,7 +37,7 @@ PyAdditive
:alt: Black


A Python client library for the Ansys additive service.
A Python client library for the Ansys Additive service.

Installation
============
Expand All @@ -59,13 +62,14 @@ Basic Usage
.. code:: python

import ansys.additive as pyadditive

additive = pyadditive.Additive()

input = pyadditive.SingleBeadInput(
machine=pyadditive.AdditiveMachine(),
material=additive.get_material("Ti64"),
id="bead1",
bead_length=0.001, # meters
machine=pyadditive.AdditiveMachine(),
material=additive.get_material("Ti64"),
id="bead1",
bead_length=0.001, # meters
)

summary = additive.simulate(input)
Expand Down
1 change: 1 addition & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ goto end

:clean
rmdir /s /q %BUILDDIR% > /NUL 2>&1
rmdir /s /q %SOURCEDIR%\examples > /NUL 2>&1
for /d /r %SOURCEDIR% %%d in (_autosummary) do @if exist "%%d" rmdir /s /q "%%d"
goto end

Expand Down
15 changes: 15 additions & 0 deletions doc/source/_autoapi_templates/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
API reference
=============

This section provides descriptions of PyAdditive subpackages, submodules, classes,
methods, and attributes. Use the search feature or click links to view API documentation.

.. toctree::
:titlesonly:
:maxdepth: 2

{% for page in pages %}
{% if (page.top_level_object or page.name.split('.') | length == 2) and page.display %}
{{ page.include_path }}
{% endif %}
{% endfor %}
11 changes: 0 additions & 11 deletions doc/source/api/additive.rst

This file was deleted.

13 changes: 0 additions & 13 deletions doc/source/api/geometry_file.rst

This file was deleted.

19 changes: 0 additions & 19 deletions doc/source/api/index.rst

This file was deleted.

11 changes: 0 additions & 11 deletions doc/source/api/machine.rst

This file was deleted.

13 changes: 0 additions & 13 deletions doc/source/api/material.rst

This file was deleted.

12 changes: 0 additions & 12 deletions doc/source/api/microstructure.rst

This file was deleted.

12 changes: 0 additions & 12 deletions doc/source/api/porosity.rst

This file was deleted.

13 changes: 0 additions & 13 deletions doc/source/api/single_bead.rst

This file was deleted.

14 changes: 0 additions & 14 deletions doc/source/api/thermal_history.rst

This file was deleted.

Loading