Skip to content

Commit

Permalink
Merge branch 'develop' into experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
rchan26 committed Nov 17, 2023
2 parents 291eb0e + 774b35a commit c4b27c3
Show file tree
Hide file tree
Showing 94 changed files with 2,060 additions and 1,729 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: 3

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files

# checks:
# name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
# runs-on: ${{ matrix.runs-on }}
# needs: [pre-commit]
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.8"]
# runs-on: [ubuntu-latest, macos-latest]

# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install torch
# run: pip install torch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0

# - name: Debug installed packages
# run: pip list

# - name: Debug Python environment
# run: python -V

# - name: Install signatory
# run: |
# pip install signatory==1.2.6.1.9.0 --no-cache-dir --force-reinstall

# - name: Install package
# run: python -m pip install .[test]

# - name: Test package
# run: python -m pytest -ra --cov=nlpsig

dist:
name: Distribution build
runs-on: ubuntu-latest
needs: [pre-commit]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build sdist and wheel
run: pipx run build

- uses: actions/upload-artifact@v3
with:
path: dist

- name: Check products
run: pipx run twine check dist/*

- uses: pypa/[email protected]
if: github.event_name == 'release' && github.event.action == 'published'
with:
# Remember to generate this and set it in "GitHub Secrets"
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
165 changes: 163 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,167 @@
*.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# 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

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# setuptools_scm
src/*/_version.py


# ruff
.ruff_cache/

# OS specific stuff
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Common editor files
*~
*.swp

.vscode/

# Miscellaneous
*.ipynb_checkpoints/
**__pycache__
*.npy
*.pkl
paths.py
paths.py
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ repos:
- id: blacken-docs
additional_dependencies: [black==23.1.0]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.260"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.2"
hooks:
Expand Down
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- docs
Loading

0 comments on commit c4b27c3

Please sign in to comment.