Skip to content

Commit

Permalink
Merge pull request #7 from BARL-SSL/dev
Browse files Browse the repository at this point in the history
0.0.1
  • Loading branch information
danibene authored Dec 23, 2024
2 parents f93c9b6 + 2842e82 commit b7bd277
Show file tree
Hide file tree
Showing 9 changed files with 332 additions and 201 deletions.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This is a template for making a pull-request. You can remove the text and sections and write your own thing if you wish, just make sure you give enough information about how and why. If you have any issues or difficulties, don't hesitate to open an issue.


# Description

The aim is to add this feature ...

# Proposed Changes

I changed the `foo()` function so that ...


# Checklist

Here are some things to check before creating the pull request. If you encounter any issues, don't hesitate to ask for help :)

- [ ] I have read the [contributor's guide](https://github.com/arnab39/reptrix/blob/main/CONTRIBUTING.md).
- [ ] The base branch of my pull request is the `dev` branch, not the `main` branch.
- [ ] I ran the [code checks](https://github.com/arnab39/reptrix/blob/main/CONTRIBUTING.md#implement-your-changes) on the files I added or modified and fixed the errors.
- [ ] I updated the [changelog](https://github.com/arnab39/reptrix/blob/main/CHANGELOG.md).
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ jobs:
test:
needs: prepare
strategy:
fail-fast: false
matrix:
python:
- "3.7" # oldest Python supported by PSF
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
- macos-latest
- windows-latest
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
Expand All @@ -92,7 +88,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: {python-version: "3.11"}
with: {python-version: "3.10"}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand Down Expand Up @@ -41,7 +41,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.4.0
hooks:
- id: black
language_version: python3
Expand All @@ -67,7 +67,7 @@ repos:
# - id: codespell

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
rev: 'v1.9.0'
hooks:
- id: mypy
args: [--disallow-untyped-defs, --ignore-missing-imports]
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Changelog

## Version 0.1 (development)
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Fixed

### Changed

### Removed

## [0.0.1] - 2024-12-23

### Added
- Initial release
140 changes: 40 additions & 100 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
```{todo} THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
The document assumes you are using a source repository service that promotes a
contribution model similar to [GitHub's fork and pull request workflow].
While this is true for the majority of services (like GitHub, GitLab,
BitBucket), it might not be the case for private repositories (e.g., when
using Gerrit).
Also notice that the code examples might refer to GitHub URLs or the text
might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
Request*).
Please make sure to check the document having these assumptions in mind
and update things accordingly.
```

```{todo} Provide the correct links/replacements at the bottom of the document.
```

```{todo} You might want to have a look on [PyScaffold's contributor's guide],
especially if your project is open source. The text should be very similar to
this template, but there are a few extra contents that you might decide to
also include, like mentioning labels of your issue tracker or automated
releases.
```

# Contributing

Welcome to `reptrix` contributor's guide.
Expand Down Expand Up @@ -68,28 +41,18 @@ by adding missing information and correcting mistakes.
This means that the docs are kept in the same repository as the project code, and
that any documentation update is done in the same way was a code contribution.

```{todo} Don't forget to mention which markup language you are using.
e.g., [reStructuredText] or [CommonMark] with [MyST] extensions.
```
Please notice that the [GitHub web interface] provides a quick way of
propose changes in `reptrix`'s files. While this mechanism can
be tricky for normal code contributions, it works perfectly fine for
contributing to the docs, and can be quite handy.

```{todo} If your project is hosted on GitHub, you can also mention the following tip:
:::{tip}
Please notice that the [GitHub web interface] provides a quick way of
propose changes in `reptrix`'s files. While this mechanism can
be tricky for normal code contributions, it works perfectly fine for
contributing to the docs, and can be quite handy.
If you are interested in trying this method out, please navigate to
the `docs` folder in the source [repository], find which file you
would like to propose changes and click in the little pencil icon at the
top, to open [GitHub's code editor]. Once you finish editing the file,
please write a message in the form at the bottom of the page describing
which changes have you made and what are the motivations behind them and
submit your proposal.
:::
```
If you are interested in trying this method out, please navigate to
the `docs` folder in the source [repository], find which file you
would like to propose changes and click in the little pencil icon at the
top, to open [GitHub's code editor]. Once you finish editing the file,
please write a message in the form at the bottom of the page describing
which changes have you made and what are the motivations behind them and
submit your proposal.

When working on documentation changes in your local machine, you can
compile them using [tox] :
Expand All @@ -107,13 +70,6 @@ python3 -m http.server --directory 'docs/_build/html'

## Code Contributions

```{todo} Please include a reference or explanation about the internals of the project.
An architecture description, design principles or at least a summary of the
main concepts will make it easy for potential contributors to get started
quickly.
```

### Submit an issue

Before you work on any non-trivial code contribution it's best to first create
Expand Down Expand Up @@ -160,9 +116,6 @@ conda activate reptrix

to be able to import the package under development in the Python REPL.

```{todo} if you are not using pre-commit, please remove the following item:
```

5. Install [pre-commit]:

```
Expand All @@ -183,12 +136,10 @@ conda activate reptrix

and start making changes. Never work on the main branch!

2. Start your work on this branch. Don't forget to add [docstrings] to new
functions, modules and classes, especially if they are part of public APIs.

3. Add yourself to the list of contributors in `AUTHORS.rst`.
2. Start your work on this branch. Don't forget to add [docstrings] to the new
functions, modules and classes, especially if they are part of [equiadapt].

4. When you’re done editing, do:
3. When you’re done editing, do:

```
git add <MODIFIED FILES>
Expand All @@ -197,38 +148,41 @@ conda activate reptrix

to record your changes in [git].

```{todo} if you are not using pre-commit, please remove the following item:
```

Please make sure to see the validation messages from [pre-commit] and fix
any eventual issues.
This should automatically use [flake8]/[black] to check/fix the code style
in a way that is compatible with the project.

:::{important}
Don't forget to add unit tests and documentation in case your
> **Note**:
Please add unit tests and documentation in case your
contribution adds an additional feature and is not just a bugfix.

Moreover, writing a [descriptive commit message] is highly recommended.
In case of doubt, you can check the commit history with:
`git log --graph --decorate --pretty=oneline --abbrev-commit --all`
to look for recurring communication patterns.

```
git log --graph --decorate --pretty=oneline --abbrev-commit --all
```
#### Run code checks

to look for recurring communication patterns.
:::
Please make sure to see the validation messages from pre-commit and fix any
eventual issues. This should automatically use [flake8]/[black] to check/fix
the code style in a way that is compatible with the project.

5. Please check that your changes don't break any unit tests with:
To run pre-commit manually, you can use:

```
tox
```
```
pre-commit run --all-files
```

Please also check that your changes don't break any unit tests with:

(after having installed [tox] with `pip install tox` or `pipx`).
```
tox
```

You can also use [tox] to run several other pre-configured tasks in the
repository. Try `tox -av` to see a list of the available checks.
(after having installed [tox] with `pip install tox` or `pipx`).

You can also use [tox] to run several other pre-configured tasks in the
repository. Try `tox -av` to see a list of the available checks.

### Submit your contribution

Expand All @@ -241,13 +195,10 @@ conda activate reptrix
2. Go to the web page of your fork and click "Create pull request"
to send your changes for review.

```{todo} if you are using GitHub, you can uncomment the following paragraph
Find more detailed information in [creating a PR]. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.
Find more detailed information in [creating a PR]. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.

```

### Troubleshooting

Expand Down Expand Up @@ -278,7 +229,7 @@ package:
```

3. Make sure to have a reliable [tox] installation that uses the correct
Python version (e.g., 3.7+). When in doubt you can run:
Python version (e.g., 3.8+). When in doubt you can run:

```
tox --version
Expand Down Expand Up @@ -306,12 +257,6 @@ package:

### Releases

```{todo} This section assumes you are using PyPI to publicly release your package.
If instead you are using a different/private package index, please update
the instructions accordingly.
```

If you are part of the group of maintainers and have correct user permissions
on [PyPI], the following steps can be used to release a new version for
`reptrix`:
Expand Down Expand Up @@ -361,11 +306,6 @@ on [PyPI], the following steps can be used to release a new version for
[sphinx]: https://www.sphinx-doc.org/en/master/
[tox]: https://tox.readthedocs.io/en/stable/
[virtual environment]: https://realpython.com/python-virtual-environments-a-primer/
[virtualenv]: https://virtualenv.pypa.io/en/stable/


```{todo} Please review and change the following definitions:
```

[virtualenv]: https://virtualenv.pypa.io/en/stable/s
[repository]: https://github.com/arnab39/reptrix
[issue tracker]: https://github.com/arnab39/reptrix/issues
Loading

0 comments on commit b7bd277

Please sign in to comment.