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

Final prep for open sourcing #16

Merged
merged 15 commits into from
Oct 16, 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: 2 additions & 0 deletions .cicd-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
IGNORE_NAMED_TESTS="bllinter.test_all.CommonTestCase.test_repo_name:bllinter.test_all.LinterTestCase.test_python_linting"
PYTHON_PYLINT_CONFIG_FILE=true
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @uclahs-cds/software-wg
42 changes: 0 additions & 42 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/CICD-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:

# Run CICD-base
- name: CICD-base
uses: docker://blcdsdockerregistry/cicd-base:latest
uses: docker://ghcr.io/uclahs-cds/cicd-base:latest
60 changes: 60 additions & 0 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CICD

on:
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:

jobs:
All:
name: Build and test BL_Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install -U pip
./install_all.sh

- name: Test with pyright
run: |
pyright

- name: Test with pytest
run: |
echo Running pytest
# infra is not set up to support integration tests, so ignore postgresql
# etl has been updated, while the tests have not been
pytest --junitxml pytest.xml \
-k "not acceptance"

- name: Output pytest report
uses: actions/upload-artifact@v3
with:
name: pytest-report
path: pytest.xml
retention-days: 1
if-no-files-found: error

- name: Check code style
run: |
black --check src

- name: Check import order
run: |
isort --check-only src
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# System files
.editorconfig
*.log
.DS_Store

Expand Down
37 changes: 37 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[format]
max-line-length = 88

[MESSAGES CONTROL]
disable=C0103,
C0113,
C0114,
C0115,
C0116,
C0121,
C0123,
C0204,
C0209,
C0301,
C0413,
C0414,
C0415,
C3001,
R0801,
R0903,
R0913,
R1705,
W0105,
W0212,
W0237,
W0404,
W0511,
W0613,
W0621,
W0718,
W0719,
W1203,
W1309,
W4902,
E0601,
E1101,
E1120
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# BL_Python Contribution Guidelines

Create a new pull request with an explanation of what the PR is fixing.
13 changes: 13 additions & 0 deletions install_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

python -m pip install -e .

python -m pip install -e \
.[dev-dependencies] \
src/AWS \
src/database \
src/development \
src/platform \
src/programming \
src/testing \
src/web
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,11 @@ addopts = [
python_files = "test_*.py"

norecursedirs = "__pycache__ build .pytest_cache *.egg-info .venv"

[tool.black]
exclude = "src/.+/(typings|build)"

[tool.isort]
profile = "black"
src_paths = ["src"]
skip_glob = ["src/*/typings", "src/*/build"]
Loading
Loading