Skip to content

Commit

Permalink
Switch to Flit for package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
roo-oliv committed Jul 12, 2024
1 parent ba1fe5a commit 32b7ddc
Show file tree
Hide file tree
Showing 52 changed files with 319 additions and 290 deletions.
14 changes: 0 additions & 14 deletions .bumpversion.cfg

This file was deleted.

14 changes: 0 additions & 14 deletions .coveragerc

This file was deleted.

49 changes: 41 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,53 @@
name: release
name: Upload Python Package

on:
release:
types: published
types: [published]

permissions:
contents: read

jobs:
release-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build release distributions
run: |
python -m pip install build
python -m build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest

needs:
- release-build

permissions:
id-token: write

environment:
name: pypi
url: https://pypi.org/p/injectable
permissions:
id-token: write

steps:
- id: checkout_action
uses: actions/checkout@master
- name: Publish package distributions to PyPI
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0
3 changes: 0 additions & 3 deletions .sonarcloud.properties

This file was deleted.

13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ environment: ## create environment

.PHONY: requirements
requirements: ## install all requirements
pip install -Ur requirements.txt -Ur requirements.dev.txt
pip install ".[docs,test,build]"

.PHONY: flake-check
flake-check: ## check PEP-8 and other standards with flake8
Expand Down Expand Up @@ -37,25 +37,25 @@ black: ## apply the Black code style to code

.PHONY: tests
tests: ## run tests with pytest
python setup.py develop
pip install -e .[test]
python -m pytest --cov=injectable --cov-report term --cov-report html:htmlcov \
--cov-report xml:coverage.xml tests

.PHONY: unit-tests
unit-tests: ## run unit tests with pytest
python setup.py develop
pip install -e .[test]
python -m pytest --cov=injectable --cov-report term --cov-report \
html:tests/unit/htmlcov --cov-report xml:tests/unit/coverage.xml tests/unit

.PHONY: fixes-tests
fixes-tests: ## run fixes tests with pytest
python setup.py develop
pip install -e .[test]
python -m pytest --cov=injectable --cov-report term --cov-report \
html:tests/fixes/htmlcov --cov-report xml:tests/fixes/coverage.xml tests/fixes

.PHONY: examples-tests
examples-tests: ## run examples tests with pytest
python setup.py develop
pip install -e .[test]
python -m pytest --cov=injectable --cov-report term --cov-report \
html:tests/examples/htmlcov --cov-report xml:tests/examples/coverage.xml \
tests/examples
Expand All @@ -65,7 +65,8 @@ checks: black-check flake-check ## perform code standards and style checks

.PHONY: package
package:
python setup.py sdist
pip install -e .[build]
flit build

.PHONY: docs
docs:
Expand Down
2 changes: 1 addition & 1 deletion docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 09, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 09, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/_modules/injectable/autowiring/autowired_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 09, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
Expand Down
30 changes: 15 additions & 15 deletions docs/_modules/injectable/container/injection_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>injectable.container.injection_container &#8212; injectable 3.4.7 documentation</title>
<title>injectable.container.injection_container &#8212; injectable 4.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/pydoctheme.css" />

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>

<script src="../../../_static/sidebar.js"></script>

<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="shortcut icon" type="image/png" href="../../../_static/favicon.png" />
<meta name="viewport" content="width=device-width,initial-scale=0.8">



</head><body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="responsive-menu"><a href="#sidebar-anchor" title="Navigation">&#9776;</a></li>
<li><a href="../../../index.html">injectable-3.4.7</a> &#187;</li>
<li><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li><a href="../../../index.html">injectable-4.0.0</a> &#187;</li>
<li><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>

<div class="badge">
<a href="https://github.com/roo-oliv/injectable/">Fork me on GitHub</a>
<img src="../../../_static/right-red@2x.png">
</div>



<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">

<h1>Source code for injectable.container.injection_container</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">warnings</span>
Expand Down Expand Up @@ -254,7 +254,7 @@ <h1>Source code for injectable.container.injection_container</h1><div class="hig
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<a id="sidebar-anchor"></a>


<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
Expand Down Expand Up @@ -295,8 +295,8 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 04, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
</html>
</html>
30 changes: 15 additions & 15 deletions docs/_modules/injectable/container/load_injection_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>injectable.container.load_injection_container &#8212; injectable 3.4.7 documentation</title>
<title>injectable.container.load_injection_container &#8212; injectable 4.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/pydoctheme.css" />

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>

<script src="../../../_static/sidebar.js"></script>

<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="shortcut icon" type="image/png" href="../../../_static/favicon.png" />
<meta name="viewport" content="width=device-width,initial-scale=0.8">



</head><body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="responsive-menu"><a href="#sidebar-anchor" title="Navigation">&#9776;</a></li>
<li><a href="../../../index.html">injectable-3.4.7</a> &#187;</li>
<li><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li><a href="../../../index.html">injectable-4.0.0</a> &#187;</li>
<li><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>

<div class="badge">
<a href="https://github.com/roo-oliv/injectable/">Fork me on GitHub</a>
<img src="../../../_static/right-red@2x.png">
</div>



<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">

<h1>Source code for injectable.container.load_injection_container</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>

Expand Down Expand Up @@ -102,7 +102,7 @@ <h1>Source code for injectable.container.load_injection_container</h1><div class
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<a id="sidebar-anchor"></a>


<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
Expand Down Expand Up @@ -143,8 +143,8 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 04, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion docs/_modules/injectable/errors/injection_error.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 09, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/_modules/injectable/injection/inject.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h3>Navigation</h3>

<div class="footer" role="contentinfo">
&#169; Copyright 2018, Rodrigo Martins de Oliveira.
Last updated on Jul 09, 2024.
Last updated on Jul 12, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
Expand Down
Loading

0 comments on commit 32b7ddc

Please sign in to comment.