How to Update a Dependency in a Julia Package Under Development - package

I am developing a Julia package that I have added via dev <github url>. I can enter Pkg mode in the terminal via ] activate and get the prompt I want.
Suppose I want to change the version of Flux used with the package from v0.9.0 to v0.10.0. How do I go about doing that?

You can use pkg> update Flux or pkg> add Flux#0.10 in the same environment where you have added the package you are developing.

Related

Windows application packaging project does not provide option to uninstall previous installed package before installing the new one

I use Windows Application Packaging Project to generate MSIXBUNDLE for my WPF app.
App installed failed with error message: Windows cannot install package xxxxxx_3.8.3.0_neutral~_hijkl because a different package xxxxxxx_3.8.2.0_neutral~_abcde r with the same name is already installed. Remove package xxxxxx_3.8.2.0_neutral~_abcde before installing. (0x80073cf3)
I think the reason is that I signed the new package (3.8,3) with a new EV code signing certificate. Does WAP tool support option to uninstall previous package? Under the project property tab "Debug" ->"Start option", there is a check box for "Uninstall and then re-install my package. All information about the application state is deleted". But enable it does not seem to do the job.
Thanks,
"Uninstall and then re-install my package. All information about the application state is deleted"
I think this option is useful only for debugging purposes. It sounds like an option to remove a previous copy of the package (that has the same version and product name). So, this does not help with removing older versions.
For MSIX packages, you don't top configure anything specific in the package to trigger the removal of a previous version, as you used to do with an MSI. This is handled automatically by the OS.
But the OS needs to somehow understand which package to remove and I suspect the digital certificate is part of that check. Just manually remove the old version, install the new one, and then build a test version (3.8.4) to confirm if the different certificate was the problem.

Library conflict when running AppEngine using PyCharm

I am trying to run AppEngine Standard Environment inside PyCharm.
The problem is when I include Google App Engine SDK as part of External Libraries, but it contains multiple version of old libraries that somehow has higher priority than the library I have in my env folder.
Specifically, it is loading jinja2-2.6 which doesn't work for Python 3, even though I have jinja2-2.11.3 in my env/lib.
Pycharm does have a bit of issues with its library system as many users have reported before. To Adjust the version of your libraries in PyCharm you must access the interpreter options relating your python interpreter for your current project, you can access this option by searching in the menu Settings/Preferences or by pressing Ctrl+Alt+S
In this dialog you can view the packages available and their current running versions. You can update the version by clicking on the ▲ symbol next to the version. if you have trouble upgrading to a specific version you may need then you can alway remove a package by clicking on the "-" on the right hand side after clicking on the package you wish to remove. After removing the package you can add a new one by clicking on the "+" button right on top of the "-" button. Here you can search for the package you need and before installing a package, you can check the specific version checkbox to search for the version you require in the dropdown menu next to it.
This link contains images for what i'm explaining here.
Remember that these packages are taken directly from the pip so if you have errors using the interface you can always try to manually edit the packages (also described in the link).
To upgrade a specific package using pip for python3 you can use the following command:
pip3 install --upgrade PackageName

Julia: How can I update my published julia package?

I'm trying to develop my first Julia package, FeatureEng.jl but I'm having trouble updating the package on the registry.
I've set up the GitHub actions TagBot and Register and tried updating the package version via the Project.toml file and via git tags, but I still only have one release on GitHub ("v1.0.1") and I get the following output from TagBot:
Tag v1.0.1 already exists
When I run my package in its own environment and check the version I get...
julia> using Pkg
julia> Pkg.activate(".")
Activating environment at `~/Desktop/code/julia/FeatureEng/Project.toml`
julia> using FeatureEng, PkgVersion
julia> PkgVersion.Version(FeatureEng)
v"1.2.7"
but when I install my package in a separate environment, from the general registry, and run the same check I get...
julia> PkgVersion.Version(FeatureEng)
v"1.0.1"
Am I missing something? What is the right way to publish a new Julia package version?
Thanks in advance!
Be sure you have the tagbot file on your repository
Upgrade the version number in your local Project.toml file
Commit and push to GitHub
In GitHub, add a comment to the commit with the text #JuliaRegistrator register
That's all. Tagbot will automatically create the same tag on GitHub.
Fore more details, you can have a look on my tutorial on modules and packages: https://syl1.gitbook.io/julia-language-a-concise-tutorial/language-core/11-developing-julia-packages

Is Pkg.clone obsolete?

I have attempted to install several packages listed at JuliaObserver which are not in the Julia registry but instead are to be downloaded from github. The instructions at JuliaObserver look like this but depending on the particular repository:
Pkg.clone("https://github.com/JuliaDataReaders/DataReaders.jl.git")
These attempts all fail with "UndefVarError: clone not defined".
Yes, Pkg.clone is part of the old API. The new API is documented here https://julialang.github.io/Pkg.jl/v1/api.html
In particular, you get a similar behaviour by
using Pkg
pkg"add <URL or package name>" # If you want to install the package
pkg"dev <URL or package name>" # If you want to develop the package
If the package is registered, you can provide the package name above. If not, you need to provide the full URL to the repo

Joomla 3.xx - how to uninstall and install component or package programmatically

Normally when you want to uninstall or install a component, package, plugin or module, you normally do this manually from within the Joomla admin interface.
In this case I´m looking for a way to programmatically uninstall and install a component or package directly from PHP (within the Joomla framework), probably from a system plugin.
So basically I want to initiate the uninstall and install process of a package programmatically, so that all the components, modules, plugins etc. are uninstalled and installed, the same way the would normally be unstalled and installed by uninstalling and installing the package manually from within Joomla admin.
Can someone give me a hint to how I would accomplish this, preferably using Joomla´s core class specific functions.
I have tried to find information about this by searching various Joomla documentation, but no luck so far.
UPDATE
I have located the core model files that are used when installing and uninstalling extensions from Joomla admin.
I have found a function that I might be able to use for uninstalling extension(s) from a plugin, in this class file:
/administrator/components/com_installer/models/manage.php
The function is: "remove($eid = array())" as part of the class: "InstallerModelManage" which extends "InstallerModel"
I have also found a function to use for installing extension(s) from a plugin, in this class file:
/administrator/components/com_installer/models/install.php
The function is: "install()" as part of the class: "InstallerModelInstall" which extends "JModelLegacy"
Now I only need to find the best (correct) way to include these functions in my plugin file so that I can execute remove($eid = array()) and install()
This is how you call it.
JModelLegacy::addIncludePath(JPATH_ROOT . '/administrator/components/com_installer/models');
$model = JModelLegacy::getInstance('Install', 'InstallerModel');
$model->install();
But It will take some data from input. So you have to prepare it BEFORE
$input = JFactory::getApplication()->input;
$input->set('installtype', 'url');
$input->set('install_url', 'path/to/instalation/asyou/would/enter/it/in/installation/interface');

Resources