Skip to content

Commit

Permalink
New Code Samples for Netherite (#72)
Browse files Browse the repository at this point in the history
* new samples for Netherite

* corrections after review
  • Loading branch information
lechnerc77 authored Sep 20, 2021
1 parent fe24c4b commit 0390605
Show file tree
Hide file tree
Showing 58 changed files with 1,737 additions and 102 deletions.
229 changes: 229 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,232 @@ $RECYCLE.BIN/
# The build keeps auto-generating this file. We do not want this.
/.nuget/NuGet.Config
NuGet.Config


## Python specifics

# 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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# 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

# celery beat schedule file
celerybeat-schedule

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

# Azure Functions artifacts
bin
obj
appsettings.json
.python_packages

## TypeScript specifics

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TypeScript output
dist
out

# Azure Functions artifacts
bin
obj
appsettings.json
2 changes: 1 addition & 1 deletion DurableTask.Netherite.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D33AB157-04B
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4A7226CF-57BF-4CA3-A4AC-91A398A1D84B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello", "samples\Hello\Hello.csproj", "{654DA6B4-2E2F-4386-BB9F-7CE5A13998DE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello", "samples\Hello_Netherite_with_DotNetCore\Hello.csproj", "{654DA6B4-2E2F-4386-BB9F-7CE5A13998DE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{AB958467-9236-402E-833C-B8DE4841AB9F}"
EndProject
Expand Down
54 changes: 0 additions & 54 deletions samples/Hello/deploy-on-premium.ps1

This file was deleted.

8 changes: 0 additions & 8 deletions samples/Hello/local.settings.json

This file was deleted.

24 changes: 0 additions & 24 deletions samples/Hello/settings.ps1

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class HelloCities
{
[FunctionName(nameof(HelloCities))]
public async static Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "hellocities")] HttpRequest req,
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "hellocities")] HttpRequest req,
[DurableClient] IDurableClient client)
{
string orchestrationInstanceId = await client.StartNewAsync(nameof(HelloSequence));
Expand Down
21 changes: 21 additions & 0 deletions samples/Hello_Netherite_with_DotNetCore/deploy-dotnet-function.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/pwsh

# review these parameters before running the script
$Configuration = "Release"

# read the parameters
. ../scripts/settings.ps1

Write-Host "Building Function App..."

Write-Host Building $Configuration Configuration...
dotnet build -c $Configuration

# enter the directory with the binaries
Push-Location -Path bin/$Configuration/netcoreapp3.1


Write-Host "Publishing Code to Function App..."
func azure functionapp publish $functionAppName

Pop-Location
File renamed without changes.
8 changes: 8 additions & 0 deletions samples/Hello_Netherite_with_DotNetCore/local.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"EventHubsConnection": "MemoryF",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/pwsh

# read the parameters
. ./settings.ps1
. ../scripts/settings.ps1

# Build app
dotnet build

# enter the directory with the debug binaries
if (-not (Test-Path -Path ./bin/Debug/netcoreapp3.1/bin)) {
Expand Down
6 changes: 6 additions & 0 deletions samples/Hello_Netherite_with_Python/.funcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git*
.vscode
local.settings.json
test
.venv
*.ps1
Loading

0 comments on commit 0390605

Please sign in to comment.