![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
From the dx-toolkit root directory:
python3 -m pip install -e src/python
Set the _DX_DEBUG
environment variable to a positive integer before
running a dxpy-based program (such as dx
) to display the input and
output of each API call. Supported values are 1, 2, and 3 with
increasing numbers producing successively more verbose output.
Example:
$ _DX_DEBUG=1 dx ls
To be able to debug dx-toolkit (dx commands) directly in the IDE, 'Run/Debug Configurations' needs to be changed.
pylint -E
on your code before checking it in.Do not add module-level attributes into the API unless you are absolutely certain they will remain constants. For
example, do not declare an attribute dxpy.foo
(dxpy._foo
is OK), or any other non-private variable in the
global scope of any module. This is because unless the value is a constant, it may need to be updated by an
initialization method, which may need to run lazily to avoid side effects at module load time. Instead, use
accessor methods that can perform the updates at call time:
_foo = None
def get_foo():
initialize()
return _foo
Other useful resources:
dxpy is supported on Python 3 (3.8+)
Some scripts, such as format converters, are useful both as standalone executables and as importable modules.
We have the following convention for these scripts:
Install the script into src/python/dxpy/scripts
with a name like dx_useful_script.py
. This will allow
importing with import dxpy.scripts.dx_useful_script
.
Include in the script a top-level function called main()
, which should be the entry point processor, and
conclude the script with the following stanza:
if __name__ == '__main__':
main()
The dxpy installation process (invoked through setup.py
or with make -C src python
at the top level)
will find the script and install a launcher for it into the executable path automatically. This is done using the
entry_points
facility of setuptools/distribute.
Typically, when called on the command line, main() will first parse the command line arguments (sys.argv). However,
when imported as a module, the arguments need to instead be passed as inputs to a function. The following is a
suggestion for how to accommodate both styles simultaneously with just one entry point (main
):
def main(**kwargs):
if len(kwargs) == 0:
kwargs = vars(arg_parser.parse_args(sys.argv[1:]))
...
if __name__ == '__main__':
main()
FAQs
DNAnexus Platform API bindings for Python
We found that dxpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.