Bio.Phylo v.1.65 on Macports does not contain TreeConstruction - macports

I am wondering why the Biopython release in Macports does not contain the Phylo.TreeConstruction module as told here?
With iPython I tried :
In [1]: from Bio import Phylo
In [2]: Phylo. <-- hit tab here
Phylo.BaseTree Phylo.NexusIO Phylo.draw_graphviz
Phylo.CDAO Phylo.PhyloXML Phylo.parse
Phylo.NeXML Phylo.PhyloXMLIO Phylo.read
Phylo.NeXMLIO Phylo.convert Phylo.to_networkx
Phylo.Newick Phylo.draw Phylo.write
Phylo.NewickIO Phylo.draw_ascii
In [4]: ?Phylo
Type: module
String form: <module 'Bio.Phylo' from '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Bio/Phylo/__init__.pyc'>
File: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Bio/Phylo/__init__.py
Docstring:
Package for working with phylogenetic trees.
See also: http://biopython.org/wiki/Phylo
That's the Macports installation
I need this urgently to turn a distance matrix to a newick format for further analysis.
Thanks,
EL

Well, it's there, but for some reason it doesn't show up in dir(Bio.Phylo) and is thus not completed automatically by IPython.
Try:
/opt/local/bin/python2.7 -c 'from Bio.Phylo.TreeConstruction import _Matrix'
That's not something MacPorts did -- it seems this is either a deliberate or accidental decision made upstream. You should file a bug and request that these packages are properly exported.

Related

Robot Framework Parameterizing using yaml file

Hi can anybody help me parameterize the string word so it will fetch from my yaml. I tried to run however I'm getting an error it shows failed: Using YAML variable files requires PyYAML module to be installed. Typically you can install it by running pip install pyyaml. but I already install pyyaml on my local machine. your response is highly appreciated. Thank you so much
Expected Result: ${String} parameter should get the value from my robot.yaml (Ralph) value
VS Terminal Screenshot:
.robot screenshot
robot.yaml file screenshot:
CMD Screenshot:
In robot.yaml define PYTHONPATH like this:
PYTHONPATH:
- .
- string: "RALPH"
Make sure you have installed PyYAML, then include robot.yaml and collections library in the robot file:
Variables path_to_file/robot.yaml
Library Collections
After this you can extract string value inside the test like this:
${value} = pop from dictionary ${PYTHONPATH[1]} string
log to console ${value}
This will print:
RALPH
Second item in PYTHONPATH list is a dictionary, so you first need to access ${PYTHONPATH[1]} and then pop the needed key (in your case string) in order to return its value.

Unable to install devstack with designate

I am new to the OpenStack environment and started to get into it with a small DevStack setup. I worked the following instructions on a Ubuntu 18.04 machine through and everything worked fine. In order to play with some dns zones I started to research about designate. After adapting the following instructions to my setup I got some errors.
Executing stack.sh produces the following error:
++/opt/stack/designate/devstack/plugin.sh:source:5 set +o xtrace
2021-01-12 21:44:39.009 | Initializing Designate
DROP DATABASE
Could not load 'database': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'pool': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'tlds': type object 'deprecated' has no attribute 'WALLABY'
usage: designate [-h] [--config-dir DIR] [--config-file PATH] [--debug]
[--log-config-append PATH] [--log-date-format DATE_FORMAT]
[--log-dir LOG_DIR] [--log-file PATH] [--nodebug]
[--nouse-journal] [--nouse-json] [--nouse-syslog]
[--nowatch-log-file]
[--syslog-log-facility SYSLOG_LOG_FACILITY] [--use-journal]
[--use-json] [--use-syslog] [--watch-log-file]
{} ...
designate: error: argument category: invalid choice: 'database' (choose from )
Error on exit
World dumping... see /opt/stack/logs/worlddump-2021-01-12-214442.txt for details
nova-compute: no process found
neutron-dhcp-agent: no process found
neutron-l3-agent: no process found
neutron-metadata-agent: no process found
neutron-openvswitch-agent: no process found
I was not sure if my setup was legit. So I tried to use the example config from the designate tutorial. But the same problem occurred.
My actual local.conf:
[[local|localrc]]
USE_PYTHON3=True
ADMIN_PASSWORD=***
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
DEST=/opt/stack
SERVICE_HOST=192.168.1.***
HOST_IP=$SERVICE_HOST
disable_service mysql
enable_service postgresql
enable_plugin designate https://opendev.org/openstack/designate
enable_service tempest
Checking the plugin.sh. It looks like the error occurred from this function:
function init_designate {
# (Re)create designate database
recreate_database designate utf8
# Init and migrate designate database
$DESIGNATE_BIN_DIR/designate-manage database sync
init_designate_backend
}
Hope somebody can give me a hint to run DevStack with designate.
Thanks in advance.
The issue you are having is a version mismatch with the cloud install and the designate plugin. Designate is expecting a newer verison of the oslo_log package.
Check that the "devstack" version you have checked out is on the master branch.
The line:
enable_plugin designate https://opendev.org/openstack/designate
Is pulling the master branch of designate for the devstack plugin.
If you are trying to install on a stable branch version OpenStack, you will need to specify a reference for the devstack plugin as well (example, stable/victoria):
enable_plugin designate https://opendev.org/openstack/designate stable/victoria
As mentioned above, you will also need to enable the designate services:
enable_service designate,designate-central,designate-api,designate-worker,designate-producer,designate-mdns

