csdms / babelizer

Transform BMI-wrapped models into Python packages
https://babelizer.readthedocs.io
MIT License
4 stars 3 forks source link

Add noxfile and remove lint #83

Closed mcflugen closed 1 year ago

mcflugen commented 1 year ago

I've added a nox file for running routine maintenance tasks like building the docs, running the tests, building the examples, checking for lint, etc. I've also changed to using pre-commit to run the linters and check for much more lint than before (I've removed all of the newly found lint). The ci tests have been simplified to use nox.

Other things included in this pull request,

mcflugen commented 1 year ago

@mdpiper When you have a chance would you please have a look at this pull request. Thanks!

In case you're interested, the docs are building on rtfd.

mdpiper commented 1 year ago

A minor issue I can work around, but I want to mention it just in case I'm missing something.

In building the C example:

$ nox -s "build-examples(lang='c')"

it doesn't like the mamba backend:

ValueError: Expected venv_backend one of ('virtualenv', 'conda', 'venv'), but got 'mamba'.

I can edit the noxfile to use conda instead.

mcflugen commented 1 year ago

@mdpiper That's weird. What version of nox to you have? I assume you have mamba installed?

You don't need to modify the noxfile to change the backend. The following should override the backend declared in the noxfile,

nox --force-venv-backend=conda -s "build-examples(lang='c')"