pybamm-team / pybamm-cookie

A copier template for battery modeling projects using PyBaMM
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Issues when trying the template #35

Closed brosaplanella closed 2 months ago

brosaplanella commented 3 months ago

I tried copying the template using copier (in WSL, Python 3.11) and I have spotted the following issues:

Might add more issues later if I find more (edit, previous issue went away when upgrading nox, we should require most recent version or later in the docs).

agriyakhetarpal commented 3 months ago

At least for validating the nox version, setting nox.needs_version = <required nox version here> in noxfile.py will emit a friendly error message if the version doesn't comply with the requirement.

santacodes commented 3 months ago

Maybe we could add the supported versions of the dependencies in pyproject.toml as these kinds of errors would be caught beforehand in the CI, especially with the build-backend as well. As for the GitHub thing, maybe we could also configure the upstream URL with git? That would then just take one git push command to push it to the Github repo given they already have a github repo created, or we might as well just mention them in the docs on how to set it up.

brosaplanella commented 3 months ago

BTW, @FW-coding tried the template and did not encounter the name issue. Could it be that it was because his full name is two words while mine is three words, and that caused the code to crash?

santacodes commented 3 months ago

I tried to reproduce this error on my local machine and it does give me an error when I use your full name, it seems the problem was with the copier subtask, more precisely a bug. I fixed it now by wrapping the {{full_name}} in quotations in the _tasks key. I will quickly make a PR now, thank you for the report Ferran!

santacodes commented 3 months ago

I am putting these issues faced by @brosaplanella at mmsg-warwick/electrode-coating/pull/4 here to keep track of them and resolve them.

39

santacodes commented 3 months ago

I think these documentation issues arise because we are not performing any doctests for the generated projects. Should add that as well in the above list.

santacodes commented 2 months ago

@brosaplanella do we close this issue or we keep this as a tracker for future bugs?

brosaplanella commented 2 months ago

If all the issues here are addressed I would close it and we can report new bugs as separate issues.

santacodes commented 2 months ago

If all the issues here are addressed I would close it and we can report new bugs as separate issues.

Now that we have completely removed the git config procedures from the template I guess this issue is irrelevant, other than that the problems of doctests inside the generated project were resolved 3 weeks ago so I think we should be good to close this issue.

santacodes commented 2 months ago
  • The README does not mention that the user needs to manually create and push to the Github repo. Pretty obvious, but given that we ask people the name of the repo when generating the project it is a bit misleading.

Do we mention this in README? maybe just add a link to the documentation on how to push a local repo to GitHub?

brosaplanella commented 2 months ago

Yes, sounds good.