Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Oskar Taubert committed Oct 23, 2023
2 parents 37c9c97 + a4ce35e commit df07cc4
Show file tree
Hide file tree
Showing 26 changed files with 3,241 additions and 1,100 deletions.
1 change: 0 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
Expand Down
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.py[cod]
*.so
*.cfg
!.isort.cfg
!propulate/.isort.cfg
!setup.cfg
*.orig
*.log
Expand Down Expand Up @@ -49,11 +49,6 @@ MANIFEST
# Per-project virtualenvs
.venv*/

*.pkl

*.pickle
MNIST
*cpt.p
*cpt.p.bkp
scripts/*.png

voucher_propulate.txt
*.bkp
140 changes: 140 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Contributing to Propulate

Welcome to ``Propulate``! We're thrilled that you're interested in contributing to our open-source project.
By participating, you can help improve the project and make it even better.

## How to Contribute

1. **Fork the Repository**: Click the "Fork" button at the top right corner of this repository's page to create your own copy.

2. **Clone Your Fork**: Clone your forked repository to your local machine using Git:
```bash
git clone https://github.com/Helmholtz-AI-Energy/propulate.git
```

3. **Create a Branch**: Create a new branch for your contribution. Choose a descriptive name:
```bash
git checkout -b your-feature-name
```

4. **Make Changes**: Make your desired changes to the codebase. Please stick to the following guidelines:
* `Propulate` uses [*Black*](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html) code style and so should you if you would like to contribute.
* Please use type hints in all function definitions.
* Please use American English for all comments and docstrings in the code.
* `Propulate` uses Sphinx autoapi to automatically create API reference documentation from docstrings in the code.
Please use the [NumPy Docstring Standard](https://numpydoc.readthedocs.io/en/latest/format.html) for your docstrings:

```python
"""
Short Description
Long Description (if needed)
Parameters
----------
param1 : type
Description of param1.
param2 : type, optional
Description of param2. (if it's an optional argument)
Returns
-------
return_type
Description of the return value.
Other Parameters
----------------
param3 : type
Description of param3. (if there are additional parameters)
Raises
------
ExceptionType
Description of when and why this exception might be raised.
See Also
--------
other_function : Related function or module.
Examples
--------
>>> import numpy as np
>>> x = np.array([1, 2, 3])
>>> y = np.square(x)
>>> print(y)
array([1, 4, 9])
Notes
-----
Additional notes, recommendations, or important information.
"""
```
When applicable, please make references to parent modules and classes using ```:class:`ParentClassName` ```
as follows:

```python
"""
This is the docstring for MyClass.
Parameters
----------
param1 : type
Description of param1.
Attributes
----------
attr1 : type
Description of attr1.
See Also
--------
:class:`ParentClassName` : Reference to the parent class.
"""

class ParentClassName:
"""
The docstring for the parent class.
"""

class MyClass(ParentClassName):
"""
The docstring for MyClass.
Parameters
----------
param2 : type
Description of param2.
Attributes
----------
attr2 : type
Description of attr2.
"""
```
In the example above, ``` :class:`ParentClassName` ``` is used to create a reference to the parent class `ParentClassName`.
Sphinx autoapi will automatically generate links to the parent class documentation.


5. **Commit Changes**: Commit your changes with a clear and concise commit message:
```bash
git commit -m "Add your commit message here"
```

6. **Push Changes**: Push your changes to your fork on GitHub:
```bash
git push origin your-feature-name
```

7. **Open a Pull Request**: Go to the [original repository](https://github.com/Helmholtz-AI-Energy/propulate.git) and click the "New Pull Request" button. Follow the guidelines in the template to submit your pull request.

## Code of Conduct

Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md), and we expect all contributors to follow it. Be kind and respectful to one another.

## Questions or Issues

If you have questions or encounter any issues, please create an issue in the [Issues](https://github.com/Helmholtz-AI-Energy/propulate/issues) section of this repository.

Thank you for your contribution!
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ OpenMPI.






8 changes: 8 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Releasing a new version of Propulate

The current workflow for releasing a new version of `Propulate` is as follows:
1. Make sure the master branch is up-to-date and contains the version of the software that it is to be released.
2. On the master branch, update the version number in `setup.cfg`. We use semantic versioning.
3. Rebase release branch onto current master branch.
4. Make Github release from current master, including corresponding version tag.
5. Push release branch. This will trigger a Github action publishing the new release on PyPI.
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]




# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
Expand All @@ -65,7 +63,7 @@
html_theme_options = {
"logo_only": True,
"style_nav_header_background": "#e5eaec",
"style_external_links": True
"style_external_links": True,
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx-autoapi==2.1.0
sphinx-autoapi==3.0.0
sphinx-rtd-theme==1.2.0
sphinxcontrib-napoleon
sphinxemoji
Loading

0 comments on commit df07cc4

Please sign in to comment.