pybiolib 1.2.1007__tar.gz → 1.2.1018__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/PKG-INFO +1 -1
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/add_copilot_prompts.py +3 -5
- pybiolib-1.2.1018/biolib/_internal/add_gui_files.py +59 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/instructions/style-react-ts.instructions.md +2 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/.yarnrc.yml +1 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/App.tsx +17 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/Dockerfile +26 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/index.css +5 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/index.html +13 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/index.tsx +10 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/package.json +26 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/tsconfig.json +24 -0
- pybiolib-1.2.1018/biolib/_internal/templates/gui_template/vite.config.mts +8 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/run.sh +0 -0
- pybiolib-1.2.1018/biolib/_internal/templates/templates.py +13 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/init.py +27 -15
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/pyproject.toml +1 -1
- pybiolib-1.2.1007/biolib/_internal/templates/templates.py +0 -5
- pybiolib-1.2.1007/biolib/experiments/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/LICENSE +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/PYPI_README.md +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_data_record/data_record.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/data_record/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/data_record/data_record.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/data_record/push_data.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/data_record/remote_storage_endpoint.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/errors.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/file_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/fuse_mount/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/fuse_mount/experiment_fuse_mount.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/http_client.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/lfs/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/lfs/cache.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/libs/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/libs/fusepy/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/push_application.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/runtime.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/string_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/__init__.py +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/instructions/general-app-knowledge.instructions.md +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/instructions/style-general.instructions.md +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/instructions/style-python.instructions.md +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/prompts/biolib_app_inputs.prompt.md +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/prompts/biolib_onboard_repo.prompt.md +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/_internal/templates/copilot_template}/.github/prompts/biolib_run_apps.prompt.md +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/.biolib/config.yml +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/.github/workflows/biolib.yml +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/.gitignore +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/Dockerfile +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/requirements.txt +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/run.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/tree_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/account.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/account_member.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/app.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/data_record.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/experiment.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/file_node.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/push.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/resource.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/resource_permission.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/resource_version.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/result.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/typing.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/types/user.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/utils/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/utils/multinode.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_runtime/runtime.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_session/session.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/api/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/api/client.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/app/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/app/app.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/app/search_apps.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/api_client.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/app_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/auth.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/biolib_app_api.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/biolib_job_api.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/common_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/job_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/lfs_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_api_client/user_state.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/base_bbf_package.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/file_in_container.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/module_input.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/module_output_v2.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/remote_endpoints.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/remote_stream_seeker.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/saved_job.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/stdout_and_stderr.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/system_exception.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/system_status_update.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_binary_format/utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_docker_client/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_download_container.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_errors.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/biolib_logging.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/auth.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/data_record.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/download_container.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/lfs.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/push.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/run.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/runtime.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/sdk.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/cli/start.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/.gitignore +0 -0
- {pybiolib-1.2.1007/biolib/_internal/llm_instructions → pybiolib-1.2.1018/biolib/compute_node}/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/cloud_utils/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/cloud_utils/cloud_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/cache_state.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/cache_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/docker_image_cache.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/docker_executor.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/docker_types.py +0 -0
- {pybiolib-1.2.1007/biolib/compute_node → pybiolib-1.2.1018/biolib/compute_node/job_worker/executors/tars}/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/job_storage.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/job_worker.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/large_file_system.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/mappings.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/utilization_reporter_thread.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/remote_host_proxy.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/socker_listener_thread.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/socket_sender_thread.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/utils.py +0 -0
- {pybiolib-1.2.1007/biolib/compute_node/job_worker/executors/tars → pybiolib-1.2.1018/biolib/compute_node/webserver}/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/gunicorn_flask_application.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/webserver.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/webserver_types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/webserver_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/worker_thread.py +0 -0
- {pybiolib-1.2.1007/biolib/compute_node/webserver → pybiolib-1.2.1018/biolib/experiments}/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/experiments/experiment.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/jobs/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/jobs/job.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/jobs/job_result.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/jobs/types.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/py.typed +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/runtime/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/sdk/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/tables.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/typing_utils.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/user/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/user/sign_in.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/__init__.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/app_uri.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/cache_state.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/multipart_uploader.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/seq_util.py +0 -0
- {pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/utils/zip/remote_zip.py +0 -0
@@ -2,10 +2,10 @@ import os
|
|
2
2
|
import shutil
|
3
3
|
import sys
|
4
4
|
|
5
|
-
from biolib._internal import
|
5
|
+
from biolib._internal.templates import templates
|
6
6
|
|
7
7
|
|
8
|
-
def add_copilot_prompts(force: bool,
|
8
|
+
def add_copilot_prompts(force: bool, silent: bool = False) -> None:
|
9
9
|
current_working_directory = os.getcwd()
|
10
10
|
config_file_path = f'{current_working_directory}/.biolib/config.yml'
|
11
11
|
if not os.path.exists(config_file_path):
|
@@ -14,7 +14,7 @@ Error: Current directory has not been initialized as a BioLib application.
|
|
14
14
|
Please run the \"biolib init\" command first"""
|
15
15
|
print(err_string, file=sys.stderr)
|
16
16
|
exit(1)
|
17
|
-
source_path = os.path.join(
|
17
|
+
source_path = os.path.join(templates.copilot_template(), '.github')
|
18
18
|
destination_path = os.path.join(current_working_directory, '.github')
|
19
19
|
|
20
20
|
conflicting_files = []
|
@@ -23,8 +23,6 @@ Error: Current directory has not been initialized as a BioLib application.
|
|
23
23
|
relative_dir = os.path.relpath(root, source_path)
|
24
24
|
destination_dir = os.path.join(destination_path, relative_dir)
|
25
25
|
for filename in filenames:
|
26
|
-
if 'style' in filename and not style:
|
27
|
-
continue
|
28
26
|
source_file = os.path.join(root, filename)
|
29
27
|
destination_file = os.path.join(destination_dir, filename)
|
30
28
|
if os.path.exists(destination_file) and not force:
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import os
|
2
|
+
import shutil
|
3
|
+
import sys
|
4
|
+
|
5
|
+
from biolib._internal.templates import templates
|
6
|
+
|
7
|
+
|
8
|
+
def add_gui_files(force=False, silent=False) -> None:
|
9
|
+
cwd = os.getcwd()
|
10
|
+
template_dir = templates.gui_template()
|
11
|
+
|
12
|
+
root_files = ['package.json', 'Dockerfile', 'index.html', 'vite.config.mts', '.yarnrc.yml']
|
13
|
+
|
14
|
+
conflicting_files = []
|
15
|
+
|
16
|
+
# Copy root_files to init_template root and rest to subdirectory
|
17
|
+
for root, _, filenames in os.walk(template_dir):
|
18
|
+
relative_dir = os.path.relpath(root, template_dir)
|
19
|
+
|
20
|
+
for filename in filenames:
|
21
|
+
if filename in root_files:
|
22
|
+
destination_dir = cwd
|
23
|
+
else:
|
24
|
+
if relative_dir == '.':
|
25
|
+
destination_dir = os.path.join(cwd, 'gui')
|
26
|
+
else:
|
27
|
+
destination_dir = os.path.join(cwd, 'gui', relative_dir)
|
28
|
+
|
29
|
+
source_file = os.path.join(root, filename)
|
30
|
+
destination_file = os.path.join(destination_dir, filename)
|
31
|
+
|
32
|
+
if filename == 'Dockerfile':
|
33
|
+
force = True
|
34
|
+
|
35
|
+
if os.path.exists(destination_file) and not force:
|
36
|
+
with open(source_file, 'rb') as fsrc, open(destination_file, 'rb') as fdest:
|
37
|
+
if fsrc.read() != fdest.read():
|
38
|
+
conflicting_files.append(os.path.relpath(destination_file, cwd))
|
39
|
+
else:
|
40
|
+
os.makedirs(destination_dir, exist_ok=True)
|
41
|
+
shutil.copy2(source_file, destination_file)
|
42
|
+
|
43
|
+
gitignore_path = os.path.join(cwd, '.gitignore')
|
44
|
+
with open(gitignore_path, 'a') as gitignore_file:
|
45
|
+
gitignore_file.write('\n# gui\n')
|
46
|
+
gitignore_file.write('.yarn\n')
|
47
|
+
gitignore_file.write('dist\n')
|
48
|
+
gitignore_file.write('yarn.lock\n')
|
49
|
+
gitignore_file.write('tsconfig.tsbuildinfo\n')
|
50
|
+
gitignore_file.write('node_modules\n')
|
51
|
+
|
52
|
+
if conflicting_files:
|
53
|
+
print('The following files were not overwritten. Use --force to override them:', file=sys.stderr)
|
54
|
+
for conflicting_file in list(set(conflicting_files)):
|
55
|
+
print(f' {conflicting_file}', file=sys.stderr)
|
56
|
+
exit(1)
|
57
|
+
|
58
|
+
if not silent:
|
59
|
+
print('gui files added to project root and gui/ subdirectory')
|
@@ -20,3 +20,5 @@ Apply the [general coding guidelines](./style-general.instructions.md) to all co
|
|
20
20
|
- Follow the React hooks rules (no conditional hooks)
|
21
21
|
- Prefer one component per file
|
22
22
|
- Use Tailwindcss for styling
|
23
|
+
- Extract props in components with object destructuring like `const { prop1, prop2 } = props;`
|
24
|
+
- Instantiate functional components with props like `export default function MyComponent(props: IProps) { ... }`.
|
@@ -0,0 +1 @@
|
|
1
|
+
nodeLinker: node-modules
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export default function App() {
|
2
|
+
return (
|
3
|
+
<div className="min-h-screen bg-gray-100 flex items-center justify-center">
|
4
|
+
<div className="text-center">
|
5
|
+
<h1 className="text-4xl font-bold mb-4">
|
6
|
+
Hello, BioLib!
|
7
|
+
</h1>
|
8
|
+
<p className="text-lg mb-2">
|
9
|
+
You have successfully set up your BioLib GUI application.
|
10
|
+
</p>
|
11
|
+
<p className="italic">
|
12
|
+
This is a simple React template with Tailwind CSS styling.
|
13
|
+
</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
);
|
17
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
FROM node:24.4.1-alpine3.21 AS gui_builder
|
2
|
+
|
3
|
+
WORKDIR /home/biolib/
|
4
|
+
|
5
|
+
RUN corepack enable
|
6
|
+
COPY .yarnrc.yml .
|
7
|
+
COPY package.json .
|
8
|
+
COPY index.html .
|
9
|
+
COPY vite.config.mts .
|
10
|
+
RUN yarn install
|
11
|
+
|
12
|
+
COPY gui gui
|
13
|
+
RUN yarn build
|
14
|
+
|
15
|
+
FROM python:3.13.5-slim
|
16
|
+
WORKDIR /home/biolib/
|
17
|
+
|
18
|
+
COPY requirements.txt .
|
19
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
20
|
+
|
21
|
+
COPY run.sh .
|
22
|
+
COPY run.py .
|
23
|
+
|
24
|
+
RUN mkdir output
|
25
|
+
|
26
|
+
COPY --from=gui_builder /home/biolib/dist/index.html gui.html
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<link href="gui/index.css" rel="stylesheet">
|
7
|
+
<title>BIOLIB_REPLACE_APP_NAME</title>
|
8
|
+
</head>
|
9
|
+
<body style="overflow: hidden; background: white">
|
10
|
+
<div id="root"></div>
|
11
|
+
<script type="module" src="gui/index.tsx"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "biolib_replace_app_name",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"private": true,
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "vite",
|
8
|
+
"build": "tsc --noEmit -p gui/tsconfig.json && vite build",
|
9
|
+
"preview": "vite preview"
|
10
|
+
},
|
11
|
+
"dependencies": {
|
12
|
+
"react": "18.3.1",
|
13
|
+
"react-dom": "18.3.1"
|
14
|
+
},
|
15
|
+
"devDependencies": {
|
16
|
+
"@tailwindcss/vite": "4.0.14",
|
17
|
+
"@types/react": "18.3.3",
|
18
|
+
"@types/react-dom": "18.3.0",
|
19
|
+
"@vitejs/plugin-react": "4.2.1",
|
20
|
+
"tailwindcss": "4.0.14",
|
21
|
+
"typescript": "5.2.2",
|
22
|
+
"vite": "5.3.4",
|
23
|
+
"vite-plugin-singlefile": "2.0.2"
|
24
|
+
},
|
25
|
+
"packageManager": "yarn@4.6.0"
|
26
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"composite": true,
|
4
|
+
"target": "ES2020",
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
6
|
+
"module": "ESNext",
|
7
|
+
"skipLibCheck": true,
|
8
|
+
|
9
|
+
/* Bundler mode */
|
10
|
+
"moduleResolution": "bundler",
|
11
|
+
"allowImportingTsExtensions": true,
|
12
|
+
"verbatimModuleSyntax": true,
|
13
|
+
"moduleDetection": "force",
|
14
|
+
"noEmit": true,
|
15
|
+
"jsx": "react-jsx",
|
16
|
+
|
17
|
+
/* Linting */
|
18
|
+
"strict": true,
|
19
|
+
"noUnusedLocals": true,
|
20
|
+
"noUnusedParameters": true,
|
21
|
+
"noFallthroughCasesInSwitch": true
|
22
|
+
},
|
23
|
+
"include": ["."]
|
24
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { defineConfig } from "vite";
|
2
|
+
import react from "@vitejs/plugin-react";
|
3
|
+
import tailwindcss from "@tailwindcss/vite";
|
4
|
+
import { viteSingleFile } from "vite-plugin-singlefile";
|
5
|
+
|
6
|
+
export default defineConfig({
|
7
|
+
plugins: [react(), tailwindcss(), viteSingleFile()],
|
8
|
+
});
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
|
4
|
+
def init_template() -> str:
|
5
|
+
return os.path.join(os.path.dirname(__file__), 'init_template')
|
6
|
+
|
7
|
+
|
8
|
+
def copilot_template() -> str:
|
9
|
+
return os.path.join(os.path.dirname(__file__), 'copilot_template')
|
10
|
+
|
11
|
+
|
12
|
+
def gui_template() -> str:
|
13
|
+
return os.path.join(os.path.dirname(__file__), 'gui_template')
|
@@ -6,6 +6,7 @@ import click
|
|
6
6
|
|
7
7
|
from biolib import utils # Import like this to let BASE_URL_IS_PUBLIC_BIOLIB be set correctly
|
8
8
|
from biolib._internal.add_copilot_prompts import add_copilot_prompts
|
9
|
+
from biolib._internal.add_gui_files import add_gui_files
|
9
10
|
from biolib._internal.string_utils import normalize_for_docker_tag
|
10
11
|
from biolib._internal.templates import templates
|
11
12
|
from biolib.utils import BIOLIB_PACKAGE_VERSION
|
@@ -23,24 +24,27 @@ def init() -> None:
|
|
23
24
|
'Remember to set the app URI in the .biolib/config.yml file later, '
|
24
25
|
'and docker image name in the .biolib/config.yml and .github/workflows/biolib.yml files.'
|
25
26
|
)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
if
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
advanced_setup_input = input('Do you want to set up advanced features like Copilot and GUI? [y/N]: ')
|
28
|
+
advanced_setup = advanced_setup_input.lower() == 'y'
|
29
|
+
include_copilot = False
|
30
|
+
include_gui = False
|
31
|
+
if advanced_setup:
|
32
|
+
copilot_enabled_input = input('Do you want to include Copilot instructions and prompts? [y/N]: ')
|
33
|
+
include_copilot = copilot_enabled_input.lower() == 'y'
|
34
|
+
include_gui_input = input('Do you want to include GUI setup? [y/N]: ')
|
35
|
+
include_gui = include_gui_input.lower() == 'y'
|
36
|
+
|
37
|
+
init_template_dir = templates.init_template()
|
35
38
|
conflicting_files = []
|
36
39
|
files_to_overwrite = set()
|
37
40
|
|
38
41
|
try:
|
39
42
|
# First pass: check for conflicts
|
40
|
-
for root, dirs, filenames in os.walk(
|
43
|
+
for root, dirs, filenames in os.walk(init_template_dir):
|
41
44
|
dirs[:] = [d for d in dirs if '__pycache__' not in d]
|
42
|
-
relative_dir = os.path.relpath(root,
|
45
|
+
relative_dir = os.path.relpath(root, init_template_dir)
|
43
46
|
destination_dir = cwd if relative_dir == '.' else os.path.join(cwd, relative_dir)
|
47
|
+
|
44
48
|
for filename in filenames:
|
45
49
|
source_file = os.path.join(root, filename)
|
46
50
|
destination_file = os.path.join(destination_dir, filename)
|
@@ -61,18 +65,22 @@ def init() -> None:
|
|
61
65
|
files_to_overwrite.add(conflicting_file)
|
62
66
|
|
63
67
|
replace_app_uri = app_uri if app_uri else 'PUT_APP_URI_HERE'
|
68
|
+
replace_app_name = app_name if app_name else 'biolib-app'
|
64
69
|
|
65
70
|
# Second pass: copy files (only if no conflicts)
|
66
|
-
for root, dirs, filenames in os.walk(
|
71
|
+
for root, dirs, filenames in os.walk(init_template_dir):
|
67
72
|
dirs[:] = [d for d in dirs if '__pycache__' not in d]
|
68
|
-
relative_dir = os.path.relpath(root,
|
73
|
+
relative_dir = os.path.relpath(root, init_template_dir)
|
69
74
|
destination_dir = os.path.join(cwd, relative_dir)
|
75
|
+
|
70
76
|
os.makedirs(destination_dir, exist_ok=True)
|
71
77
|
|
72
78
|
for filename in filenames:
|
73
79
|
if utils.BASE_URL_IS_PUBLIC_BIOLIB and filename == 'biolib.yml':
|
74
80
|
continue
|
75
81
|
|
82
|
+
relative_file_path = os.path.join(relative_dir, filename) if relative_dir != '.' else filename
|
83
|
+
|
76
84
|
source_file = os.path.join(root, filename)
|
77
85
|
destination_file = os.path.join(destination_dir, filename)
|
78
86
|
relative_file_path = os.path.relpath(destination_file, cwd)
|
@@ -88,6 +96,7 @@ def init() -> None:
|
|
88
96
|
'BIOLIB_REPLACE_DOCKER_TAG',
|
89
97
|
docker_tag if docker_tag else 'PUT_DOCKER_TAG_HERE',
|
90
98
|
)
|
99
|
+
new_content = new_content.replace('BIOLIB_REPLACE_APP_NAME', replace_app_name)
|
91
100
|
|
92
101
|
with open(destination_file, 'w') as f:
|
93
102
|
f.write(new_content)
|
@@ -99,8 +108,11 @@ def init() -> None:
|
|
99
108
|
with open(readme_path, 'w') as readme_file:
|
100
109
|
readme_file.write(f'# {app_name}\n')
|
101
110
|
|
102
|
-
if
|
103
|
-
add_copilot_prompts(force=False,
|
111
|
+
if include_copilot:
|
112
|
+
add_copilot_prompts(force=False, silent=True)
|
113
|
+
|
114
|
+
if include_gui:
|
115
|
+
add_gui_files(force=False, silent=True)
|
104
116
|
|
105
117
|
except KeyboardInterrupt:
|
106
118
|
print('\nInit command cancelled.', file=sys.stderr)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/data_record/remote_storage_endpoint.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/fuse_mount/experiment_fuse_mount.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/.biolib/config.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/_internal/templates/init_template/requirements.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/docker_image_cache.py
RENAMED
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/__init__.py
RENAMED
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/docker_executor.py
RENAMED
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/job_worker/executors/docker_types.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007 → pybiolib-1.2.1018}/biolib/compute_node/webserver/gunicorn_flask_application.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1007/biolib/compute_node/webserver → pybiolib-1.2.1018/biolib/experiments}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|