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

Cleanup + Add test in CI for cookiecutter related things #454

Merged
merged 1 commit into from
May 3, 2020

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Apr 26, 2020

  • Removed (and added to requirements.txt file) the un-needed things in tools/external
  • Added a CI test case for cookiecutter related things.

AndreMiras
AndreMiras previously approved these changes Apr 26, 2020
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels good!
So these tools/externals/ were definitely 100% replaceable by the actual pypi modules?
I would simply take a look at the git log of some of them to see if they were maintained to add features used in kivy-ios.
Also having someone else using kivy-ios to cross check before merging would be great

@AndreMiras
Copy link
Member

Yes xcassette was maintained, see for instance: f288af5 and f8916b9
So I would say let's not delete this one as it seems kivy-ios custom.
Also we should start unit testing it if we're about to maintain that

@tshirtman
Copy link
Member

maybe it could have been a PR against https://github.com/albert-zhang/gen_xcassets

@AndreMiras
Copy link
Member

I have really little clue about macOS so I can't tell. But the code base doesn't look the same so at least it wasn't heavily borrowed from there. I would say to keep it simple for now I would simply undelete the tools/external/xcassets.py file. And then definitely if there's a way to use existing maintained/tested thirdparty dependency I would say we should go for it via separate PR

@tshirtman
Copy link
Member

true, maybe it's not the correct one, i agree it's simpler to keep this one for now.

@AndreMiras
Copy link
Member

misl6 just gave me a heads up on Discord and didn't actually delete it 😅
So I'm good for a merge after another one can take a look

@Zen-CODE
Copy link
Member

On checking out the branch:

richard@Richards-MacBook-Pro kivy-ios % python3 toolchain.py build kivy python openssl                         
Traceback (most recent call last):
    File "toolchain.py", line 40, in <module>
    import sh
    ModuleNotFoundError: No module named 'sh'

@Zen-CODE
Copy link
Member

Zen-CODE commented Apr 26, 2020

So. I'm guessing we need to install those requirements. One issue I have with that is that I've been unable to run the toolchain successfully in a venv. I can only get a successful build using the python version installed via brew. So depending on libraries in the native python install is...a pity.

It would also mean we would need to change installation instructions.

@Zen-CODE
Copy link
Member

Even when creating a venv, I get this err. I think there was a reason that these external tools where included in the repo..

@AndreMiras
Copy link
Member

The sh requirement is defined already https://github.com/kivy/kivy-ios/pull/454/files#diff-b4ef698db8ca845e5845c4618278f29aR5
Until we fix the venv we can still install the requirements with the --user flag.
You're talking about this issue right? #401
I have some ideas to dig into and I'm confident I could fix, but I need to install macOS first

@Zen-CODE
Copy link
Member

Zen-CODE commented Apr 26, 2020

@AndreMiras I know it's added to requirements. Please see my comments above. But as I mentioned, the issues are:

  • it then needs to be installed into the system python (venv not working)
  • the installation instructions need to be updated to specify that.

To be honest, I'd rather live with the ugliness of external/tools that depending on requirements being installed to the systems python. I'd only be happy if a venv could be used....

@AndreMiras
Copy link
Member

OK let's keep this pending until we fix the venv then

@AndreMiras AndreMiras dismissed their stale review April 26, 2020 19:17

As agreed with Zen-Code let's fix the venv first

@AndreMiras
Copy link
Member

@misl6 could you rebase as #462 got merged?

@misl6 misl6 force-pushed the cleanup-and-cookiecutter branch 2 times, most recently from 200824a to 6b4e1a3 Compare May 3, 2020 07:08
@misl6 misl6 force-pushed the cleanup-and-cookiecutter branch from 6b4e1a3 to ae20a72 Compare May 3, 2020 09:01
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll play with it soon.
Ideally we should also remove the second pip install sh from the venv test since it's now part of of the requirements.txt file. It's rather minor and CI builds for ages so I guess it's OK we don't address now.
I will give it a try now see if I can build/run a project without having any of the deps in the system but only in the venv

@misl6 misl6 force-pushed the cleanup-and-cookiecutter branch from ae20a72 to b8f2fd0 Compare May 3, 2020 11:40
@AndreMiras
Copy link
Member

So far so good, here's what I've done to test it.
I've dropped all my pip dependencies installed outside the venv to test it:

deactivate
pip3 uninstall --yes $(pip3 freeze)

Then I've created a completely new venv to build recipes:

rm -rf venv/ && python3 -m venv venv 
. venv/bin/activate
pip install -r requirements.txt
pip install cython==0.28.1
python toolchain.py build python3 kivy

It built successfully. I'm now about to try on device and merge if it works OK

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App ran fine on device simulator nice work!
Thanks for addressing the comments and squashing the commits 🍻

@AndreMiras AndreMiras merged commit 9b6559c into kivy:master May 3, 2020
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.

4 participants