pybiolib 1.2.1045__py3-none-any.whl → 1.2.1056__py3-none-any.whl

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.
@@ -1,13 +1,36 @@
1
1
  ---
2
- applyTo: "**/*.ts,**/*.tsx"
2
+ applyTo: "**/*.ts,**/*.tsx,**/package.json,**/vite.config.*,**/.yarnrc.yml,**/yarn.lock,**/gui/**"
3
3
  ---
4
4
 
5
5
  Apply the [general coding guidelines](./style-general.instructions.md) to all code.
6
6
 
7
7
  # General Project Guidelines
8
- - Use yarn instead of npm whenever relevant.
9
8
  - Prefer using `export default function` over exporting at the end of the file.
10
9
 
10
+ # Package Management
11
+ - **Always use yarn instead of npm** for all package management operations
12
+ - Use `yarn install` instead of `npm install`
13
+ - Use `yarn add <package>` instead of `npm install <package>`
14
+ - Use `yarn remove <package>` instead of `npm uninstall <package>`
15
+ - Use `yarn dev` instead of `npm run dev`
16
+ - Use `yarn build` instead of `npm run build`
17
+
18
+ # Build Process
19
+ - BioLib GUI projects use Vite for building and development
20
+ - The build process compiles TypeScript and React into a single HTML file
21
+ - Always run `yarn build` to create the production build before deployment
22
+ - Use `yarn dev` for local development with hot reloading
23
+
24
+ # Configuration Files
25
+ - Respect the `.yarnrc.yml` configuration for yarn settings
26
+ - The `package.json` should specify `"packageManager": "yarn@4.6.0"` or similar
27
+ - Never modify yarn.lock manually - let yarn manage it automatically
28
+
29
+ # Dependencies
30
+ - Add new dependencies using `yarn add <package>` for runtime dependencies
31
+ - Add development dependencies using `yarn add -D <package>`
32
+ - Keep dependencies up to date but test thoroughly after updates
33
+
11
34
  # TypeScript Guidelines
12
35
  - Use TypeScript for all new code
13
36
  - Follow functional programming principles where possible
biolib/cli/init.py CHANGED
@@ -10,8 +10,10 @@ from biolib import (
10
10
  )
11
11
  from biolib._internal.add_copilot_prompts import add_copilot_prompts
12
12
  from biolib._internal.add_gui_files import add_gui_files
13
+ from biolib._internal.http_client import HttpError
13
14
  from biolib._internal.string_utils import normalize_for_docker_tag
14
15
  from biolib._internal.templates import templates
16
+ from biolib.api import client as api_client
15
17
  from biolib.biolib_api_client.api_client import BiolibApiClient
16
18
  from biolib.biolib_api_client.biolib_app_api import BiolibAppApi
17
19
  from biolib.user.sign_in import sign_in
@@ -23,6 +25,24 @@ def init() -> None:
23
25
  cwd = os.getcwd()
24
26
 
25
27
  app_uri = input('What URI do you want to create the application under? (leave blank to skip): ')
28
+
29
+ if app_uri and not app_uri.startswith('@'):
30
+ try:
31
+ response = api_client.get('system/enterprise/config/', authenticate=False)
32
+ config = response.json()
33
+ prefix = config.get('resource_hostname_prefix')
34
+ if prefix:
35
+ app_uri = f'@{prefix}/{app_uri}'
36
+ print(f'Detected enterprise deployment, using URI: {app_uri}')
37
+ except HttpError as e:
38
+ # 404 indicates endpoint not found, 501 indicates non-enterprise deployment
39
+ if e.code in [404, 501]:
40
+ pass
41
+ else:
42
+ print(f'Warning: Could not detect enterprise configuration: {e}')
43
+ except Exception as e:
44
+ print(f'Warning: Could not detect enterprise configuration: {e}')
45
+
26
46
  app_name = app_uri.split('/')[-1] if app_uri else None
