Skip to content

Commit

Permalink
Change based on comments by coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
obaeza16 committed Oct 2, 2024
1 parent 7abc911 commit 357a7e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
10 changes: 6 additions & 4 deletions recipes/ega-cryptor/ega-cryptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def jvm_opts(argv):
# In the original shell script the test coded below read:
# if [ "$jvm_mem_opts" == "" ] && [ -z ${_JAVA_OPTIONS+x} ]
# To reproduce the behaviour of the above shell code fragment
# it is important to explictly check for equality with None
# it is important to explicitly check for equality with None
# in the second condition, so a null envar value counts as True!

if mem_opts == [] and getenv('_JAVA_OPTIONS') is None:
Expand All @@ -80,7 +80,7 @@ def main():
PeptideShaker updates files relative to the path of the jar file.
In a multiuser setting, the option --exec_dir="exec_dir"
can be used as the location for the peptide-shaker distribution.
If the exec_dir dies not exist,
If the exec_dir does not exist,
we copy the jar file, lib, and resources to the exec_dir directory.
"""
(mem_opts, prop_opts, pass_args, exec_dir) = jvm_opts(sys.argv[1:])
Expand All @@ -95,8 +95,10 @@ def main():

java_args = [java] + mem_opts + prop_opts + [jar_arg] + [jar_path] + pass_args

sys.exit(subprocess.call(java_args))

return_code = subprocess.call(java_args)
if return_code != 0:
sys.stderr.write(f"Java process exited with return code {return_code}\n")
sys.exit(return_code)

if __name__ == '__main__':
main()
18 changes: 10 additions & 8 deletions recipes/ega-cryptor/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,32 @@ package:
build:
noarch: generic
number: 0
script: build.sh
run_exports:
- {{ pin_subpackage('ega-cryptor', max_pin="2.0.0") }}
- {{ pin_subpackage('ega-cryptor', max_pin="x.x.x") }}

source:
url: https://ega-archive.org/assets/files/EgaCryptor.zip
sha256: 402d9d1d5de8beea416d3e8dc8e10c3fd1e7548e4d6e29d503afe1fcbe11ff8a

requirements:
build:
- unzip
run:
- openjdk >=8
- python
- python >=3.6

test:
commands:
- ega-cryptor -h
- "ega-cryptor -h"

about:
home: https://ega-archive.org/submission/data/file-preparation/egacryptor/
summary: EGACryptor v.2.0.0
license: unknown
description: |
The EGACryptor v.2.0.0 is a JAVA-based application which enables submitters
license: Apache-2.0
description: The EGACryptor v.2.0.0 is a JAVA-based application which enables submitters
to produce EGA compliant encrypted files along with files for the encrypted
and unencrypted md5sum for each file to be submitted. The application will
and unencrypted md5sum for each file to be submitted. The application will
generate an output folder that will by default mirror the directory structure
containing the original files. This output folder can subsequently be uploaded
to the EGA FTP staging area via an FTP or Aspera client.

0 comments on commit 357a7e3

Please sign in to comment.