Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Sep 20, 2021
0 parents commit eca0f5c
Show file tree
Hide file tree
Showing 46 changed files with 4,545 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (if applicable, please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**How important is this feature?** Select from the options below:
• Low - it's an enhancement but not crucial for work
• Medium - can do work without it; but it's important (e.g. to save time or for convenience)
• Important - it's a blocker and can't do work without it

**When will use cases depending on this become relevant?** Select from the options below:
• Short-term - 2-4 weeks
• Mid-term - 2-4 months
• Long-term - 6 months - 1 year

**Additional context**
Add any other context or screenshots about the feature request here.
81 changes: 81 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build


on:
push:
branches: [ main ]

jobs:
unittests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
- name: Test with unittest
run: |
pipenv run python -m unittest discover -p 'test_*.py'
commits:
needs: unittests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

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

- name: Update requirements
run: |
python -m pip install --upgrade pip
pip install pipenv-to-requirements
pipenv_to_requirements
git add requirements*.txt
if [[ ! -z $(git status -s requirements*.txt) ]]
then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'Automatically generated requirements.txt and requirements-dev.txt' requirements*.txt
git push
fi
- name: Check in test outputs
run: |
pip install pipenv
pipenv install --dev
pipenv run python -m unittest discover -p 'test_*.py'
find tests -name output -exec git add --force {} \;
if [[ ! -z $(git status -s tests) ]]
then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'Automated adding outputs from tests' tests
git push
fi
- name: Check in test updated notebooks
run: |
if [[ ! -z $(git status -s notebooks) ]]
then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'Automated adding updated notebooks' notebooks
git push
fi
33 changes: 33 additions & 0 deletions .github/workflows/pr-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Pull request unit tests

on:
pull_request:
branches: [ main ]

jobs:

build-pipenv:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7.1, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

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

- name: Install pipenv
uses: dschep/install-pipenv-action@v1

- name: Install dependencies
run: |
pipenv install --dev
- name: Test with unittest
run: |
pipenv run python -m unittest discover -p 'test_*.py'
34 changes: 34 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Python Package

on:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
- name: build a binary wheel dist
run: |
rm -fr dist
python setup.py bdist_wheel sdist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@v1.2.2
with:
user: __token__
password: ${{ secrets.pypi_password }}
145 changes: 145 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# 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

# 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/

# Specific to this project
temp/
output/

# Test config
tests/test_config.ini

# Don't lock
Pipfile.lock

# No Pycharm
.idea/

# generated
tests/model/kitchen_sink_api_test.yaml
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
pipenv run python -m unittest discover -p 'test_*.py'

prep_tests: tests/model/kitchen_sink_api.yaml

%_api.yaml: %.yaml
pipenv run gen-api --container-class Dataset $< > $@.tmp && mv $@.tmp $@
Loading

0 comments on commit eca0f5c

Please sign in to comment.