Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
18d0d46
Scaffolding
MrMatAP Mar 15, 2022
bf54ffe
Scaffolding
MrMatAP Mar 15, 2022
789d79d
Added copyright
MrMatAP Apr 24, 2022
d931c58
Added azure webapp publishing
MrMatAP Apr 24, 2022
28fc5e4
Set Python 3.10
MrMatAP Apr 24, 2022
4755222
Fixed build badge
MrMatAP Apr 24, 2022
62a6984
Ignoring missing module docstrings
MrMatAP Apr 24, 2022
3b914ee
Added an excuse for a test
MrMatAP Apr 24, 2022
4224528
We just want to install our own wheel
MrMatAP Apr 24, 2022
d0a23d7
Does it need to be a folder?
MrMatAP Apr 24, 2022
6e08395
Some extra settings
MrMatAP Apr 24, 2022
d17227c
Crafting an extra requirements.txt just for Azure
MrMatAP Apr 24, 2022
b2d13c5
Maybe by fully qualifying the path?
MrMatAP Apr 24, 2022
ec0590c
Fixed the file path to the wheel
MrMatAP Apr 24, 2022
8794124
Reverting 3.10 features
MrMatAP Apr 24, 2022
7542ea3
Removed duplicate license
MrMatAP Apr 30, 2022
a3dab09
Added run configurations
MrMatAP Apr 30, 2022
d5e5301
Added db connectivity & alembic
MrMatAP May 1, 2022
5bf2dc7
Naive, initial implementation
MrMatAP May 15, 2022
79b733f
Added run configuration with local infra
MrMatAP May 15, 2022
beaff98
Slightly modernised
MrMatAP Jan 2, 2025
f0920bc
Bump on actions
MrMatAP Jan 2, 2025
265dd6f
Cleaned up
MrMatAP Jan 2, 2025
1741045
Halfway
MrMatAP Jan 18, 2025
03e6e99
Dependency version bump
MrMatAP Mar 16, 2025
36030fa
Updated API and testsuite
MrMatAP Apr 25, 2025
1391d68
Updated build pipeline
MrMatAP Apr 25, 2025
2196327
Updated build pipeline
MrMatAP Apr 25, 2025
9297f0c
Updated build pipeline
MrMatAP Apr 25, 2025
61d3e31
Testing where the files go
MrMatAP Apr 25, 2025
8d0c05f
Fixed pytest configuration
MrMatAP Apr 25, 2025
71978b9
No need to debug anymore
MrMatAP Apr 25, 2025
9201430
Fixed mypy complaints
MrMatAP Apr 25, 2025
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
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#
# How to build this

name: Build

#
# Operational Variables

env:
MAJOR: 0
MINOR: 0
PYTHON_VERSION: 3.13.0

#
# Establish when the workflow is run
# We do build on every push except when we push onto main (which ought to be subject to branch protection)
# We do build whenever a PR onto main is closed (see on) and the code is actually merged (see release job if)
# Why is that okay?
# Since we're making a PR, we know from the previous workflow run on push that the repo is okay and the PR
# shows that to us. A PR itself doesn't cause a build, except when it is closed and the changes were merged.

on:
push:
branches-ignore:
- main
pull_request_target:
branches:
- main
types:
- closed

#
# Workflow

jobs:

build:
runs-on: ubuntu-latest
steps:

- name: Checkout out our code
uses: actions/checkout@v3

- name: Calculate Build Context
run: |
MRMAT_VERSION="${MAJOR}.${MINOR}.${GITHUB_RUN_NUMBER}"
if [ "$GITHUB_EVENT_NAME" == 'pull_request_target' && GITHUB_BASE_REF == 'main']; then
MRMAT_IS_RELEASE=true
echo "::warning ::Building release ${MRMAT_VERSION}"
echo "MRMAT_IS_RELEASE=true" >> $GITHUB_ENV
else
MRMAT_VERSION="${MRMAT_VERSION}.dev0"
echo "::warning ::Building version ${MRMAT_VERSION}"
fi
echo "MRMAT_VERSION=${MRMAT_VERSION}" >> $GITHUB_ENV

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

- name: Establish a cache for dependencies
uses: actions/cache@v4
with:
path: |
~/.local
~/.cache/pip
key: ${{ runner.os }}

- name: Build
run: |
export PYTHONUSERBASE=${HOME}/.local
pip install --user -r requirements.txt -r requirements.dev.txt
PYTHONPATH=${GITHUB_WORKSPACE}/src pytest
PYTHONPATH=${GITHUB_WORKSPACE}/src python -m build --wheel -n

- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Test and Coverage
path: |
build/junit.xml
build/coverage.xml

- name: Conditional Release
uses: marvinpinto/action-automatic-releases@latest
if: (github.event.pull_request.merged == true && github.base_ref == 'main')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.MRMAT_VERSION }}"
prerelease: false
title: "Release ${{ env.MRMAT_VERSION }}"
250 changes: 250 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@

# Created by https://www.toptal.com/developers/gitignore/api/jetbrains,python
# Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains,python

### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### Python ###
# 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/
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/
pytestdebug.log

# 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/
doc/_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/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# profiling data
.prof

# End of https://www.toptal.com/developers/gitignore/api/jetbrains,python


.coverage
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/copyright/MIT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading