-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: content render and restart (#236)
Co-authored-by: Jonathan Keane <[email protected]>
- Loading branch information
Showing
24 changed files
with
1,436 additions
and
120 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
File renamed without changes.
Binary file added
BIN
+504 Bytes
integration/resources/connect/bundles/example-flask-minimal/bundle.tar.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
integration/resources/connect/bundles/example-flask-minimal/hello.py
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,8 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
|
||
@app.route("/") | ||
def hello_world(): | ||
return "<p>Hello, World!</p>" |
24 changes: 24 additions & 0 deletions
24
integration/resources/connect/bundles/example-flask-minimal/manifest.json
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,24 @@ | ||
{ | ||
"version": 1, | ||
"locale": "en_US.UTF-8", | ||
"metadata": { | ||
"appmode": "python-api", | ||
"entrypoint": "hello" | ||
}, | ||
"python": { | ||
"version": "3.12.2", | ||
"package_manager": { | ||
"name": "pip", | ||
"version": "24.1.2", | ||
"package_file": "requirements.txt" | ||
} | ||
}, | ||
"files": { | ||
"requirements.txt": { | ||
"checksum": "2861f6872b39701536a1fdf2c7bff86b" | ||
}, | ||
"hello.py": { | ||
"checksum": "09f4dee97c8b7e2770157cf5d7fb6a73" | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
integration/resources/connect/bundles/example-flask-minimal/requirements.txt
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 @@ | ||
Flask==3.0.3 |
2 changes: 2 additions & 0 deletions
2
integration/resources/connect/bundles/example-quarto-minimal/.gitignore
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 @@ | ||
/.quarto/ | ||
_site/ |
19 changes: 19 additions & 0 deletions
19
integration/resources/connect/bundles/example-quarto-minimal/_quarto.yml
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,19 @@ | ||
project: | ||
type: website | ||
|
||
website: | ||
title: "example-quarto-minimal" | ||
navbar: | ||
left: | ||
- href: index.qmd | ||
text: Home | ||
- about.qmd | ||
|
||
format: | ||
html: | ||
theme: cosmo | ||
css: styles.css | ||
toc: true | ||
|
||
|
||
|
5 changes: 5 additions & 0 deletions
5
integration/resources/connect/bundles/example-quarto-minimal/about.qmd
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,5 @@ | ||
--- | ||
title: "About" | ||
--- | ||
|
||
About this site |
Binary file added
BIN
+734 Bytes
integration/resources/connect/bundles/example-quarto-minimal/bundle.tar.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
integration/resources/connect/bundles/example-quarto-minimal/index.qmd
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 @@ | ||
--- | ||
title: "example-quarto-minimal" | ||
--- | ||
|
||
This is a Quarto website. | ||
|
||
To learn more about Quarto websites visit <https://quarto.org/docs/websites>. |
30 changes: 30 additions & 0 deletions
30
integration/resources/connect/bundles/example-quarto-minimal/manifest.json
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,30 @@ | ||
{ | ||
"version": 1, | ||
"metadata": { | ||
"appmode": "quarto-static", | ||
"content_category": "site" | ||
}, | ||
"quarto": { | ||
"version": "1.5.54", | ||
"engines": [ | ||
"markdown" | ||
] | ||
}, | ||
"files": { | ||
".gitignore": { | ||
"checksum": "ebea58ee833ccab90d803cd345b2c81f" | ||
}, | ||
"_quarto.yml": { | ||
"checksum": "619323d181451c463ed77284cb31da12" | ||
}, | ||
"about.qmd": { | ||
"checksum": "b3260e8597e68ac0d3a7951d26a2e945" | ||
}, | ||
"index.qmd": { | ||
"checksum": "8395ee08073124f3ca275ed29ec1a24a" | ||
}, | ||
"styles.css": { | ||
"checksum": "e31c3cdea03dfab8a29456978017bd10" | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
integration/resources/connect/bundles/example-quarto-minimal/styles.css
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 @@ | ||
/* css styles */ |
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,8 @@ | ||
import os | ||
|
||
from packaging import version | ||
|
||
from posit import connect | ||
|
||
client = connect.Client() | ||
CONNECT_VERSION = version.parse(client.version) |
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
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,41 @@ | ||
from posit import connect | ||
|
||
|
||
class TestEnvVars: | ||
@classmethod | ||
def setup_class(cls): | ||
cls.client = connect.Client() | ||
cls.content = cls.client.content.create( | ||
name="Sample", | ||
description="Simple sample content for testing", | ||
access_type="acl", | ||
) | ||
|
||
@classmethod | ||
def teardown_class(cls): | ||
cls.content.delete() | ||
assert cls.client.content.count() == 0 | ||
|
||
def test_clear(self): | ||
self.content.environment_variables.create("KEY", "value") | ||
assert self.content.environment_variables.find() == ["KEY"] | ||
self.content.environment_variables.clear() | ||
assert self.content.environment_variables.find() == [] | ||
|
||
def test_create(self): | ||
self.content.environment_variables.create("KEY", "value") | ||
assert self.content.environment_variables.find() == ["KEY"] | ||
|
||
def test_delete(self): | ||
self.content.environment_variables.create("KEY", "value") | ||
assert self.content.environment_variables.find() == ["KEY"] | ||
self.content.environment_variables.delete("KEY") | ||
assert self.content.environment_variables.find() == [] | ||
|
||
def test_find(self): | ||
self.content.environment_variables.create("KEY", "value") | ||
assert self.content.environment_variables.find() == ["KEY"] | ||
|
||
def test_update(self): | ||
self.content.environment_variables.update(KEY="value") | ||
assert self.content.environment_variables.find() == ["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
Oops, something went wrong.