Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit 023d875

Browse files
author
staticdev
committed
Improved CI
1 parent f1cdd83 commit 023d875

File tree

9 files changed

+145
-90
lines changed

9 files changed

+145
-90
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Release Drafter
3+
4+
"on":
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
draft_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: release-drafter/release-drafter@v5.15.0
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml renamed to .github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
name: CI
2+
name: Tests
3+
34
"on":
45
pull_request:
56
push:

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# Based on ansible-lint config
23
extends: default
34

45
rules:

LICENSE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22
===========
33

4-
Copyright © 2021 Thiago Carvalho D'Ávila
4+
Copyright © 2021 staticdev
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

README.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Ansible role: Python developer
2+
==============================
3+
4+
|Status| |Tests|
5+
6+
.. |Status| image:: https://badgen.net/badge/status/beta/orange
7+
:target: https://badgen.net/badge/status/beta/orange
8+
:alt: Project Status
9+
.. |Tests| image:: https://github.com/staticdev/ansible-role-python-developer/workflows/Tests/badge.svg
10+
:target: https://github.com/staticdev/ansible-role-python-developer/actions?workflow=Tests
11+
:alt: Tests
12+
13+
Ansible role to install packages for developing in Python using `Cookiecutter Hypermodern Python`_.
14+
15+
16+
Features
17+
--------
18+
19+
Installs:
20+
21+
- pre-commit
22+
- pipx
23+
- nox
24+
- pyenv
25+
- poetry
26+
- cookiecutter
27+
28+
29+
Requirements
30+
------------
31+
32+
None.
33+
34+
35+
Role Variables
36+
--------------
37+
38+
Here is the list of all variables and their default values:
39+
40+
- `install_pycharm`: `false`
41+
- `pycharm_flavor`: `community`. You can use also `professional` or `edu`
42+
- `pycharm_version`: `2021.1.2`
43+
- `install_vscode`: `false`
44+
- `vscode_extensions`: optional list of name_ids of extensions. eg.: ms-python.python (Python Official Extension)
45+
- `pyenv_global`: optional Python global version for pyenv (from `staticdev.pyenv`_)
46+
- `pyenv_python_versions`: optional list of Python versions installed (from `staticdev.pyenv`_)
47+
48+
49+
Dependencies
50+
------------
51+
52+
- `staticdev.pyenv`_
53+
- `gantsign.visual-studio-code`_ (optional)
54+
55+
56+
Example Playbook
57+
----------------
58+
59+
.. code:: yaml
60+
61+
# role without IDE
62+
- hosts: all
63+
roles:
64+
- role: staticdev.python-developer
65+
66+
# role with pycharm
67+
- hosts: all
68+
roles:
69+
- role: staticdev.python-developer
70+
vars:
71+
install_pycharm: true
72+
pycharm_flavor: edu
73+
74+
# role with vscode and extensions
75+
- hosts: all
76+
roles:
77+
- role: staticdev.python-developer
78+
vars:
79+
install_vscode: true
80+
vscode_extensions:
81+
- ms-python.python
82+
- ms-python.vscode-pylance
83+
- shan.code-settings-sync
84+
85+
# role with pyenv attributes
86+
- hosts: all
87+
roles:
88+
- role: staticdev.python-developer
89+
vars:
90+
pyenv_global: "3.9.6"
91+
vscode_extensions:
92+
- "3.9.6"
93+
- "3.8.11"
94+
95+
96+
License
97+
-------
98+
99+
MIT
100+
101+
102+
Author Information
103+
------------------
104+
105+
`staticdev`_
106+
107+
.. _Cookiecutter Hypermodern Python: https://github.com/cjolowicz/cookiecutter-hypermodern-python
108+
.. _gantsign.visual-studio-code: https://galaxy.ansible.com/gantsign/visual-studio-code
109+
.. _staticdev: https://github.com/staticdev
110+
.. _staticdev.pyenv: https://galaxy.ansible.com/staticdev/pyenv

__version__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

meta/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
galaxy_info:
33
author: staticdev
44
role_name: python_developer
5-
description: This install packages for developing in Python on multiple versions using Cookiecutter Hypermodern Python.
5+
description: This installs packages for developing in Python on multiple versions using Cookiecutter Hypermodern Python.
66

7-
license:
8-
- MIT
7+
license: MIT
98

109
min_ansible_version: 2.11
1110

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[tool.poetry]
2+
name = "ansible-role-python-developer"
3+
version = "0.4.4"
4+
description = "Ansible role to install Python developer tools."
5+
authors = ["staticdev <staticdev-support@protonmail.com>"]
6+
license = "MIT"
7+
readme = "README.rst"
8+
9+
[tool.poetry.dependencies]
10+
11+
[tool.poetry.dev-dependencies]
12+
13+
[build-system]
14+
requires = ["poetry-core>=1.0.0"]
15+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)