Fritzing2Web - looking for contributors


#1

Fritzing is a great tool and in the last time it lags of development. that is mainly because of the “complicated” codebase written in Qt.

Now we already started to build an api-client for the fritzing parts.

api docs:

currently we build a parts-viewer, uses the api-client, as a javascript/react-app that should later become a parts-creator.

Giving fritzing a new future is really what is needed. currently only the api-client is a public repository but the other parts for the app will be public as well when they reach a point where users can use them.

the fritzing qt-code is a good source to start from. the plan is to completely port fritzing to the world of html, css and javascript (mainly react).

if you want to take part of the development, don’t hesitate to let me know.

greetings
fabian
github: el-j


Standardization of Fritzing part design
#2

as next we will make public a fzp parser package. if someone is interested in a preview, send us your github username and we will add you to the repo


#3

Is the idea to make Fritzing a cloud based software requiring an internet connection and someone to maintain a fast expensive server just to let us use a piece of software that currently runs on our on systems without those needs? Or am I not understanding your goal?

If it is cloud based you are going for I will not be helping since I avoid all cloud based software at all costs even if it means something will take twice as long or not be possible at all.

If you are talking about making a desktop application that uses web technologies I would like to hear more how you are going to make it as fast as a native application since Fritzing is already slow and when working on complex boards can take minutes to compute stuff like ground fill.


#4

the idea: fritzing have to live on. that’s the main goal.

as it is for now there is no much more development and a list of more than 1000 bugs where nobody knows where to start … i could continue with many more examples.

for now i think the best way would be to keep things in free and open services. so we can handle the parts via github, as well as the maintaining for all of them. i love the idea to create a open and free hardware-based-library as well …

to come to your point: fritzing should become a web-service (imagine the power of a server in doing things like a complex copper fill …) but i want to say: it must stay an offline software, too.
from the performance perspective: a slim and well build, state of the art, webbased-software (hopefully without any bugs :wink: ) and the ability to easily build extensions/plugins for it, would be faster than what we have now. and it would fit the needs of different users and their way how they wanna use fritzing.


#5

Thank you for the explanation. I agree that Fritzing should continue and since your goal would be to have it run both locally and on a server I feel it to be a good goal. I run a local server in my home that is very powerful and having my own local copy of Friting running on it could be very nice as long as when I’m away from it I could still run it on my laptop with the need to connect to the internet.

Just in case other didn’t quite put it together yet @fa1 is the EL-j the active maintainer of the Fritzing github parts repo and most likely knows more then most of us when it comes to Fritzing code.


#6

I’m certainly interested in Fritzing and development and being retired, I have time. However I know almost nothing about javascript or react (nor CSS for that matter) but I can probably learn. From this I’m hearing (please correct me if I’m wrong) continuing work on the Qt code base isn’t going to be useful, as the future is something different? I’ll start looking at bringing up the api-client-js code and see if I can figure out how to contribute usefully. I may be of some use (how much I don’t know) on the fzp parser package because I wrote the python parts check script that parses the fzp file to check the parts. How much that knowledge will translate I don’t know (the format of the fzp file certainly will, but the xml parsing is done via lxml) but I’m willing to find out. As with here in Fritzing I’m vanepp on github as well.

Peter


#7

Oh, the name got me a bit confused until I read your clarification.

It’s great so see the developers of this software around these forums (I am newbie here).

I knew there was going on something different after looking at Fritzing Github group.

Yeah without mention the documentation regarding to how to contribute is a bit harder for newbies.


To the point, as I haven’t had got time to download the Qt software and dig into fritzing code (besides already forking the repo) because I got distracted making parts, it is great to see some Fritzing development.

I do have some basic to intermediate knowledge on Javascript at the Front-End, but haven’t done anything on the Back-End. I only have done the Codecademy course of React Part 1 but I would like to help on Fritzing development. I am not software / programming engineer but love programming stuff and could be awesome to contribute to this. You can find me on GitHub with the same username KingDarBoja.

How much knowledge is need, that’s my doubt.


#8

With some effort I have (I think) managed to install fritzing-parts-api-client-js on my windows box, but when I hit the Usage section, I’m not sure where the listed code should be run. Running it from the git command prompt where I did the install doesn’t work. Could you point me at where I should be expecting to run this please? I’m logging my install steps and if you don’t mind (and assuming I get something running) will post it here for others to try out too. As well the issues portion of the repository isn’t working (or I don’t know how to use the template, either is possible). I was going to raise the issue that the link to the fritzing-parts-server (https://github.com/fritzing/fritzing-parts-api-client-js/blob/master/fritzing.github.io/fritzing-parts) currently 404s but the issues page wouldn’t accept an issue (at least from me as vanepp on github) or as I said I got the template filled in wrong (not sure which) as I’m not that familiar with github. Its also possible that it is supposed to be accessed by the app and that is why the 404 from a web browser.

Peter


#9

i’m not sure what the issue is for the fritzing-parts-api-client-js. can you try to run the tests. make test
it will work, you can find test output at travis. https://travis-ci.org/fritzing/fritzing-parts-api-client-js

also i checked the problem with the issues, try this link… https://github.com/fritzing/fritzing-parts-api-client-js/issues/new


#10

My first guess would be ignorance on my part :slight_smile: , I 'm not at all familiar with javascript and I expect I didn’t do something it needed. I’ll try running the tests and see what happens. What kind of a result should I be expecting? From the hello world example I found I expect it to launch a server on a socket and then give me something (I don’t really know what :slight_smile: ) when I connect to the server from a web browser. Does that sound reasonable or does it do something else? I just tried the new issues link and after I signed in to github it came up, but I haven’t tried to submit an issue yet. In a bit I’ll try the web page and open an issue if it still 404s (or I can open a test issue to see if it works for me if you like).

Edit: Yes, it looks like operator error (or bad environment). I’m trying this on Windows 7pro and on the git dos command prompt it tells me I don’t have make (which is probably true) so I switched to cygwin where “make test” says:

“make: node_modules.bin\jest: Command not found”

which may be because I haven’t actually built nodejs on cygwin (a quick look indicates it has problems running there). I’ll continue poking at it so that I hopefully learn (and can document for others) how to do it. At worst I can move to the Ubuntu system that I have for Fritzing development and try it there.

edit2: I just had another try on Windows7: from a git cmd window (because it needs git):

C:\Users\Owner\fritzing-parts-api-client-js>yarn add fritzing/fritzing-parts-api
-client-js
yarn add v1.5.1
warning …\package.json: No license field
[1/4] Resolving packages…
[2/4] Fetching packages…
info fsevents@1.1.3: The platform “win32” is incompatible with this module.
info “fsevents@1.1.3” is an optional dependency and failed compatibility check.
Excluding it from installation.
[3/4] Linking dependencies…
[4/4] Building fresh packages…
success Saved lockfile.
success Saved 6 new dependencies.
info Direct dependencies
├─ babel-plugin-minify-dead-code-elimination@0.3.0
└─ fritzing-parts-api-client-js@0.2.0
info All dependencies
├─ babel-helper-evaluate-path@0.3.0
├─ babel-helper-mark-eval-scopes@0.3.0
├─ babel-helper-remove-or-void@0.3.0
├─ babel-plugin-minify-dead-code-elimination@0.3.0
├─ fritzing-parts-api-client-js@0.2.0
└─ lodash.some@4.6.0
Done in 68.97s.

C:\Users\Owner\fritzing-parts-api-client-js>node fritzing.js
module.js:549
throw err;
^

Error: Cannot find module 'C:\Users\Owner\fritzing-parts-api-client-js\fritzing.
js’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

C:\Users\Owner\fritzing-parts-api-client-js>

where fritzing.js is the code from the readme file:

C:\Users\Owner>type fritzing.js
import {FritzingPartsAPIClient} from ‘fritzing-parts-api-client-js’

FritzingPartsAPIClient.getFzps()
.then((fzpz) => {
console.log(fzps)
})
.catch((err) => {
console.error(err)
})

C:\Users\Owner>node fritzing.js
C:\Users\Owner\fritzing.js:1
(function (exports, require, module, __filename, __dirname) { import {FritzingPa
rtsAPIClient} from ‘fritzing-parts-api-client-js’
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

This of course may not be how I’m supposed to run it …

Peter


#11

I have downloaded Node JS on my WIN 10 system, I will perform the instructions in order to tell if I was successful running it.


I have no idea what I should do since I type the commands on the same folder of the cloned repo and only getting “Command not found” :confused:

EDIT #2: After reading a bit about the package.json file, noticed we need some NodeJS modules to be installed first.

If we don’t install those modules, we will get error messages like this:

> fritzing-parts-api-client-js@0.2.0 pretest C:\Users\Manuel Bojato\Documents\AtomProjects\fritzing-parts-api-client-js
> make lint

"make" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fritzing-parts-api-client-js@0.2.0 pretest: `make lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fritzing-parts-api-client-js@0.2.0 pretest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

EDIT #3: Looking deep at what I should install, I noticed there is a eslint package and also we need to install “make” for Windows in order to execute make commands as explained here.


#12

That would be good, I think this is probably a case that I don’t know what I should be doing. I think things are installing correctly (I just edited the above post with my latest attempt) as I don’t know anything about java script so I’m guessing about how to run the listed code.

Peter


#13

I followed the first install procedure in the readme.md on Win7pro:

Try and install it on Windows.

Use the first method so install yarn

Use the first method (the installer)

First install Node.js from

https://nodejs.org/en/

download node-v8.10.0-x64.msi

run the installer to install it.

Appears to have installed correctly.

back to

Download yarn-1.5.1.msi

run the installer to install it.

install git for dos from

https://git-scm.com/downloads

Git-2.15.1.2-64-bit.exe

and install it.

In my case I installed gnu make from

http://gnuwin32.sourceforge.net/packages/make.htm

(your make should do the same I expect)

make-3.81.exe

and added it to my windows path (which it doesn’t do by itself) then in a git command prompt (because the code wants git to be available). Then I changed in to the repository directory in the git cmd window and I ran
from a command prompt?

yarn add fritzing/fritzing-parts-api-client-js

then the make test that @paulvollmer suggested above that I run. That creates this error:

C:\Users\Owner\fritzing-parts-api-client-js>make test
FAIL test\index.test.js
● Test suite failed to run

TypeError: C:/Users/Owner/fritzing-parts-api-client-js/src/index.js: Cannot

read property ‘some’ of undefined

  at VisitState.onEnter (node_modules/istanbul-lib-instrument/dist/visitor.j

s:141:72)
at VisitState.wrappedEntry (node_modules/istanbul-lib-instrument/dist/visi
tor.js:336:14)
at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)

  at TraversalContext.visitQueue (node_modules/babel-traverse/lib/context.js

:150:16)
at TraversalContext.visitSingle (node_modules/babel-traverse/lib/context.j
s:108:19)
at TraversalContext.visit (node_modules/babel-traverse/lib/context.js:192:
19)
at Function.traverse.node (node_modules/babel-traverse/lib/index.js:114:17
)
at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:115:19)

----------|----------|----------|----------|----------|-------------------|

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 0 0 0 0
---------- ---------- ---------- ---------- ---------- -------------------

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 7.285s
Ran all test suites.
make: *** [test] Error 1

C:\Users\Owner\fritzing-parts-api-client-js>

Hopefully that will mean something to him (it doesn’t to me other than it isn’t happy about something :slight_smile: ).

Peter


#14

I tried using the qmake commands instead of make one and still can’t get to run it :sleepy:

There should be a requirements file or something to point us what to install in order to make it work.


#15

In theory that is what yarn is supposed to do I think. It is a package manager and is supposed to load the dependencies. It’s possible that this is the first time someone has tried on Windows and that may be the problem. I should try it out on Linux and see if I can get it to work there.

Peter


#16

Ater reading a lot about node and yarn, I managed to run it using your step plus extra thing:

1. Install Make for Windows: http://gnuwin32.sourceforge.net/packages/make.htm
2. Set up command alias using: DOSKEY make="C:\Program Files (x86)\GnuWin32\bin\make.exe" $*
3. Install Node plus npm.
4. Open with git bash the cloned repository and type: npm install eslint --save-dev
5. Run make test

What I got:

PASS test\index.test.js (6.985s)
  ApiClient getFzps
    √ Status 200 (750ms)
  ApiClient getFzpsCore
    √ Status 200 (359ms)
  ApiClient getFzpsObsolete
    √ Status 200 (266ms)
  ApiClient getFzp
    √ Status 200 (375ms)
    √ Status 404 (281ms)
  ApiClient getFzpCore
    √ Status 200 (406ms)
    √ Status 404 (313ms)
  ApiClient getFzpObsolete
    √ Status 200 (344ms)
    √ Status 404 (328ms)
  ApiClient getSvg
    √ Status 200 (344ms)
    √ Status 404 (265ms)
  ApiClient getSvgCore
    √ Status 200 (313ms)
    √ Status 404 (281ms)
  ApiClient getSvgObsolete
    √ Status 200 (328ms)
    √ Status 404 (359ms)
  ApiClient getFzbs
    √ Status 200 (454ms)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |      100 |      100 |      100 |      100 |                   |
 index.js |      100 |      100 |      100 |      100 |                   |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests:       16 passed, 16 total
Snapshots:   0 total
Time:        8.381s
Ran all test suites.

Now make lint:

Got like 360 errors related to line breaks :smile: For this I typed make lint-fix as stated above by devs and it fixed it :smiley:

Now, I have no idea what should I do, I typed node src/index.js and nothing happens. Probably should find something similar like as http://fritzing.github.io/fritzing-parts/fzp/ somewhere? Help!


#17

You are a better man than I! Indeed those steps fixed it for me as well., well done. I’m also not sure what it should do at this point, as @sublimeartistry said earlier its possible this is only the api to access the parts repository and it won’t actually do anything (other than pass the tests) until the parts viewer repro is ready. Hopefully one of the developers may comment.

Edit: From the status 404 that we are both getting, I think there is a bad url to the repository and we aren’t getting the connection that we should (at least completely although it says all tests passed).

Peter


#18

There are a few new repos in the Fritzing Github account and one that looks to be the base for the application that uses the API. It looks to have the capability to render the views and do a few other things.