Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release required #22

Closed
Keuronde opened this issue Aug 14, 2021 · 19 comments
Closed

New release required #22

Keuronde opened this issue Aug 14, 2021 · 19 comments

Comments

@Keuronde
Copy link

Hi,

I try to use Pinion because I was impress by the tool. And I do like it, since I take the time to write an article about it (in French).
I lost a lot of time renaming all pin to have the same name for the same signal.
Now, I see that the code doing that is in commit ef2fcbf. It is a pity that this is not include yet in the release, now that you tool have been presented on some major web site.

I think that this modification alone deserve a new release. Can you make it ?

@yaqwsx
Copy link
Owner

yaqwsx commented Aug 14, 2021

I plan to make a release after resolving #13, #14, #17, #18, and possibly #19.

If you are interested in having an upstream version, you can always install it via:

pip install git+https://github.com/yaqwsx/Pinion@master

@Keuronde
Copy link
Author

Hi Yaqwsx,

Thanks for your answer.

I did try :
pip3 install git+https://github.com/yaqwsx/Pinion@main

But I got an error when running :
pinion generate -b carte.kicad_pcb -s carte_tmpl_git.yml web2/

The error is :
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/lib/python3.7/site-packages/pinion/resources/pinion.js'

Regards,

@yaqwsx
Copy link
Owner

yaqwsx commented Aug 17, 2021

Oh, I forgot that setup.py does not build the Javascript framework automatically. I will try to address this near in the future.

@yaqwsx
Copy link
Owner

yaqwsx commented Aug 22, 2021

I added the possibility to download a pre-built nightly package. The instructions for installation were added to the installation section of documenation.

@Keuronde
Copy link
Author

Keuronde commented Sep 2, 2021

Hi yaqwsx,

