-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added CONTRIBUTING.md and modified README.md #17
Conversation
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! Will try to install today :)
Initialising the cookiecutter worked well, but can't install using pip (see error below) nor nox because the dev session is not defined. Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/brosaplanella/chocomaths
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Installing backend dependencies ... done
Preparing editable metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
Traceback (most recent call last):
File "/home/brosaplanella/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/brosaplanella/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brosaplanella/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 176, in prepare_metadata_for_build_editable
whl_basename = build_hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/build.py", line 83, in build_editable
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/builders/plugin/interface.py", line 90, in build
self.metadata.validate_fields()
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 265, in validate_fields
_ = self.version
^^^^^^^^^^^^
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 149, in version
self._version = self._get_version()
^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 248, in _get_version
version = self.hatch.version.cached
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-nrjma6ib/overlay/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 1466, in cached
raise type(e)(message) from None
LookupError: Error getting the version from source `vcs`: setuptools-scm was unable to detect version for /home/brosaplanella/chocomaths.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details. UPDATE: Actually, the issue was the I didn't initialise git, that's why it broke. We should add a line telling people to initialise git before installing. |
I added it, but I think part of that problem also has to do with the absence of |
I cloned the repo and initialised it locally (only pushed to Github later) so had to initalise git manually. I suspect if you initialise directly on Github then you just clone the remote repo locally which already creates a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good to me for the initial go. We will iterate on this in further passes before we push the code to PyPI, and I see no reason to be too pedantic :) Thanks, @santacodes!
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @santacodes, i think this should be good to merge now. Knowing that we'd be coming back to this in other PR's as well as things are progressing.
I used the PyBaMM's CONTRIBUTING.md file as a template for this project as well. It was modified and omitted for it to be in accordance with this project.
README.md
file had to be written mostly on its own.@brosaplanella sorry for the delay but I hope it helps with the setup process for your workshop :). The parameter sets have to be included within the template in order for them to get copied to the user-generated cookiecutter project, if you want to use the parameter sets feature I suggest you do an editable install to the
pybamm-cookiecutter
project under a virtual environment, the instructions are inREADME.md
.