-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: initial code base structure setup. still missing some stuff li…
…ke linting/mypy setup.
- Loading branch information
William Bakst
committed
Nov 8, 2023
1 parent
bd9580d
commit cc8562e
Showing
16 changed files
with
2,054 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Upload To PyPI On Release | ||
run-name: ${{ github.actor }} is uploading a new release to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" | ||
|
||
- name: Get Release Version | ||
run: echo "RELEASE_VERSION=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV | ||
|
||
- name: Build And Publish Python Package | ||
run: poetry publish --build | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PYTORCH_LATTICE_RELEASE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: test | ||
run-name: ${{ github.actor }} is testing the package | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev | ||
|
||
- name: Run Tests | ||
run: poetry run pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.pytest_cache | ||
**__pycache__ | ||
.ipynb_checkpoints | ||
.idea/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"recommendations": [ | ||
"eamodio.gitlens", | ||
"github.vscode-github-actions", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.jupyter-keymap", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-python.mypy", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.vscode-jupyter-cell-tags", | ||
"ms-toolsai.vscode-jupyter-slideshow" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"files.autoSave": "onFocusChange", | ||
"editor.rulers": [88], | ||
"editor.formatOnSaveMode": "file", | ||
"editor.formatOnSave": true, | ||
"files.insertFinalNewline": true, | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"[python]": { | ||
"editor.tabSize": 4, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Home Page | ||
|
||
For full documentation visit [mkdocs.org](https://www.mkdocs.org). | ||
|
||
## Code Annotation Examples | ||
|
||
### Codeblocks | ||
|
||
Some `code` goes here. | ||
|
||
### Plain codeblock | ||
|
||
A plain codeblock: | ||
|
||
``` | ||
Some code here | ||
def myfunction(): | ||
pass | ||
// some comment | ||
``` | ||
|
||
#### Code for a specific language | ||
|
||
Some more code with the `py` at the start: | ||
|
||
```py | ||
def whatever(): | ||
pass | ||
``` | ||
|
||
#### Code with a title | ||
|
||
```py title="bubble_sort.py" | ||
def bubble_sort(items): | ||
for i in range(leng(items)): | ||
for j in range(len(items) - 1 - 1): | ||
if items[j] > items[j + 1]: | ||
items[j], items[j + 1] = items[j + 1], items[j] | ||
``` | ||
|
||
#### Code with line numbers | ||
|
||
```py linenums="1" | ||
def bubble_sort(items): | ||
for i in range(leng(items)): | ||
for j in range(len(items) - 1 - 1): | ||
if items[j] > items[j + 1]: | ||
items[j], items[j + 1] = items[j + 1], items[j] | ||
``` | ||
|
||
#### Code with highlited lines | ||
|
||
```py hl_lines="2 3" | ||
def bubble_sort(items): | ||
for i in range(leng(items)): | ||
for j in range(len(items) - 1 - 1): | ||
if items[j] > items[j + 1]: | ||
items[j], items[j + 1] = items[j + 1], items[j] | ||
``` | ||
|
||
## Icons & Emojis | ||
|
||
:smile: | ||
|
||
:fontawesome-regular-face-laugh-wink: | ||
|
||
:fontawesome-brands-twitter:{ .twitter } | ||
|
||
:octicons-heart-fill-24:{ .heart } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Page 2 | ||
|
||
## Another heading | ||
|
||
example text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
site_name: PyTorch Lattice | ||
theme: | ||
name: material | ||
features: | ||
- content.code.annotation | ||
- content.code.copy | ||
- content.code.link | ||
- navigation.footer | ||
- navigation.sections | ||
- navigation.tabs | ||
- navigation.top | ||
- search.highlight | ||
- search.suggest | ||
- toc.integrate | ||
language: en | ||
palette: | ||
- scheme: default | ||
toggle: | ||
icon: material/toggle-switch-off-outline | ||
name: Switch to dark mode | ||
primary: blue-grey | ||
accent: deep-orange | ||
- scheme: slate | ||
toggle: | ||
icon: material/toggle-switch-outline | ||
name: Switch to light mode | ||
primary: blue-grey | ||
accent: deep-orange | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github-alt | ||
link: https://github.com/ControlAI | ||
- icon: fontawesome/brands/twitter | ||
link: https://twitter.com/WilliamBakst | ||
- icon: fontawesome/brands/linkedin | ||
link: https://www.linkedin.com/in/wbakst/ | ||
|
||
markdown_extensions: | ||
- pymdownx.highlight: | ||
anchor_linenums: true | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- admonition | ||
- pymdownx.arithmatex: | ||
generic: true | ||
- footnotes | ||
- pymdownx.details | ||
- pymdownx.superfences | ||
- pymdownx.mark | ||
- attr_list | ||
- pymdownx.emoji: | ||
emoji_index: !!python/name:materialx.emoji.twemoji | ||
emoji_generator: !!python/name:material.extensions.emoji.to_svg | ||
|
||
copyright: Copyright © 2023 SOTAI Labs Inc. |
Oops, something went wrong.