Repository navigation
docs: add developer.md and CONTRIBUTING.md #266
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
586f85a
docs: add developer.md
APN-Pucky 7979e8f
Update developer.md
APN-Pucky ca25919
Update
APN-Pucky e11a1e9
more contrib
APN-Pucky e9f5862
more docs
APN-Pucky 62d3b7c
Update CONTRIBUTING.md
APN-Pucky f553ef2
Update developer.md
APN-Pucky 169d731
Update developer.md
APN-Pucky a2f3cbc
Merge branch 'main' into developer_md
APN-Pucky 3e10d88
switch to prek
APN-Pucky 3fe897f
pre-commit is more reliable than prek so we stick to it...
APN-Pucky 788e383
Revert "pre-commit is more reliable than prek so we stick to it..."
APN-Pucky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| See the [Scikit-HEP Developer introduction][skhep-dev-intro] for a detailed description of best practices for developing Scikit-HEP packages. | ||
|
|
||
| [skhep-dev-intro]: https://scikit-hep.org/developer/intro | ||
|
|
||
| # Installing pylhe | ||
|
|
||
| First create a fork of the `pylhe` repository on GitHub, then clone your fork locally and change into the `pylhe` directory: | ||
|
|
||
| ```bash | ||
| # fork scikit-hep/pylhe | ||
| git clone https://github.com/<your_github_username>/pylhe.git | ||
| cd pylhe | ||
| ``` | ||
|
|
||
| # Setting up a development environment | ||
|
|
||
| You can set up a development environment by running: | ||
|
|
||
| ```bash | ||
| pipx install hatch | ||
| hatch env create dev | ||
| hatch shell dev | ||
| ``` | ||
|
|
||
| # Post setup activate of pre-commit | ||
|
|
||
| You should prepare pre-commit, which will help you by checking that commits pass required checks: | ||
|
|
||
| ```bash | ||
| pre-commit install # Will install a pre-commit hook into the git repo | ||
| ``` | ||
|
|
||
| You can also/alternatively run `pre-commit run` (changes only) or `pre-commit run --all-files` to check even without installing the hook. | ||
|
APN-Pucky marked this conversation as resolved.
Resolved
|
||
|
|
||
| # Testing | ||
|
|
||
| Use PyTest to run the unit checks: | ||
|
|
||
| ```bash | ||
| pytest | ||
| ``` | ||
|
|
||
| # Documentation | ||
|
|
||
| In order to produce the documentation webpage locally, you can run the following commands: | ||
|
|
||
| ```bash | ||
| cd docs | ||
| hatch run docs:make html | ||
| ``` | ||
|
|
||
| Now find the generated documentation in `docs/build/html/index.html`. | ||
| You can also run `hatch run docs:make clean` to remove the generated files. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Release a new version of the software | ||
|
|
||
| ## PyPI | ||
|
|
||
| For a step-by-step video guide check out the [release video](https://www.youtube.com/watch?v=tsAWDumpcW8) | ||
|
|
||
| 1. Check that the publishing action creating the wheels and source distribution appear correctly. | ||
| 2. Go to Actions tab and workflow "Bump version". | ||
| 3. Run the workflow manually by clicking the "Run workflow" button and adjusting the parameters. | ||
| - Set version bump level (i.e. "patch") | ||
| - Set new version "X.Y.Z" w/o "v" prefix | ||
| - Disable dry run, after you are confident that the workflow is working correctly (i.e. running dry run once). | ||
| 4. Optionally, check the publishing action again for the new version. | ||
| 5. Manually, run the publishing action by clicking the "Run workflow" button in order to publish to Test-PyPI. | ||
| 6. Optionally, inspect the URL returned after Test-PyPI uploading to check the package. | ||
| Check that sdist and wheel are available for the new version. | ||
| 7. Go to the Releases page. | ||
| Select "Draft a new release". | ||
| 8. Pick the tag created by the "Bump version" workflow (here with a "v" prefix) and click "Generate release notes". | ||
| Tick "Set as the latest release" if this is the latest release and "Create a discussion" in the Category "Announcements". | ||
| 9. Click "Publish release". | ||
| 10. A build and publish to (Test)-PyPI workflow will be triggered automatically it should again upload sdist and wheel to PyPI. | ||
|
|
||
| ## Conda | ||
|
|
||
| 1. Wait a few hours for automatic PR https://github.com/conda-forge/pylhe-feedstock following the PyPI release. | ||
| 2. Review that there are no dependency changes and merge the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.