Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simpler install #54

Merged
merged 9 commits into from
Jan 2, 2023
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ current_version = 0.2.2
commit = True
tag = True

[bumpversion:file:./setup.py]
[bumpversion:file:pyproject.toml]

[bumpversion:file:./docs/conf.py]

Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ jobs:
- name: Installing the library
shell: bash -l {0}
run: |
mkdir -p $HOME/.tidy3d
echo ${{ secrets.TIDY3D_AUTH }} > $HOME/.tidy3d/auth.json
pip install -e .
sudo wget https://github.com/jgm/pandoc/releases/download/1.16.0.2/pandoc-1.16.0.2-1-amd64.deb
sudo dpkg -i pandoc-1.16.0.2-1-amd64.deb
#sudo apt install pandoc
pip install -r requirements_dev.txt
sudo apt install pandoc
pip install -e .[docs]
- name: Running the Sphinx to gh-pages Action
uses: uibcdf/action-sphinx-docs-to-gh-pages@v1.0-beta.2
env:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
DISPLAY: 1.0
with:
branch: main
dir_docs: docs
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/pre-commit.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Upload Python Package
name: Release PyPI

on:
release:
types: [created, published]
push:
branches: [master]
tags: [v*]
tags: "v*"

jobs:
deploy:
release_pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: 3.x
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -25,5 +24,5 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
make build
twine upload dist/*
111 changes: 100 additions & 11 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,124 @@
---
name: Lint and Test
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: Test pre-commit, code and docs

on:
pull_request:
push:
branches:
- main

jobs:
build:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
test_code:
needs: [pre-commit]
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.7, '3.10']
os: [ubuntu-latest]
python-version: ["3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest_regressions
pip install .
pip install flake8 pytest pytest_regressions
- name: Lint with flake8
run: |
flake8 .
- name: Test with pytest
run: pytest
test_code_coverage_python37:
runs-on: ubuntu-latest
needs: [pre-commit]

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e .
- name: Test with pytest
run: |
python -m pip install --upgrade pip
pip install pytest klayout lytest scikit-image pytest-cov pytest_regressions
pytest --cov=sky130 tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
test_docs:
needs: [pre-commit]
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.9]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt install pandoc
pip install -e .[docs]
- name: Test documentation
env:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
DISPLAY: 1.0
run: |
mkdir -p $HOME/.tidy3d
echo ${{ secrets.TIDY3D_AUTH }} > $HOME/.tidy3d/auth.json
cd docs
make html

release_pypi:
needs: [pre-commit]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
27 changes: 0 additions & 27 deletions .github/workflows/test_docs.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .gitlab-ci.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .isort.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions .mergify.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .readthedocs.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions MANIFEST.in

This file was deleted.

Loading