Skip to content

Commit

Permalink
💚 Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AthAshino committed Dec 25, 2023
1 parent e851cbc commit 58c4632
Show file tree
Hide file tree
Showing 157 changed files with 166 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ install:
- "pip install -r requirements.txt"
- "pip install -r test-requirements.txt"
# command to run tests
script: pytest --cov=listmonk_client
script: pytest --cov=listmonk
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Configuration:
Configure API client with HTTP basic authentication:
conf = listmonk_client.Configuration(
conf = listmonk.Configuration(
username='the-user',
password='the-password',
)
Expand Down Expand Up @@ -123,7 +123,7 @@ def __init__(self, host=None,
self.logger = {}
"""Logging Settings
"""
self.logger["package_logger"] = logging.getLogger("listmonk_client")
self.logger["package_logger"] = logging.getLogger("listmonk")
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
"""Log format
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ license = "AGPL-3.0 license"
readme = "README.md"
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
keywords = ["OpenAPI", "OpenAPI-Generator", "Listmonk"]
include = ["openapi_client/py.typed"]
include = ["listmonk/py.typed"]

[[tool.poetry.packages]]
include = "listmonk"
[tool.poetry.dependencies]
python = "^3.7"

Expand All @@ -34,4 +36,12 @@ version_variables = [ "listmonk_client/__init__.py:__version__",]
version_toml = [ "pyproject.toml:tool.poetry.version",]
branch = "main"
build_command = "pip install poetry && poetry build"
commit_parser = "emoji"
commit_parser = "emoji"

[tool.semantic_release.commit_parser_options]
major_tags = [ ":boom:", "💥",]
minor_tags = [ ":sparkles:", "",]
patch_tags = [ ":zap:", "⚡️", ":bug:", "🐛", ":ambulance:", "🚑️", ":lipstick:", "💄", ":lock:", "🔒️", ":arrow_down:", "⬇️", ":arrow_up:", "⬆️", ":pushpin:", "📌", ":chart_with_upwards_trend:", "📈", ":heavy_plus_sign:", "", ":heavy_minus_sign:", "", ":wrench:", "🔧", ":globe_with_meridians:", "🌐", ":pencil2:", "✏️", ":rewind:", "⏪️", ":package:", "📦️", ":alien:", "👽️", ":bento:", "🍱", ":wheelchair:", "♿️", ":speech_balloon:", "💬", ":card_file_box:", "🗃️", ":children_crossing:", "🚸", ":iphone:", "📱", ":egg:", "🥚", ":alembic:", "⚗️", ":mag:", "🔍️", ":label:", "🏷️", ":triangular_flag_on_post:", "🚩", ":goal_net:", "🥅", ":dizzy:", "💫", ":wastebasket:", "🗑️", ":passport_control:", "🛂", ":adhesive_bandage:", "🩹", ":necktie:", "👔",]

[tool.semantic_release.changelog]
template_dir = "templates"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
]

setup(
name="python-listmonk",
name="listmonk",
version="0.0.1",
description="Listmonk",
author="OpenAPI Generator community",
Expand All @@ -43,5 +43,5 @@
long_description="""\
The API collection for listmonk
""", # noqa: E501
package_data={"listmonk_client": ["py.typed"]},
package_data={"listmonk": ["py.typed"]},
)
43 changes: 43 additions & 0 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# CHANGELOG
{# RELEASED #}
{% for version, release in context.history.released.items() %}
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
{% for type_, commits in release["elements"] | dictsort %}
{% if type_ == "💥" or type_ == ":boom:" %}
### 💥 BREAKING CHANGES
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "✨" or type_ == ":feat:" %}
### ✨ Features
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "🔒️" or type_ == ":lock:" %}
### 🔒️ Security
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "💄" or type_ == "🚸" or type_ == "♿️" or type_ == "📱" or type_ == ":lipstick:" or type_ == ":children_crossing:" or type_ == ":wheelchair:" or type_ == ":iphone:" %}
### 💄 UI/UX
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "⚡️" or type_ == ":zap:" %}
### ⚡️ Performances
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "🐛" or type_ == ":bug:" or type_ == "🚑️" or type_ == ":ambulance:" or type_ == "🩹" or type_ == ":adhesive_bandage:" %}
### 🐛 Fixes
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% elif type_ == "⬆️" or type_ == "⬇️" or type_ == "📌" or type_ == "➕" or type_ == "➖" or type_ == ":arrow_up:" or type_ == ":arrow_down:" or type_ == ":pushpin:" or type_ == ":heavy_plus_sign:" or type_ == ":heavy_minus_sign:" %}
### ⬆️ Dependencies
{% for commit in commits %}
* {{ commit.commit.message.rstrip() }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
6 changes: 3 additions & 3 deletions test/test_bounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ def make_instance(self, include_optional) -> Bounce:
if include_optional:
return Bounce(
results = [
listmonk_client.models.bounce_results_inner.Bounce_results_inner(
listmonk.models.bounce_results_inner.Bounce_results_inner(
id = 56,
type = '',
source = '',
meta = listmonk_client.models.meta.meta(),
meta = listmonk.models.meta.meta(),
created_at = '',
email = '',
subscriber_uuid = '',
subscriber_id = 56,
campaign = listmonk_client.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
campaign = listmonk.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
id = 56,
name = '', ),
campaign_uuid = '',
Expand Down
4 changes: 2 additions & 2 deletions test/test_bounce_results_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def make_instance(self, include_optional) -> BounceResultsInner:
id = 56,
type = '',
source = '',
meta = listmonk_client.models.meta.meta(),
meta = listmonk.models.meta.meta(),
created_at = '',
email = '',
subscriber_uuid = '',
subscriber_id = 56,
campaign = listmonk_client.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
campaign = listmonk.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
id = 56,
name = '', ),
campaign_uuid = '',
Expand Down
2 changes: 1 addition & 1 deletion test/test_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> Campaign:
views = 56,
clicks = 56,
lists = [
listmonk_client.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
listmonk.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
id = 56,
name = '', )
],
Expand Down
2 changes: 1 addition & 1 deletion test/test_campaign_content_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> CampaignContentRequest:
views = 56,
clicks = 56,
lists = [
listmonk_client.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
listmonk.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
id = 56,
name = '', )
],
Expand Down
2 changes: 1 addition & 1 deletion test/test_campaign_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> CampaignRequest:
''
],
send_later = True,
send_at = listmonk_client.models.campaign_request_send_at.CampaignRequest_send_at(
send_at = listmonk.models.campaign_request_send_at.CampaignRequest_send_at(
headers = [
None
],
Expand Down
6 changes: 3 additions & 3 deletions test/test_create_campaign200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CreateCampaign200Response:
model = CreateCampaign200Response()
if include_optional:
return CreateCampaign200Response(
data = listmonk_client.models.campaign_update.CampaignUpdate(
data = listmonk.models.campaign_update.CampaignUpdate(
name = '',
subject = '',
lists = [
Expand All @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> CreateCampaign200Response:
''
],
send_later = True,
send_at = listmonk_client.models.send_at.send_at(),
send_at = listmonk.models.send_at.send_at(),
headers = [
None
],
Expand All @@ -59,7 +59,7 @@ def make_instance(self, include_optional) -> CreateCampaign200Response:
altbody = '',
archive = True,
archive_template_id = 56,
archive_meta = listmonk_client.models.archive_meta.archive_meta(), )
archive_meta = listmonk.models.archive_meta.archive_meta(), )
)
else:
return CreateCampaign200Response(
Expand Down
2 changes: 1 addition & 1 deletion test/test_create_list200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CreateList200Response:
model = CreateList200Response()
if include_optional:
return CreateList200Response(
data = listmonk_client.models.list.List(
data = listmonk.models.list.List(
id = 56,
created_at = '',
updated_at = '',
Expand Down
6 changes: 3 additions & 3 deletions test/test_create_subscriber200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ def make_instance(self, include_optional) -> CreateSubscriber200Response:
model = CreateSubscriber200Response()
if include_optional:
return CreateSubscriber200Response(
data = listmonk_client.models.subscriber.Subscriber(
data = listmonk.models.subscriber.Subscriber(
id = 56,
created_at = '',
updated_at = '',
uuid = '',
email = '',
name = '',
attribs = listmonk_client.models.subscriber_profile_attribs.SubscriberProfile_attribs(
attribs = listmonk.models.subscriber_profile_attribs.SubscriberProfile_attribs(
city = '',
good = True,
type = '', ),
status = '',
lists = [
listmonk_client.models.subscriber_lists_inner.Subscriber_lists_inner(
listmonk.models.subscriber_lists_inner.Subscriber_lists_inner(
subscription_status = '',
id = 56,
uuid = '',
Expand Down
4 changes: 2 additions & 2 deletions test/test_dashboard_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def make_instance(self, include_optional) -> DashboardChart:
if include_optional:
return DashboardChart(
link_clicks = [
listmonk_client.models.dashboard_chart_link_clicks_inner.DashboardChart_link_clicks_inner(
listmonk.models.dashboard_chart_link_clicks_inner.DashboardChart_link_clicks_inner(
count = 56,
date = '', )
],
campaign_views = [
listmonk_client.models.dashboard_chart_link_clicks_inner.DashboardChart_link_clicks_inner(
listmonk.models.dashboard_chart_link_clicks_inner.DashboardChart_link_clicks_inner(
count = 56,
date = '', )
]
Expand Down
12 changes: 6 additions & 6 deletions test/test_dashboard_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ def make_instance(self, include_optional) -> DashboardCount:
model = DashboardCount()
if include_optional:
return DashboardCount(
data = listmonk_client.models.dashboard_count_data.DashboardCount_data(
subscribers = listmonk_client.models.dashboard_count_data_subscribers.DashboardCount_data_subscribers(
data = listmonk.models.dashboard_count_data.DashboardCount_data(
subscribers = listmonk.models.dashboard_count_data_subscribers.DashboardCount_data_subscribers(
total = 56,
blocklisted = listmonk_client.models.blocklisted.blocklisted(),
blocklisted = listmonk.models.blocklisted.blocklisted(),
orphans = 56, ),
lists = listmonk_client.models.dashboard_count_data_lists.DashboardCount_data_lists(
lists = listmonk.models.dashboard_count_data_lists.DashboardCount_data_lists(
total = 56,
private = 56,
public = 56,
optin_single = 56,
optin_double = 56, ),
campaigns = listmonk_client.models.dashboard_count_data_campaigns.DashboardCount_data_campaigns(
campaigns = listmonk.models.dashboard_count_data_campaigns.DashboardCount_data_campaigns(
total = 56,
by_status = listmonk_client.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
by_status = listmonk.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
draft = 56, ), ),
messages = 56, )
)
Expand Down
10 changes: 5 additions & 5 deletions test/test_dashboard_count_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ def make_instance(self, include_optional) -> DashboardCountData:
model = DashboardCountData()
if include_optional:
return DashboardCountData(
subscribers = listmonk_client.models.dashboard_count_data_subscribers.DashboardCount_data_subscribers(
subscribers = listmonk.models.dashboard_count_data_subscribers.DashboardCount_data_subscribers(
total = 56,
blocklisted = listmonk_client.models.blocklisted.blocklisted(),
blocklisted = listmonk.models.blocklisted.blocklisted(),
orphans = 56, ),
lists = listmonk_client.models.dashboard_count_data_lists.DashboardCount_data_lists(
lists = listmonk.models.dashboard_count_data_lists.DashboardCount_data_lists(
total = 56,
private = 56,
public = 56,
optin_single = 56,
optin_double = 56, ),
campaigns = listmonk_client.models.dashboard_count_data_campaigns.DashboardCount_data_campaigns(
campaigns = listmonk.models.dashboard_count_data_campaigns.DashboardCount_data_campaigns(
total = 56,
by_status = listmonk_client.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
by_status = listmonk.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
draft = 56, ), ),
messages = 56
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_dashboard_count_data_campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> DashboardCountDataCampaigns:
if include_optional:
return DashboardCountDataCampaigns(
total = 56,
by_status = listmonk_client.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
by_status = listmonk.models.dashboard_count_data_campaigns_by_status.DashboardCount_data_campaigns_by_status(
draft = 56, )
)
else:
Expand Down
2 changes: 1 addition & 1 deletion test/test_dashboard_count_data_subscribers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> DashboardCountDataSubscribers:
if include_optional:
return DashboardCountDataSubscribers(
total = 56,
blocklisted = listmonk_client.models.blocklisted.blocklisted(),
blocklisted = listmonk.models.blocklisted.blocklisted(),
orphans = 56
)
else:
Expand Down
2 changes: 1 addition & 1 deletion test/test_delete_gc_subscribers200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> DeleteGCSubscribers200Response:
model = DeleteGCSubscribers200Response()
if include_optional:
return DeleteGCSubscribers200Response(
data = listmonk_client.models.delete_gc_subscribers_200_response_data.deleteGCSubscribers_200_response_data(
data = listmonk.models.delete_gc_subscribers_200_response_data.deleteGCSubscribers_200_response_data(
count = 56, )
)
else:
Expand Down
8 changes: 4 additions & 4 deletions test/test_get_bounce_by_id200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ def make_instance(self, include_optional) -> GetBounceById200Response:
model = GetBounceById200Response()
if include_optional:
return GetBounceById200Response(
data = listmonk_client.models.bounce.Bounce(
data = listmonk.models.bounce.Bounce(
results = [
listmonk_client.models.bounce_results_inner.Bounce_results_inner(
listmonk.models.bounce_results_inner.Bounce_results_inner(
id = 56,
type = '',
source = '',
meta = listmonk_client.models.meta.meta(),
meta = listmonk.models.meta.meta(),
created_at = '',
email = '',
subscriber_uuid = '',
subscriber_id = 56,
campaign = listmonk_client.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
campaign = listmonk.models.bounce_results_inner_campaign.Bounce_results_inner_campaign(
id = 56,
name = '', ),
campaign_uuid = '',
Expand Down
4 changes: 2 additions & 2 deletions test/test_get_bounces200_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def make_instance(self, include_optional) -> GetBounces200Response:
model = GetBounces200Response()
if include_optional:
return GetBounces200Response(
data = listmonk_client.models.get_bounces_200_response_data.getBounces_200_response_data(
data = listmonk.models.get_bounces_200_response_data.getBounces_200_response_data(
results = [
listmonk_client.models.bounce.Bounce()
listmonk.models.bounce.Bounce()
],
query = '',
total = 56,
Expand Down
Loading

0 comments on commit 58c4632

Please sign in to comment.