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

more content #5

Merged
merged 28 commits into from
Dec 21, 2018
Merged

more content #5

merged 28 commits into from
Dec 21, 2018

Conversation

fragmuffin
Copy link
Member

@zignig

I've started this off with a docker container to do a build.
I've found this to be an extremely convenient way to standardise

  • running locally
  • continuous integration
  • deployment (which would be particularly neat for this project to publish to https://cqparts.github.io )

Once that's sorted, I'll merge over the content I was hard-coding from a clone of the cqparts.github.io repo.

@fragmuffin
Copy link
Member Author

writing a "HOWTO" in the root README.md ...

@fragmuffin
Copy link
Member Author

OK, so I think this is where I might need your help.
With the container as it is, I run it on a blank sqlite database: data.db, and I get the error:

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/e3q8)

(full log)

Can the script handle a completely blank database? or does it need some tables to exist first?

@fragmuffin
Copy link
Member Author

oh!, forgot to mention.
When pulling local libs into the env/python-libs folder, it currently requires the branches in pull requests:

@fragmuffin
Copy link
Member Author

OK! now we're getting somewhere... I changed the sqlite database to :memory:.
(I'm sure I could fix whatever I did wrong before to make it persistent, but this is a start)

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: things [SQL: 'SELECT things.jsondata \nFROM things \nWHERE things.classname IS NULL AND things.prefix = ?'] [parameters: ('cache',)] (Background on this error at: http://sqlalche.me/e/e3q8)

So it looks like the sqlite database requires (at least) a things table.
Do you have a *.sql file or something to populate an empty database?

@zignig
Copy link
Member

zignig commented Dec 9, 2018

So it looks like the sqlite database requires (at least) a things table.
Do you have a *.sql file or something to populate an empty database?

The sqlachemy should take care of this when if first creates the database.

Nice work here , a docker would be helpful . I am away for another week , but I should have some evening time across the Festivus break to buckle this down.

I have some serious changes to the way the primary datastructure is built.

@fragmuffin
Copy link
Member Author

Cool, I'll have a look into sqlachemy early this week.
I'm having fun with this.

@fragmuffin
Copy link
Member Author

@zignig ok, the issue earlier was database persistence.
using the :memory: workaround was creating a new blank database each thread, although that doesn't completely make sense...

looks like I was missing a forward-slash in my original database uri; it's working with 4 forward-slashes sqlite:////code/data.db, which is a bit weird, 2 for <protocol>://, +1 to start at the root of the file-system, don't know why the 4th is needed.
Meh! not complaining, it's working 👍

Examples not rendering
The examples.html isn't rendered (no HTML is generated). And no error occurs either.
If I remove the for loop, it works, so it's the original content (before this PR) that's not working in the contianer.
I'll look into that next, but I should mostly focus on the aesthetics of the additions I'm making (they're a bit ugly at the moment)

it is to do with the static vs server , the examples need a show
I have added a redirect, and done some minimal testing
@fragmuffin
Copy link
Member Author

@zignig I still can't see the examples, but it's not important for now.
If you can build the docker container, delete the database, and see examples when I can't, then something weird is going on... but I suspect your database is pre-populated where mine is not.

Scope: This PR is to add content to the landing page, I'm mostly just playing with CSS and div tags.

I was looking into file watch services today (which is now yesterday 🙄), and stumbled upon facebook/watchman.
It looks neat, but then this happened: facebook/watchman#660

Out of curiosity, I saw you were using CompileDaemon to do a similar task.
Rookie question: how did you install it? that small detail seems to be missing from the repo

@zignig
Copy link
Member

zignig commented Dec 15, 2018

I develop in golang as well. you need a working go install

https://github.com/githubnemo/CompileDaemon

go install github.com/githubnemo/CompileDaemon/...

will make a binary in $GOPATH/bin/CompileDaemon , copy it into /usr/local/bin/

@fragmuffin
Copy link
Member Author

I figured it was some go magic.
I'm still intrigued by watchman, it looks super configurable.

@zignig
Copy link
Member

zignig commented Dec 18, 2018

templated some of the pages, will look at doing the equivilent on the dump , should give us more style control over the cqparts website.

@zignig zignig merged commit 058eb27 into master Dec 21, 2018
@fragmuffin
Copy link
Member Author

fragmuffin commented Dec 21, 2018

Oh! It's merged, I was going to look more into this this weekend...
There's still plenty left undone.
I'll just continue with the same branch

@zignig
Copy link
Member

zignig commented Dec 22, 2018

All good, keep working here. I wanted to merge because there is some other work I want to do from master.

@zignig
Copy link
Member

zignig commented Dec 23, 2018

one thing to note is that /templates/base.html and /templates/dump/base.html are used for sub pages in each folder.

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

Successfully merging this pull request may close these issues.

None yet

2 participants