Skip to content

Commit

Permalink
Merge branch 'main' into cormac-mobilecommons-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdelrio authored Sep 26, 2023
2 parents 493e117 + 4b24f40 commit cad250f
Show file tree
Hide file tree
Showing 502 changed files with 44,647 additions and 87,167 deletions.
84 changes: 21 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,33 @@
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#

version: 2

workflows:
version: 2
build:
jobs:
- test
- docs-build:
filters:
branches:
ignore: master
- docs-build
- docs-build-deploy:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
only: main

version: 2
jobs:
test:
docker:
- image: circleci/python:3.7

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-python3.7-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-python3.7-

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-python3.7-{{ checksum "requirements.txt" }}

- run:
name: run tests
command: |
. venv/bin/activate
TESTING=1 pytest -rf test/
- run:
name: check linting
command: |
. venv/bin/activate
flake8 parsons/ test/ useful_resources/
- store_artifacts:
path: test-reports
destination: test-reports

# Documentation CI
docs-build:
docker:
- image: circleci/python:3.7
- image: cimg/python:3.10
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-python3.7-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-python3.7-
- v2-dependencies-python3.10-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
Expand All @@ -86,24 +40,26 @@ jobs:
- save_cache:
paths:
- ./venv
key: v1-dependencies-python3.7-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- run:
name: Build docs
command: |
. venv/bin/activate
cd docs/ && make html && cd ..
cd docs/
make deploy_docs
cd ..
docs-build-deploy:
docker:
- image: circleci/python:3.7-node
- image: cimg/python:3.10-node
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-python3.7-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-python3.7-
- v2-dependencies-python3.10-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
Expand All @@ -117,20 +73,22 @@ jobs:
- save_cache:
paths:
- ./venv
key: v1-dependencies-python3.7-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- add_ssh_keys:
# This SSH key is "CircleCI Docs" in https://github.com/move-coop/parsons/settings/keys
# We need write access to the Parsons repo, so we can push the "gh-pages" branch.
fingerprints:
- 'a6:b1:ec:19:86:19:8b:98:1e:b1:41:b2:e1:4a:4f:3d'
- '9a:ec:4d:2b:c3:45:b2:f5:55:ca:0b:2b:36:e2:7f:df'
- run:
name: Build and deploy docs
# When running gh-pages, we specify to include dotfiles, so we pick up the .nojerkyll file.
# (This file tell Github Pages that we want to include all files in docs/, including those
# that start with an underscore like _static/).
command: |
. venv/bin/activate
cd docs/ && make html && cd ..
cd docs/
make deploy_docs
cd ..
git config user.email "[email protected]"
git config user.name "ci-build"
export PATH=/home/circleci/npm/bin:$PATH
Expand Down
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Tell us about a problem with the project's current functionality
title: "[Bug]"
labels: bug
assignees: ''
---

<!--- Provide a general summary of the bug you're experiencing in the Title above -->


## Detailed Description
<!--- Provide a detailed description of the bug you are experiencing - tell us what you expected to happen, and what happened instead of that -->


## To Reproduce
<!--- Describe the steps that lead to experiencing the bug -->


## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in, such as the following bullet points -->
* Version of Parsons used (if you know):
* Environment name and version (e.g. Chrome 39, node.js 5.4):
* Operating System and version (desktop or mobile):


## Additional Context
Add any other context about the problem here.


## Priority
Please indicate whether fixing this bug is high, medium, or low priority for you. If the issue is time-sensitive for you, please let us know when you need it addressed by.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/proposed-feature-addition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Proposed Feature/Addition
about: Suggest an addition to Parsons
title: "[Feature/Addition]"
labels: enhancement
assignees: ''
---

<!--- Provide a general summary of the proposed Parsons addition in the Title above -->


## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->


## Context
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->


## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->


## Priority
<!--- Please indicate whether adding this feature is high, medium, or low priority for you. If the issue is time-sensitive for you, please let us know when you want it addressed by. -->
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
changelog:
categories:
- title: New Features
labels:
- connector-update
- new-connector
- parsons-core
- title: Automated Testing
labels:
- testing
- title: Bug Fixes
labels:
- bug-fix
- title: Documentation
labels:
- documentation
# - title: New Contributors
# labels:
# -🎉-first-PR
- title: Other Changes
labels:
- "*"
51 changes: 51 additions & 0 deletions .github/workflows/test-linux-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tests

on:
pull_request:
branches: ["main"]
push:
branches: ["main"]

env:
TESTING: 1

jobs:
build:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu-latest] # add in windows-latest to add windows testing
include:
- os: ubuntu-latest
path: ~/.cache/pip
# - os: windows-latest
# path: ~\AppData\Local\pip\Cache
runs-on: ${{ matrix.os }}

steps:

- uses: actions/checkout@v3

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

- uses: actions/cache@v3
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python -m pip install -r requirements.txt

- name: Run tests
run: pytest -rf test/

- name: check linting
run: |
# E203 and W503 don't work well with black
flake8 parsons/ test/ useful_resources/ --extend-ignore=E203,W503
black --check parsons/ test/ useful_resources/
43 changes: 43 additions & 0 deletions .github/workflows/tests-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests for mac
# test mac on single python version as mac tests use 10x minutes/storage

on:
pull_request:
branches: ["main"]
push:
branches: ["main"]

env:
TESTING: 1

jobs:
build:
runs-on: macos-latest

steps:

- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
key: mac-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
mac-pip-
- name: Install dependencies
run: python -m pip install -r requirements.txt

- name: Run tests
run: TESTING=1 pytest -rf test/

- name: check linting
run: |
# E203 and W503 don't work well with black
flake8 parsons/ test/ useful_resources/ --extend-ignore=E203,W503
black --check parsons/ test/ useful_resources/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ instance/
.scrapy

# Sphinx documentation
#docs/_build/
docs/html

# PyBuilder
target/
Expand Down Expand Up @@ -124,3 +124,4 @@ bill_com_credentials.*

docs/html
docs/dirhtml
*.sw*
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
language_version: python3
args: [
'--extend-ignore=E203,W503',
'--max-line-length=100'
]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
10 changes: 5 additions & 5 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at justin@movementcooperative.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported by contacting hr@movementcooperative.org. All complaints will be reviewed
and investigated and will result in a response that is deemed necessary and
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details
of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
Expand Down
Loading

0 comments on commit cad250f

Please sign in to comment.