I finally took the time to test it.
In the installation section, the link to the pre-built nightly package (https://yaqwsx.github.io/Pinion/installation/releases/pinion-latest.whl) is broken...
Sorry to bother you !

@yaqwsx
Copy link
Owner

yaqwsx commented Sep 4, 2021

This is strange; it seems that GH pages do not serve Python packages. In the meantime, you can directly get it from the repository (branch gh-pages): https://github.com/yaqwsx/Pinion/blob/gh-pages/releases/latest/pinion-latest.whl

@Keuronde
Copy link
Author

Keuronde commented Sep 5, 2021

Hi yaqwsx,

One more issue, when trying to install pinion-latest, I got the following error :

pip3 install pinion-latest.whl
pinion-latest.whl is not a valid wheel filename.

I renamed it Pinion-0.1.0+22.g00654f4.dirty.dist-py3-none-any.whl and I was able to install it and run it. Works fine after that !

@mfaccin
Copy link

mfaccin commented Aug 23, 2022

I'm having the same issue that @Keuronde to install pinion-latest and renaming the file didn't solve it. do you have any clue about a workaround for it?

@Keuronde
Copy link
Author

@mfaccin
To get the "good" name of the package, you need to open it with a zip tool, and get the name of the folder ".dist-info" and rename your whl file accordingly.
example
dist-info : Pinion-0.1.0+33.g5f6607b.dirty.dist-info
rename your wheel file : Pinion-0.1.0+33.g5f6607b.dirty.dist-py3-none-any.whl

@mfaccin
Copy link

mfaccin commented Aug 23, 2022

thank you @Keuronde

just found the command pip3 debug pinion-latest.whl to find the dist-info as you suggested.

@mfaccin
Copy link

mfaccin commented Aug 30, 2022

hey guys @Keuronde @yaqwsx , sorry for bothering you again

I tried to install the pinion-latest in a new machine and the 0.1.0+33.g5f6607b didn't work anymore. could you help me how to find the correct wheel filename to install?

@Keuronde
Copy link
Author

Hey @mfaccin
This morning, I try and got 404 when trying to download the file.
This afternoon, everything seem fine... With pip install Pinion-0.1.0+33.g5f6607b.dirty.dist-py3-none-any.whl

@Keuronde
Copy link
Author

Keuronde commented Nov 14, 2022

@yaqwsx : Sorry to bother you again, but I tried to make another diagram and current released package is broken with actual dependencies.
I would like to build a package 0.2.1 with 3 modifications :
pin version of pcbdraw==0.8.0
pin version of pcbnewTransition==0.1.0

And change one line in template.py :

# p.insert(0, "name", f"{footprint.GetReference()}.{pad.GetName()}")
p.insert(0, "name", f"{pad.GetNetname()}")

With that, I got a nicely working pinion, but I don't know how to package it with the javascript....

@Keuronde
Copy link
Author

Can you either explain me how you make your package or create this package?

@yaqwsx
Copy link
Owner

yaqwsx commented Nov 15, 2022

Hi, sorry for the long unresponsiveness; there were other projects that needed my attention and Pinion wasn't a priority at the moment.

There was a wrongly specified version of PcbDraw in the setup.py. We required >=0.8 instead of ~=0.8. This allowed the users to use Pinion with PcbDraw v1 for which it has not been adapted yet.

I pushed the initial changes to ensure compatibility in fcd0f5a (there's still more work to be done to bring in the new functionality of v1, but at the moment it should work as used to).

@Keuronde
Copy link
Author

Keuronde commented Nov 15, 2022

Hi yaqwsx,

I just try the new version and got a typeError...
I really would like to build a package, don't you have any instruction (otherwise, I will compare what's in your package and what in the package build with python3 setup.py bdist_wheel)

Successfully installed Pinion-0.1.0+34.gfcd0f5a.dirty pcbdraw-1.0.1 pcbnewTransition-0.2.0 svgpathtools-1.4.1
$ pinion generate  plotted -b Holonome2023.kicad_pcb -s Holonome.yml --pack web/
Traceback (most recent call last):
  File "/home/keuronde/.local/bin/pinion", line 8, in <module>
    sys.exit(cli())
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/keuronde/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/ui.py", line 72, in wrapper
    return func(*args, **kwargs)
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/ui.py", line 105, in generatePlotted
    generate(specification=yaml.load(specification),
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/generate.py", line 328, in generate
    fSource, bSource = imageGenerator(board, outputdir)
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/ui.py", line 98, in generateImages
    return generateDrawnImages(board, outputdir, dpi, {
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/generate.py", line 262, in generateDrawnImages
    fSource = generateImage(board.GetFileName(), outputdir / "front.png",
  File "/home/keuronde/.local/lib/python3.9/site-packages/pinion/generate.py", line 193, in generateImage
    image = plotter.plot()
  File "/home/keuronde/.local/lib/python3.9/site-packages/pcbdraw/plot.py", line 1039, in plot
    self._build_libs_path()
  File "/home/keuronde/.local/lib/python3.9/site-packages/pcbdraw/plot.py", line 1144, in _build_libs_path
    for l in self.libs:
TypeError: 'NoneType' object is not iterable

@Polsaker
Copy link

Polsaker commented Dec 4, 2022

Seeing the same error as above when plotting and this error when using the "rendered" option:

Traceback (most recent call last):
  File "/home/polsaker/.local/lib/python3.10/site-packages/pcbdraw/renderer.py", line 353, in startPcbnewSession
    yield session
  File "/home/polsaker/.local/lib/python3.10/site-packages/pcbdraw/renderer.py", line 516, in renderBoard
    with session.start3DViewer() as viewer:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/polsaker/.local/lib/python3.10/site-packages/pcbdraw/renderer.py", line 203, in start3DViewer
    id = self.waitForWindow("3d viewer", 15)
  File "/home/polsaker/.local/lib/python3.10/site-packages/pcbdraw/renderer.py", line 99, in waitForWindow
    return self.waitForWindows([titlePattern], timeout, callback)
  File "/home/polsaker/.local/lib/python3.10/site-packages/pcbdraw/renderer.py", line 117, in waitForWindows
    raise TimeoutError(f"None of '{titlePatterns}' didn't appear within timeout. Available windows:\n{windows_list}")
TimeoutError: None of '['3d viewer']' didn't appear within timeout. Available windows:
- pcbnew
- Loading PCB
- PCB Editor
- KiCad PCB Editor

@yaqwsx
Copy link
Owner

yaqwsx commented Jan 12, 2023

FYI: v0.3 was released.

@yaqwsx
Copy link
Owner

yaqwsx commented Jan 12, 2023

@Polsaker: Please open a new issue for the problem with rendering and plotting (separate issues, please). Please, describe the best environment you use and the steps to reproduce.

@yaqwsx yaqwsx closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants