Skip to content

Commit

Permalink
ci: Setup pipelines and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
qcoumes committed Oct 6, 2024
1 parent b112054 commit 0d1781e
Show file tree
Hide file tree
Showing 17 changed files with 539 additions and 332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Tests
on:
push:
branches:
- master
- main
- '*.*.*'

pull_request:
branches:
- master
- main
- '*.*.*'

release:
Expand Down
175 changes: 163 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,168 @@
worktrees
# Environments
venv
.envvars
*.env
env/
venv/
# Visual Studio
.vscode

# JetBrains IDEs
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Editor directories and files
# Visual Studio
.vscode
# JetBrains IDEs
.idea
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

# 2.0.0 (2024-10-07)

* Initial release
104 changes: 104 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

## Types of Contributions

### Report Bugs

Report bugs at https://github.com/Codoc-os/france-connect-py/issues.

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

### Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug"
is open to whoever wants to implement it.

### Implement Features

Look through the GitHub issues for features. Anything tagged with "feature"
is open to whoever wants to implement it.

### Write Documentation

`france-connect-py` could always use more documentation, whether as part of its official docs,
in docstrings, or even on the web in blog posts, articles, and such.

### Submit Feedback

The best way to send feedback is to file an issue at https://github.com/Codoc-os/france-connect-py/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions are welcome :)

---

## Setting up local environment

Ready to contribute? Here's how to set up `france-connect-py` for local development.

1. Fork the `france-connect-py` repo on GitHub.

2. Clone your fork locally:https://github.com/Codoc-os/france-connect-py/issues.

* `git clone [email protected]:<your_name_here>/france-connect-py.git`

3. Install your local copy into a virtualenv.

```bash
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install -r requirements_dev.txt
```

4. Create a branch for local development:

* `git checkout -b name-of-your-bugfix-or-feature`

Now you can make your changes locally.

## Testing your changes

Tests are done using `pytest` and must be written inside the `tests/` directory.

---

### Submitting your changes

1. Ensure your code is correctly formatted and documented:

```sh
./bin/pre_commit.sh
```

2. Commit your changes (you're encouraged to follow the using [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/)) and push your branch to GitHub:

```sh
git add .
git commit -m "<type>: Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
```

3. Submit a pull request through the GitHub website.

## Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests

2. If the pull request adds functionality, the documentation should be updated.

3. The pull request should work for all [currently supported python version](https://devguide.python.org/versions/).
4. Check https://github.com/qcoumes/france-connect-py/actions and make sure that the tests pass for all supported Python versions.
Loading

0 comments on commit 0d1781e

Please sign in to comment.