27
47
  docker_tag = normalize_for_docker_tag(app_name) if app_name else None
28
48
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.1045
3
+ Version: 1.2.1056
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  Keywords: biolib
@@ -23,7 +23,7 @@ biolib/_internal/templates/__init__.py,sha256=NVbhLUMC8HITzkLvP88Qu7FHaL-SvQord-
23
23
  biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md,sha256=-j8v0GRtDhHoqP2wcGUykiwU7HQ0DmkCNxw_01oKMdY,546
24
24
  biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md,sha256=tl2Ve1ZPlPBrH6CSrjIkiMA8xnM2tQIJs1cerKCyAkU,761
25
25
  biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md,sha256=xfypuPqMsz5ejobDoVI0HjmNqksl16aFuIol1nAhpHg,1034
26
- biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md,sha256=jrQDqeRxvX5mHZHY883tJT-Z0PHDAdbHqsjaC5I5XJU,964
26
+ biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md,sha256=P-heJDSgxqo67YLjFQZ-iIu9Vh0Wln4Jgl6_GzprVQI,2083
27
27
  biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md,sha256=SMzXZImdID0yKjhE1fG54VrHdD8IVuwRxRKsMF-KjWs,697
28
28
  biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md,sha256=BfCkVyafDHFBMu6qcvKlxpnXKJRHNDp5qR_fN4XB9pI,1515
29
29
  biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md,sha256=-t1bmGr3zEFa6lKHaLcI98yq4Sg1TCMW8xbelNSHaOA,696
@@ -98,7 +98,7 @@ biolib/cli/__init__.py,sha256=IHC2bEyA27pvgp-18SGfFVJOP456elanz7suDP8D084,1316
98
98
  biolib/cli/auth.py,sha256=p9ZGY6ld2rnMbpsuRskvIQJNUHlSgYgcLTDsYGyUwyw,1407
99
99
  biolib/cli/data_record.py,sha256=t8DfJK2EZ_SNZ9drDA_N5Jqy8DNwf9f5SlFrIaOvtv0,3501
100
100
  biolib/cli/download_container.py,sha256=HIZVHOPmslGE5M2Dsp9r2cCkAEJx__vcsDz5Wt5LRos,483
101
- biolib/cli/init.py,sha256=QyoOIQ47V8pF3erFwNoKn9h6h5gEc5Czv-RoyXEZ0L4,7487
101
+ biolib/cli/init.py,sha256=oGo178h_GlDieWjBqHDLAejeUhVKm5ZJnI_o2YqbEZ0,8366
102
102
  biolib/cli/lfs.py,sha256=z2qHUwink85mv9yDgifbVKkVwuyknGhMDTfly_gLKJM,4151
103
103
  biolib/cli/push.py,sha256=J8BswMYVeTacZBHbm4K4a2XbS_I8kvfgRZLoby2wi3I,1695
104
104
  biolib/cli/run.py,sha256=RAAXbIx8Bi-4fNkEoz2ODJ0fEtyS7VxD3dkc2fVZwjY,2150
@@ -155,8 +155,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
155
155
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
156
156
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
157
157
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
158
- pybiolib-1.2.1045.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
159
- pybiolib-1.2.1045.dist-info/METADATA,sha256=3NX0mEPpOAVcCQ-A-4RCTB-dE19gytzLdprfrKLoEqs,1571
160
- pybiolib-1.2.1045.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
161
- pybiolib-1.2.1045.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
162
- pybiolib-1.2.1045.dist-info/RECORD,,
158
+ pybiolib-1.2.1056.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
159
+ pybiolib-1.2.1056.dist-info/METADATA,sha256=QPQ_pu8Hn5MYAMFVNF5DK_DSZvBOLsWpFPFGDOz64ZI,1571
160
+ pybiolib-1.2.1056.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
161
+ pybiolib-1.2.1056.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
162
+ pybiolib-1.2.1056.dist-info/RECORD,,