-
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.
- Loading branch information
0 parents
commit 9b4a50a
Showing
26 changed files
with
1,038 additions
and
0 deletions.
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,12 @@ | ||
############################################################################### | ||
# Ignore specific revisions when using Git Blame | ||
# | ||
# The file should contain the full (40 char) commit hashes. Lines starting with | ||
# a hash are considered comments and can be used to explain what makes the | ||
# given commit(s) unimportant. | ||
# | ||
# You can call git blame with the --ignore-revs-file option to ignore all the | ||
# commits listed in this file. | ||
############################################################################### | ||
|
||
# Ignore the following SHAs |
Validating CODEOWNERS rules …
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,15 @@ | ||
############################################################################### | ||
# GitHub Code-owner Configuration for bulk-import | ||
# | ||
# Each line is a file pattern followed by one or more owners. See this link: | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file | ||
# for more information on configuring GitHub code owners, including examples. | ||
############################################################################### | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, members | ||
# of @climatepolicyradar/tech-devs will be requested for | ||
# review when someone opens a pull request. Teams should | ||
# be identified in the format @org/team-name. Teams must have | ||
# explicit write access to the repository. | ||
* @climatepolicyradar/tech-devs |
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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
reviewers: | ||
- climatepolicyradar/tech-devs | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
reviewers: | ||
- climatepolicyradar/tech-devs |
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,25 @@ | ||
# What's changed? | ||
|
||
Provide a general summary of your changes. | ||
|
||
## Proposed version | ||
|
||
Please select the option below that is most relevant from the list below. This | ||
will be used to generate the next tag version name during auto-tagging. | ||
|
||
- [ ] Skip auto-tagging | ||
- [ ] Patch | ||
- [ ] Minor version | ||
- [ ] Major version | ||
|
||
Visit the [Semver website](https://semver.org/#summary) to understand the | ||
difference between `MAJOR`, `MINOR`, and `PATCH` versions. | ||
|
||
Notes: | ||
|
||
- If none of these options are selected, auto-tagging will fail | ||
- Where multiple options are selected, the most senior option ticked will be | ||
used -- e.g. Major > Minor > Patch | ||
- If you are selecting the version in the list above using the textbox, make | ||
sure your selected option is marked `[x]` with no spaces in between the | ||
brackets and the `x` |
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,75 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
tags: [v*] | ||
branches: | ||
- main | ||
pull_request: | ||
# By default, a workflow only runs when a pull_request event's activity type is opened, | ||
# synchronize, or reopened. | ||
types: [opened, synchronize, reopened, edited] | ||
branches: | ||
- main | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
check-auto-tagging-will-work: | ||
if: | | ||
github.event_name == 'pull_request' && | ||
(! startsWith(github.ref, 'refs/tags') && ! startsWith(github.ref, 'refs/heads/main')) | ||
uses: climatepolicyradar/reusable-workflows/.github/workflows/check-auto-tagging-will-work.yml@v11 | ||
|
||
code-quality: | ||
if: | | ||
! cancelled() && always() && | ||
(needs.check-auto-tagging-will-work.result == 'skipped' || needs.check-auto-tagging-will-work.result == 'success') && | ||
! startsWith(github.ref, 'refs/tags') | ||
needs: | ||
- check-auto-tagging-will-work | ||
uses: climatepolicyradar/reusable-workflows/.github/workflows/python-precommit-validator.yml@v11 | ||
|
||
test: | ||
if: | | ||
! cancelled() && always() && | ||
(needs.check-auto-tagging-will-work.result == 'skipped' || needs.check-auto-tagging-will-work.result == 'success') && | ||
! startsWith(github.ref, 'refs/tags') | ||
needs: | ||
- check-auto-tagging-will-work | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install latest Docker Compose | ||
uses: ndeloof/[email protected] | ||
with: | ||
legacy: false | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install "poetry==1.7.1" | ||
poetry config virtualenvs.create false | ||
poetry install --no-cache | ||
poetry install --only-root | ||
- name: Export PYTHONPATH | ||
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV | ||
|
||
- name: Create .env | ||
run: cp .env.example .env | ||
|
||
- name: Run Tests | ||
run: pytest -vvv tests/unit_tests | ||
|
||
git-tag-release: | ||
if: ${{ ! cancelled() && always() && (needs.test.result == 'success' && needs.code-quality.result == 'success')}} | ||
needs: | ||
- test | ||
- code-quality | ||
uses: climatepolicyradar/reusable-workflows/.github/workflows/git.yml@v11 |
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,176 @@ | ||
#design files | ||
/psd/ | ||
|
||
# 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/ | ||
pip-wheel-metadata/ | ||
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/ | ||
|
||
# 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 | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
pyrightconfig.json | ||
|
||
# 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/ | ||
|
||
# Ignore data files | ||
/data/** | ||
|
||
# Ignore mlflow tracking backend store | ||
/mlruns | ||
|
||
# Ignore docker directory | ||
/docker | ||
|
||
# Ignore vscode config | ||
.vscode/* | ||
|
||
# Ignore vscode development contain config files | ||
**/.devcontainer/* | ||
**/devcontainer.json | ||
|
||
# Mac OS files | ||
.DS_Store | ||
.vim | ||
backend/models | ||
**/.vscode | ||
|
||
# PyCharm | ||
.idea/ | ||
|
||
# Sundry files | ||
load_blank.txt | ||
load_default.txt | ||
|
||
# PIP (because we want to use Poetry) | ||
requirements.txt | ||
|
||
# Trunk miscellaneous | ||
*out | ||
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
tmp |
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,9 @@ | ||
*out | ||
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
tmp |
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,2 @@ | ||
[settings] | ||
profile=black |
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,26 @@ | ||
# Autoformatter friendly markdownlint config (all formatting rules disabled) | ||
# https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md | ||
default: true | ||
|
||
MD013: | ||
# Number of characters | ||
line_length: 80 | ||
|
||
# Number of characters for headings | ||
heading_line_length: 80 | ||
|
||
# Number of characters for code blocks | ||
code_block_line_length: 80 | ||
|
||
# Include code blocks | ||
headings: true | ||
|
||
# Don't include tables | ||
tables: false | ||
code_blocks: false | ||
|
||
# Strict length checking | ||
strict: false | ||
|
||
# Stern length checking | ||
stern: false |
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,7 @@ | ||
enable=all | ||
source-path=SCRIPTDIR | ||
disable=SC2154 | ||
|
||
# If you're having issues with shellcheck following source, disable the errors via: | ||
# disable=SC1090 | ||
# disable=SC1091 |
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,11 @@ | ||
# https://yamllint.readthedocs.io/en/stable/rules.html | ||
rules: | ||
quoted-strings: | ||
required: only-when-needed | ||
extra-allowed: ["{|}"] | ||
empty-values: | ||
forbid-in-block-mappings: true | ||
forbid-in-flow-mappings: true | ||
key-duplicates: {} | ||
octal-values: | ||
forbid-implicit-octal: true |
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,2 @@ | ||
# https://bandit.readthedocs.io/en/latest/config.html | ||
exclude_dirs: ["unit_tests", "integration_tests", "test", "tests"] |
Oops, something went wrong.