Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* @dylanm-ansys
* @lukequeenan-ansys
* @gregbaethge
* @ansys-internal/pyansys-core
71 changes: 57 additions & 14 deletions .github/workflows/ci_cd_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
env:
MAIN_PYTHON_VERSION: '3.13'
LIBRARY_NAME: 'ansys-lumerical-core'
DOCKER_IMAGE_LUMERICAL_UNIFIED: 'ghcr.io/ansys-internal/lumerical-unified:v252_3'
DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME: 'lumerical-unified'
PIP_EXTRA_INDEX_URL: 'https://${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/'
DOCUMENTATION_CNAME: 'lumerical.docs.pyansys.com'

Expand All @@ -21,6 +19,16 @@ concurrency:

jobs:

actions-security:
name: "Actions Security"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/check-actions-security@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
with:
generate-summary: true
token: ${{ secrets.GITHUB_TOKEN }}
auditing-level: "high"

# vulnerabilities:
# name: Vulnerabilities
# runs-on: ubuntu-latest
Expand All @@ -33,24 +41,36 @@ jobs:
# python-package-name: ${{ env.LIBRARY_NAME }}
# token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
# dev-mode: ${{ github.ref != 'refs/heads/main' }}

update-changelog:
name: "Update CHANGELOG (on release)"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v10.1
with:
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

labeler:
name: "Labels"
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:

- name: "Checkout project"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Sync labels"
uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Label pull-request"
# HACK: skip if contributor does not have write permissions (forks)
if: github.event.pull_request.head.repo.full_name == github.repository
Expand Down Expand Up @@ -85,6 +105,14 @@ jobs:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-python-cache: false

commit-style:
name: "Run commit style checks"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/check-pr-title@v10.1
with:
token: ${{ secrets.GITHUB_TOKEN }}

doc-style:
name: "Doc style"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -147,10 +175,15 @@ jobs:
permissions:
id-token: write
contents: write
env:
DOCKER_IMAGE_LUMERICAL_UNIFIED: 'ghcr.io/ansys-internal/lumerical-unified:v252_3'
DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME: 'lumerical-unified'
steps:

- name: "Checkout PyLumerical"
uses: actions/checkout@v4
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
persist-credentials: false

- name: "Login to GitHub container registry"
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
Expand All @@ -160,8 +193,10 @@ jobs:
password: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

- name: "Pull Lumerical Unified Container"
env:
DOCKER_IMAGE_LUMERICAL_UNIFIED: ${{ env.DOCKER_IMAGE_LUMERICAL_UNIFIED }}
run: |
docker pull ${{ env.DOCKER_IMAGE_LUMERICAL_UNIFIED }}
docker pull ${DOCKER_IMAGE_LUMERICAL_UNIFIED}

- name: "Prepare ownership for container user (lumerical)"
env:
Expand All @@ -174,20 +209,26 @@ jobs:
ls -la

- name: "Run Lumerical Unified Container"
env:
DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME: ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
DOCKER_IMAGE_LUMERICAL_UNIFIED: ${{ env.DOCKER_IMAGE_LUMERICAL_UNIFIED }}
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
run: |
docker run \
--detach -it \
--network="host" \
--name ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }} \
--env ANSYSLMD_LICENSE_FILE=1055@${{ secrets.LICENSE_SERVER }} \
--name ${DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME} \
--env ANSYSLMD_LICENSE_FILE=1055@${LICENSE_SERVER} \
--mount type=bind,source=${PWD},target=/home/lumerical/pylumerical \
${{ env.DOCKER_IMAGE_LUMERICAL_UNIFIED }}
${DOCKER_IMAGE_LUMERICAL_UNIFIED}

- name: "Install Project Dependencies and Run Tests"
env:
DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME: ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
run: |
docker exec \
--workdir /home/lumerical/pylumerical \
${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }} /bin/bash --login -c \
${DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME} /bin/bash --login -c \
"python -m pip install -e .[tests] && \
pytest --cov="/home/lumerical/.local/lib/python3.13/site-packages/ansys/api/lumerical/" \
--cov="./tests/unit" --cov-report=xml:.cov/xml --cov-report=html:.cov/html --verbose"
Expand Down Expand Up @@ -228,7 +269,9 @@ jobs:

- name: "Stop lumerical services"
if: always()
env:
DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME: ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
run: |
docker stop ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
docker logs ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
docker rm ${{ env.DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME }}
docker stop ${DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME}
docker logs ${DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME}
docker rm ${DOCKER_CONTAINER_LUMERICAL_UNIFIED_NAME}
30 changes: 15 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Contributor Covenant Code of Conduct
# Contributor covenant code of conduct

## Our Pledge
## Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socioeconomic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment,
all contributors and maintainers pledge to making participation
in the Ansys project and community a harassment-free experience
for everyone, regardless of age, body size, disability, ethnicity,
sex characteristics, gender identity and expression, level of
experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
## Standards

Examples of behavior that contributes to creating a positive environment
Examples of behavior that contribute to creating a positive environment
include:

* Using welcoming and inclusive language
Expand All @@ -32,7 +32,7 @@ Examples of unacceptable behavior by participants include:
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
## Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
Expand All @@ -48,14 +48,14 @@ offensive, or harmful.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representing a project or community include using an official project email
address, posting using an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
This code of conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

Expand Down
24 changes: 23 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
# Contributing
# Contribute

Overall guidance on contributing to a PyAnsys library appears in the
[Contributing] topic in the *PyAnsys developer's guide*. Ensure that you
are thoroughly familiar with this guide before attempting to contribute to
PyLumerical.

The following contribution information is specific to PyLumerical.

## PyLumerical

We absolutely welcome any code contributions and we hope that this
guide will facilitate an understanding of the PyLumerical code
repository. It is important to note that while the PyLumerical software
package is maintained by ANSYS and any submissions will be reviewed
thoroughly before merging, we still seek to foster a community that can
support user questions and develop new features to make this software
a useful tool for all users. As such, we welcome and encourage any
questions or submissions to this repository.

Further information about contributing to PyLumerical can be found in [PyLumerical Contributing].

[Contributing]: https://dev.docs.pyansys.com/how-to/contributing.html
[PyLumerical Contributing]: https://lumerical.docs.pyansys.com/version/stable/contributing.html
9 changes: 7 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## Project Lead or Owner

* [First Last]()
* Luke Queenan (https://github.com/lukequeenan-ansys)
* Dylan McGuire (https://github.com/dylanm-ansys)
* Greg Baethge (https://github.com/gregbaethge)

## Individual Contributors

* [First Last]()
* Marius Ghetie (https://github.com/mghetie-ansys)
* Adan Wang (https://github.com/adan-wang-2)
* Anna Wirth-Singh (https://github.com/annawirthsingh-ansys)
* Taylor Robertson (https://github.com/taylor5005)
37 changes: 32 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
PyLumerical
===========
|pyansys| |python| |pypi| |codecov| |GH-CI| |MIT| |ruff|

.. |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
:target: https://docs.pyansys.com/
:alt: PyAnsys

.. |python| image:: https://img.shields.io/pypi/pyversions/ansys-lumerical-core?logo=pypi
:target: https://pypi.org/project/ansys-lumerical-core/
:alt: Python

.. |pypi| image:: https://img.shields.io/pypi/v/ansys-lumerical-core.svg?logo=python&logoColor=white&label=PyPI
:target: https://pypi.org/project/ansys-lumerical-core
:alt: PyPI

.. |codecov| image:: https://codecov.io/github/ansys/pylumerical/graph/badge.svg?token=34FKDS6ZKJ
:target: https://codecov.io/github/ansys/pylumerical
:alt: Codecov

.. |GH-CI| image:: https://github.com/ansys/pylumerical/actions/workflows/ci_cd_pr.yml/badge.svg
:target: https://github.com/ansys/pylumerical/actions/workflows/ci_cd_pr.yml

.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:target: https://opensource.org/licenses/MIT
:alt: MIT

.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff


A Python wrapper for Ansys Lumerical products.

Expand All @@ -22,16 +51,14 @@ Then, install using:

python -m pip install ansys-lumerical-core

For more information, see the `installation and getting started section </doc/source/getting_started/index.rst>`_ in the documentation.
For more information, see the `installation and getting started section <https://lumerical.docs.pyansys.com/version/stable/getting_started/index.html>`_ in the documentation.

Contributing to PyLumerical
---------------------------

For guidelines on contribution and how to install PyLumerical as a developer, see the `contributing section </doc/source/contributing.rst>`_ section in the documentation.
For guidelines on contribution and how to install PyLumerical as a developer, see the `contributing section <https://lumerical.docs.pyansys.com/version/stable/contributing.html>`_ section in the documentation.

Getting started
----------------

Please see the `installation and getting started section </doc/source/getting_started/index.rst>`_ in the documentation for more information.


Please see the `installation and getting started section <https://lumerical.docs.pyansys.com/version/stable/getting_started/index.html>`_ in the documentation for more information.
40 changes: 40 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
Copyright (C) 2021 - 2025 ANSYS, Inc. and/or its affiliates.
SPDX-License-Identifier: MIT


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->

# Security Policy

## Reporting a vulnerability

> [!CAUTION]
> Do not use GitHub issues to report any security vulnerabilities.

If you detect a vulnerability, contact the [PyAnsys Core team](mailto:pyansys.core@ansys.com),
mentioning the repository and the details of your finding. The team will address it as soon as possible.

Provide the PyAnsys Core team with this information:

- Any specific configuration settings needed to reproduce the problem
- Step-by-step guidance to reproduce the problem
- The exact location of the problematic source code, including tag, branch, commit, or a direct URL
- The potential consequences of the vulnerability, along with a description of how an attacker could take advantage of the issue
1 change: 1 addition & 0 deletions doc/source/changelog/17.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updating numerous files and pipeline for initial release
Loading