Android Manifest merger error in Codename One

In a bare bones project, I added these build hints:
android.gradleDep=compile 'com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5'
android.min_sdk_version=23
I would like to import the following Android library to make a CN1Lib (that requires at least Android SDK 23):
https://github.com/erikagtierrez/multiple-media-picker
To be short: I spent one day trying to import that, I also experimented with Android Studio and with suggestions found on Stack Overflow (trying to make a custom .aar), without success.
Could you help me to import that library? There is manifest merger error.
In fact, the issue reported by the build server is:
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute application#label value=(BareBones) from AndroidManifest.xml:15:17-42
is also present at [com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.5] AndroidManifest.xml:23:9-41 value=(#string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:15:3-43:103 to override.
I also tried to add the build hint:
android.xapplication_attr=tools:replace="android:label"
as suggested by the previous error, without success.
In the last case, I get:
Merging result: ERROR
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml:15:3-43:103 Error:
tools:replace specified at line:15 for attribute android:label, but no new value specified
/tmp/build1659178556337293135xxx/Test/src/main/AndroidManifest.xml Error:
Validation failed, exiting
-- Merging decision tree log ---
The last full log is here: https://gist.github.com/jsfan3/dd6c23f86a2ac949f996910c8cece62b
Thank you
This is happening because our code things you injected android:label on your own and doesn't inject it to avoid collision...
Change the code to this:
android.xapplication_attr=tools:replace="android:label" android:label="App Name"

Poky-sumo : nothing provides kernel-module-hello... error

we are currently updating our poky environment to the sumo branch and one of our recipes that build a kernel module does not work anymore. I get the following error when building image rootfs :
- nothing provides kernel-module-ourmodule-4.14.73-linux4sam_6.0-00005-g871f191fa293 needed by ourmodule.ourtarget
This recipe was working with previous version of yocto.
For testing, I made a copy of meta-skeleton/recipes-kernel/hello-mod in our layer, added hello-mod package in our image and built the image. I have the same kind of error:
Collected errors:
* Solver encountered 1 problem(s):
* Problem 1/1:
* - nothing provides kernel-module-hello-4.14.73-linux4sam_6.0-00005-g871f191fa293 needed by hello-mod-0.1-r0.our_target
*
* Solution 1:
* - do not ask to install a package providing hello-mod
Any help is welcome.
Thanks
In My case it was the following issue:
I had the module installed in a non standard kernel-module dir, when removing this it was fixed by adding
RPROVIDES_${PN} += "kernel-module-${PN}"
to the recipe.

Display project version in ASP.NET Core 1.0.0 web application

None of what used to work in RC.x helps anymore.
I have tried these:
PlatformServices.Default.Application.ApplicationVersion;
typeof(Controller).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
Assembly.GetEntryAssembly().GetName().Version.ToString();
They all return 1.0.0.0 instead of 1.0.0-9 which should be after execution of the dotnet publish --version-suffix 9 having this in project.json: "version": "1.0.0-*"
Basically they give me "File version" from the attached picture instead of "Product version" which dotnet publish actually seems to change.
For version 1.x:
Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
For version 2.0.0 this attribute contains something ugly:
2.0.0 built by: dlab-DDVSOWINAGE041 so use this one:
typeof(RuntimeEnvironment).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
I would do it like this on ASP.NET Core 2.0+
var assemblyVersion = typeof(Startup).Assembly.GetName().Version.ToString();
In .Net Core 3.1 I show the version directly in my View using:
#GetType().Assembly.GetName().Version.ToString()
This shows the Assembly Version you have in your csproj file:
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<FileVersion>2.2.2.2</FileVersion>
<Version>4.0.0-NetCoreRC</Version>
</PropertyGroup>
If you want to display the "other" FileVersion or "Informational" Version properties in the View add using System.Reflection:
using System.Reflection;
.... bunch of html and stuff
<footer class="main-footer">
<div class="float-right hidden-xs">
<b>Assembly Version</b> #(Assembly.GetEntryAssembly().GetName().Version)
<b>File Version</b> #(Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>().Version)
<b>Info Version</b> #(Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion)
</div>
</footer>
Note that after adding the System.Reflection the original #GetType().Assembly.GetName().Version.ToString() line returns 0.0.0.0 and you need to use the #Assembly.GetEntryAssembly().GetName().Version
There's a blog post here
Edit: Make sure to follow proper naming conventions for the Version strings. In general, they need to lead with a number. If you don't, your app will build but when you try to use NuGet to add or restore packages you'll get an error like 'anythingGoesVersion' is not a valid version string. Or a more cryptic error: Missing required property 'Name'. Input files: C:\Users....csproj.'
more here:
This work for me too:
#Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationVersion
It works with csproj file - either <Version>1.2.3.4, or <VersionPrefix>1.2.3</VersionPrefix>. However the <VersionSuffix> isn't recoganized as this doc says.
The answer by Michael G should have been the accepted one since it works as expected. Just citing the answer by Michael G above.
var version = GetType().Assembly.GetName().Version.ToString();
works fine. It gets the Package version set in the Package tab of project properties.
As an addition, if we need to get the Description we set in the same tab, this code would work. (core 3.1)
string desc = GetType().Assembly.GetCustomAttribute<AssemblyDescriptionAttribute>().Description;
Just in case someone needs this.
Happy coding !!!

Resources