-
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 5306bc4
Showing
17 changed files
with
801 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,26 @@ | ||
--- | ||
name: Bug Report | ||
about: 'Use this template for issues relating to unexpected / non-functioning behavior ' | ||
title: "[BUG]" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Summary | ||
<!-- Provide a clear and concise description of what the bug is --> | ||
|
||
#### Expected Behavior | ||
<!-- Provide a description of what the expected behavior should be --> | ||
|
||
|
||
### To Reproduce | ||
<!-- Provide steps to reproduce the behavior --> | ||
|
||
|
||
|
||
### Environment Details | ||
#### Desktop (please complete the following information): | ||
- **OS**: [e.g. iOS] | ||
- **GCS Version** [e.g. 0.0.1 or commit ID] | ||
- **Python Version** [e.g. python 3.9.16] |
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 @@ | ||
--- | ||
name: Feature Request | ||
about: 'Use this template for requesting new features' | ||
title: "[FEATURE]" | ||
labels: enhancement | ||
assignees: '' | ||
--- | ||
|
||
### Summary | ||
<!-- Provide a clear and concise description of the feature request. --> | ||
|
||
#### Justification | ||
<!-- Provide a justification for taking on this request. Why do we **need** this? --> | ||
|
||
#### Solution | ||
<!-- If there is a solution, please add any details below --> |
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,42 @@ | ||
# Details | ||
|
||
## Type of Change | ||
- [ ] Refactor | ||
- [ ] Bug fix | ||
- [ ] New Feature | ||
- [ ] Breaking change | ||
|
||
|
||
## Problem | ||
|
||
<!-- Please describe the problem --> | ||
|
||
Fixes # (issue) | ||
|
||
## Solution | ||
|
||
### Summary of Changes | ||
|
||
<!-- Provide a summary of the changes --> | ||
|
||
### Change List | ||
|
||
<!-- Please add list of changes in itemized form --> | ||
- | ||
- | ||
- | ||
|
||
|
||
### Additional Details | ||
|
||
|
||
## Testing | ||
|
||
### Automated Tests | ||
|
||
<!-- TBD --> | ||
|
||
### Manual Tests | ||
|
||
<!-- Add any manual test steps that you have run to confirm the changes --> | ||
|
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 @@ | ||
## What's in this Change? | ||
|
||
<!-- Please describe the problem in bullet points --> | ||
|
||
|
||
## Testing | ||
|
||
<!-- Add any automated/manual test steps that you have run to confirm the changes --> | ||
|
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 @@ | ||
name: AllenInstitute Repo Setup | ||
|
||
description: | | ||
Configures all credentials to use AllenInstitute Repos in GitHub. | ||
inputs: | ||
token: | ||
required: false | ||
ssh_private_key: | ||
required: false | ||
ssh_auth_sock: | ||
required: false | ||
default: "/tmp/ssh_agent.sock" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure AllenInstitute Repo URLs with PAT Authorization | ||
if: ${{ inputs.token != '' }} | ||
run: | | ||
git config --global url."https://${{ github.actor }}:${{ inputs.token }}@github.com/AllenInstitute".insteadOf https://github.com/AllenInstitute | ||
shell: bash | ||
- name: Configure AllenInstitute Repo URLs with SSH Authorization | ||
if: ${{ inputs.ssh_private_key != '' }} | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ inputs.ssh_private_key }} |
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,48 @@ | ||
#!/usr/bin/env python3 | ||
import json | ||
import subprocess | ||
|
||
|
||
def get_last_version() -> str: | ||
"""Return the version number of the last release.""" | ||
json_string = ( | ||
subprocess.run( | ||
["gh", "release", "view", "--json", "tagName"], | ||
check=True, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
) | ||
.stdout.decode("utf8") | ||
.strip() | ||
) | ||
|
||
return json.loads(json_string)["tagName"] | ||
|
||
|
||
def bump_patch_number(version_number: str) -> str: | ||
"""Return a copy of `version_number` with the patch number incremented.""" | ||
major, minor, patch = version_number.split(".") | ||
return f"{major}.{minor}.{int(patch) + 1}" | ||
|
||
|
||
def create_new_patch_release(): | ||
"""Create a new patch release on GitHub.""" | ||
try: | ||
last_version_number = get_last_version() | ||
except subprocess.CalledProcessError as err: | ||
if err.stderr.decode("utf8").startswith("HTTP 404:"): | ||
# The project doesn't have any releases yet. | ||
new_version_number = "0.0.1" | ||
else: | ||
raise | ||
else: | ||
new_version_number = bump_patch_number(last_version_number) | ||
|
||
subprocess.run( | ||
["gh", "release", "create", "--generate-notes", new_version_number], | ||
check=True, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
create_new_patch_release() |
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: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Set up AllenInstitute Repo Authorization | ||
uses: ./.github/actions/setup-ai-github-urls | ||
with: | ||
token: ${{ secrets.AI_PACKAGES_TOKEN }} | ||
- name: Run Release | ||
run: | | ||
make release | ||
shell: bash |
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,148 @@ | ||
# Config copies | ||
config_local.py | ||
config_orig.py | ||
|
||
# VS Code workspace config | ||
*.code-workspace | ||
.vscode/ | ||
|
||
# JetBrains stuff | ||
.idea/ | ||
|
||
# Mac OS | ||
.DS_Store | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Some large files used for building docker | ||
cellranger*tar.gz | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
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 | ||
|
||
# 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/ | ||
|
||
# IntelliJ | ||
.idea/ |
Oops, something went wrong.