Jupyter Extension Publish - jupyter-notebook

i have created custom extension and try to publish on jupyter lab and notebook so any idea about publishing jupyter extension...
I have created Python package for extension on pypi https://pypi.org/

First of all you should build your package, according this tutorial which is for main site of Jupyterlab, this link :
python -m build
After that inside your main directory, it will create this folder: /dist.
in the dist folder you should find a .whl file.
So, install twine package:
pip install twine
After that you can upload easily with this command:
twine upload file_name.whl
It will ask you the username and password which you should create on pypi.org website.

Related

What does --prefix in ./configure script do when building a software in Linux?

I'd install a software in Linux from source code. I already downloaded the source code from the git project then the next step is to install the libraries needed for running the software.
Let's say the source code is found in a folder called Main_Folder and the library is found in another folder Lib_Folder. Let's go to latter folder and running the configure.sh script to configure the program, so my question is the following:
In the ./configure command line there is an option called --prefix{} which should specify a given path, I'd know which path I have to put here ? is it the path to the main software or whatever ?
In general --prefix defines target installation directory where built software will be installed when running make install.
For example if you run ./configure=/opt executables will be installed in /opt/bin, libraries in /opt/lib, man pages in /opt/man/ etc.
See autoconf --prefix documentation.

How do I use custom binary in my dokku host?

Part of my code requires me to run pdftotext directly. I'm not sure how to install it from my dokku installation, any help would be great.
Thanks in advance
You can install custom packages via apt using the dokku-apt plugin. Install that plugin and add a file called apt-packages to the base of your code repository. This file should have the following as it's contents:
poppler-utils
The poppler-utils package includes pdftotext, so on your next deploy, this file will be picked up and the plugin will automatically install the package for you.

ignore dev dependencies in php composer

I have developed a composer laravel based project that I need to install on a remote production server. The problem is I have limited permission/ access so my option is to "archive" the package( using composer archive) and unpack on the production.
What folders do I need to archive and how can I ignore the dev dependencies of the package as well as vendor dev dependencies?
composer archive is likely not to help you, because this command creates an archive of a defined version of a package.
You probably want to upload the whole working application, and not only one package. You should create a little script that will create the archive file for you, which should do:
checkout the application from the repository in a new directory
run composer install --no-dev to install all required dependencies without dev-dependencies
optionally delete files that are not necessary on the server, like documentation, the .git folder, and other stuff
create the archive file from all these files
optionally upload that archive to the target server and unarchive there
optionally check basic functions and switch to the new uploaded version on the server

Develop and Debug Atom Package

I have just began working on Atom.io Package development, and based on this tutorial, have learnt from how to create package development skelton file to how to publish your package.
However, I do not know how to check/debug/develop your package. I know I can use Jasmine via alt-cmd-I or Developer Console (for Atom is based on Chromium), still if you want to check the behavior of your package, do I have to re-publish or install your package manually every time?
When working on packages locally, here's the recommended workflow:
Clone your package from GitHub using apm develop <package-name>. This will clone the package's repo to your local ~/.atom/dev/packages/<package-name>
cd into this directory
Start Atom in this directory using atom -d .
Now you can work on the package, make changes, etc. Once you're ready to reload, you can use View > Developer > Reload Window to restart Atom with the changed package.
If you have your package sources locally on your machine, you can skip the first step (apm develop) and simply create a symbolic link from your sources to ~/.atom/dev/packages/<package-name.
Already have a local repo of the package?
To add to nwinkler's answer, if you already have a repo of the package locally, you can use
apm link --dev
to automatically create a symbolic link to the ~/.atom/dev/packages/ directory.
Make sure to completely restart atom in developer mode with
atom -d
or in View > Developer > Open In Dev Mode...
If you just want to use a local package (not in dev mode), you can use apm link directly. And apm unlink to remove the symbolic link to ~/.atom/packages.

How to edit core files in Atom Editor

I want to edit the tree-view package in Atom. I want to add a new item to the context menu. But i can't file where are the files. I can open the config folder and I can see all the community packages I have installed, but where do I find the core files of the editor?
They are packed inside the app.asar file. This file is located at the following location in the OS X version.
Atom.app/Contents/Resources/app.asar
This file is generated by this build script.
Of course, this package is open-source, so you can view the code for tree-view on GitHub.
GitHub also has some documentation for developing on official Atom packages.
The first step is creating your own clone.
For example, if you want to make changes to the tree-view package,
fork the repo on your github account, then clone it:
> git clone git#github.com:your-username/tree-view.git
Next install all the dependencies:
> cd tree-view
> apm install
Installing modules ✓
Now you can link it to development mode so when you run an Atom window
with atom --dev, you will use your fork instead of the built in
package:
> apm link -d
Also, if all you want to do is add another menu item, I wouldn't be surprised if there is an API for doing so from another plugin.

Resources