Skip to content

Commit

Permalink
Merge pull request #87 from gdsfactory/update_gdsfactory716
Browse files Browse the repository at this point in the history
Update gdsfactory716
  • Loading branch information
joamatab authored Mar 5, 2024
2 parents cb3b095 + f1a2758 commit e4db7c0
Show file tree
Hide file tree
Showing 913 changed files with 4,403 additions and 36,767 deletions.
70 changes: 70 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
change-template: '- $TITLE [#$NUMBER](https://github.com/gdsfactory/skywater130/pull/$NUMBER)'
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: 'Breaking'
label: 'breaking'
- title: 'New'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
label: 'bug'
- title: 'Maintenance'
labels:
- 'maintenance'
- 'github_actions'
- title: 'Documentation'
label: 'documentation'
- title: 'Other changes'
- title: 'Dependency Updates'
label: 'dependencies'
collapse-after: 5

version-resolver:
major:
labels:
- 'breaking'
- 'major'
minor:
labels:
- 'feature'
- 'minor'
- 'enhancement'
patch:
labels:
- 'bug'
- 'maintenance'
- 'github_actions'
- 'documentation'
- 'dependencies'
- 'security'
default: patch

exclude-labels:
- 'skip-changelog'

autolabeler:
- label: 'documentation'
files:
- '*.md'
branch:
- '/docs-.+/'
- label: 'bug'
branch:
- '/fix-.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature-.+/'
- '/add-.+/'
title:
- '/^add\s/i'
22 changes: 7 additions & 15 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Sphinx docs to gh-pages
name: build docs

on:
pull_request:
push:
branches:
- main
Expand All @@ -10,29 +11,20 @@ jobs:
build-docs:
runs-on: ubuntu-latest
name: Sphinx docs to gh-pages
container: ghcr.io/gdsfactory/gdsfactory:main
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gdsfactory/
key: 0.0.1
restore-keys: 0.0.1
- uses: actions/checkout@v4
- name: Installing the library
env:
GDSFACTORY_DISPLAY_TYPE: klayout
KFACTORY_DISPLAY_TYPE: image
shell: bash -l {0}
run: |
make dev
make install
- name: make docs
run: |
make docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./docs/_build/html/"

deploy-docs:
needs: build-docs
permissions:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x
cache-dependency-path: pyproject.toml
Expand Down
68 changes: 16 additions & 52 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test pre-commit, code and docs
name: Test code

on:
pull_request:
Expand All @@ -10,61 +10,25 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test_code:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
- name: Test pre-commit hooks
run: |
make dev
- name: Test with pytest
run: pytest tests/
test_docs:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.11]
os: [ubuntu-latest]

python -m pip install --upgrade pip
pip install pre-commit
pre-commit run -a
test_code:
runs-on: ubuntu-latest
container: ghcr.io/gdsfactory/gdsfactory:main
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: pyproject.toml
- uses: actions/checkout@v4
- name: Install dependencies
run: |
make dev
pip freeze > requirements.txt
- uses: actions/upload-artifact@v3
with:
name: requirements
path: requirements.txt
- name: Test documentation
env:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
DISPLAY: 1.0
DOCS: True
GDSFACTORY_DISPLAY_TYPE: klayout
run: |
mkdir -p $HOME/.tidy3d
make docs
make install
- name: Test with pytest
run: pytest tests/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
install:
pip install -e .[dev,docs]
pre-commit install

dev: install
pre-commit install

test:
pytest -s
Expand Down
24 changes: 2 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
"Operating System :: OS Independent"
]
dependencies = [
"gdsfactory[cad]==7.8.17",
"gdsfactory==7.16.0",
"PySpice"
]
description = "skywater130 pdk"
Expand All @@ -35,29 +35,9 @@ dev = [
]
docs = [
"jupytext",
"jupyter-book==0.15.1"
"jupyter-book==1.0.0"
]

[tool.black]
exclude = ''' # Specify the files/dirs that should be ignored by the black formatter
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| env
| _build
| buck-out
| build
| dist
)/
'''
include = '\.pyi?$'
line-length = 88
target-version = ['py310']

[tool.mypy]
python_version = "3.10"
strict = true
Expand Down
Loading

0 comments on commit e4db7c0

Please sign in to comment.