-
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
Showing
15 changed files
with
170 additions
and
182 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
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
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,13 @@ | ||
name: py35 | ||
dependencies: | ||
- pip=8.1.1=py35_0 | ||
- python=3.5.1=0 | ||
- setuptools=20.3=py35_0 | ||
- xz=5.0.5=1 | ||
- zlib=1.2.8=0 | ||
- pip: | ||
# Sphinx 1.5a0 fork w/ PRs #2431 and #2432 merged | ||
- git+https://github.com/agronholm/sphinx.git | ||
- sphinx-autodoc-typehints>=1.0.5 | ||
- sphinxcontrib-asyncio>=0.2.0 | ||
- /home/docs/checkouts/readthedocs.org/user_builds/asphalt-py4j/checkouts/latest |
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
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
sphinx-autodoc-typehints >= 1.0.3 | ||
# Sphinx 1.5a0 fork w/ PRs #2431 and #2432 merged | ||
git+https://github.com/agronholm/sphinx.git | ||
|
||
sphinx-autodoc-typehints >= 1.0.5 | ||
sphinxcontrib-asyncio >= 0.2.0 |
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
Version history | ||
=============== | ||
|
||
1.1.0 | ||
----- | ||
This library adheres to `Semantic Versioning <http://semver.org/>`_. | ||
|
||
**2.0.0** | ||
|
||
- **BACKWARD INCOMPATIBLE** Migrated to Asphalt 2.0 | ||
- Allowed combining ``gateways`` with default parameters | ||
|
||
**1.1.0** (2016-01-02) | ||
|
||
- Added typeguard checks to fail early if arguments of wrong types are passed to functions | ||
|
||
1.0.1 | ||
----- | ||
**1.0.1** (2015-11-20) | ||
|
||
- Fixed the Asphalt dependency specification to work with setuptools older than 8.0 | ||
|
||
1.0.0 | ||
----- | ||
**1.0.0** (2015-05-16) | ||
|
||
Initial release. | ||
- Initial 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 |
---|---|---|
@@ -1,26 +1,27 @@ | ||
""" | ||
A simple example that reads its own source code using Java classes and then | ||
prints it on standard output. | ||
A simple example that reads its own source code using Java classes and then prints it on standard | ||
output. | ||
""" | ||
|
||
from asphalt.core.component import ContainerComponent | ||
from asphalt.core.context import Context | ||
from asphalt.core.runner import run_application | ||
from asphalt.core.concurrency import blocking, stop_event_loop | ||
import asyncio | ||
|
||
from asyncio_extras.threads import threadpool | ||
from asphalt.core import ContainerComponent, Context, run_application | ||
|
||
class SourcePrinterComponent(ContainerComponent): | ||
@blocking | ||
def start(self, ctx: Context): | ||
|
||
class ApplicationComponent(ContainerComponent): | ||
async def start(self, ctx: Context): | ||
self.add_component('py4j') | ||
super().start(ctx) | ||
await super().start(ctx) | ||
|
||
async with threadpool(): | ||
f = ctx.java.jvm.java.io.File(__file__) | ||
buffer = ctx.java.new_array(ctx.java.jvm.char, f.length()) | ||
reader = ctx.java.jvm.java.io.FileReader(f) | ||
reader.read(buffer) | ||
reader.close() | ||
print(ctx.java.jvm.java.lang.String(buffer)) | ||
|
||
f = ctx.java.jvm.java.io.File(__file__) | ||
buffer = ctx.java.new_array(ctx.java.jvm.char, f.length()) | ||
reader = ctx.java.jvm.java.io.FileReader(f) | ||
reader.read(buffer) | ||
reader.close() | ||
print(ctx.java.jvm.java.lang.String(buffer)) | ||
stop_event_loop() | ||
asyncio.get_event_loop().stop() | ||
|
||
run_application(SourcePrinterComponent()) | ||
run_application(ApplicationComponent()) |
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 @@ | ||
conda: | ||
file: conda-environment.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
Oops, something went wrong.