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

Setup project tools and CI #2

Merged
merged 1 commit into from Oct 5, 2021
Merged

Setup project tools and CI #2

merged 1 commit into from Oct 5, 2021

Conversation

isra17
Copy link
Contributor

@isra17 isra17 commented Oct 5, 2021

@aviau for review.

Add tools, nox and CI.

@isra17 isra17 force-pushed the setup-project branch 2 times, most recently from e0161d5 to 225547a Compare October 5, 2021 19:05
@aviau
Copy link
Member

aviau commented Oct 5, 2021

How do I use it?

Can it be documented in the README? Can we add a Makefile with simple targets? make test, make format and make lint ?

@aviau
Copy link
Member

aviau commented Oct 5, 2021

Something like this?

venv:
	python3 -m venv venv
	venv/bin/pip install poetry==1.1.11 nox==2021.10.1 || (rm -rf venv && exit 1)

.PHONY: lint
lint: venv
	venv/bin/nox --session lint

.PHONY: test
test: venv
	venv/bin/nox --session tests

.PHONY: clean
clean:
	rm -rf venv
	rm -rf .nox

test does not work, it says pytest is needed, but I don't see where its installed in the github workflows.

@isra17
Copy link
Contributor Author

isra17 commented Oct 5, 2021

nox effectively replace your Makefile. I can document how to do most thing.

@aviau
Copy link
Member

aviau commented Oct 5, 2021

nox effectively replace your Makefile.

Not if it requires me to have a specific version of nox and a specific version of poetry installed globally.

What happens if I have two projects that require different versions of nox or of poetry?

@aviau
Copy link
Member

aviau commented Oct 5, 2021

lgtm if you fix mypy not having the required dependencies and you set the nox.options.reuse_existing_virtualenvs = True option.

@isra17
Copy link
Contributor Author

isra17 commented Oct 5, 2021

nox_poetry is not so useful since it build a wheel package everytime and install it, adding making most task take a few more extra seconds. I ended up running poetry install in nox and it works on my machine. It's annoying because it install every single dev dependancies for all task, but the next poetry release has dependancies groups which will solve the issue.

@isra17 isra17 merged commit 680fd25 into main Oct 5, 2021
@isra17 isra17 deleted the setup-project branch October 5, 2021 22:44
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