Giter Club home page Giter Club logo

semantic-release-python's Introduction

Semantic Release Python (with Poetry Support)

A plugin created by Megabyte Labs



A semantic-release plugin for PyPi.org that supports both regular and Poetry projects


Table of Contents

Overview

Semantic Release Python is a semantic-release plugin that brings support for managing the publication of PyPi packages. It supports traditional Python projects with a setup.cfg file and also supports Poetry projects.

This plugin requires both Python 3 and a recent version of Node.js to be present. After installing the plugin, a few supporting Python packages will automatically be installed into a virtualenv located at .venv. Using a virtualenv helps to prevent incompatibilities with your current installed software. Before you run any configuration that contains, you must source the virtualenv by running . venv/bin/activate or install the dependencies in this project's requirements.txt through other means prior to utilizing the plugin.

Requirements

If you are simply including this library in your project, all you need is a recent version of Node.js. Node.js >14.18.0 is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.

Developer Requirements

The following versions of Node.js and Python are required for development:

Other versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our Taskfile.yml set-up (even Node.js and Python). Run bash start.sh to install Bodega (an improved fork of go-task) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the CONTRIBUTING.md or simply run:

npm run help

npm run help will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.

This Repository (Shared Common)

This repository houses files that propagate downstream to project-specific repositories.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.

Sponsorship

Dear Awesome Person,

I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.

Sincerely,

Brian Zalewski

Open Collective sponsors GitHub sponsors Patreon

License

Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.

semantic-release-python's People

Contributors

professormanhattan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

semantic-release-python's Issues

Poetry publish throws same error as poetry config

❔ What are you experiencing an issue with?

Latest Release

❔ Version

v2.5.30

🐞 Description

The poetry publish catch block in publishPoetry throws the same error message as the poetry config:

throw new Error(`Failed to run "poetry config repositories.repo ${repoUrl}"`)

This makes it harder to figure out which of the two commands failed. Could the second error thrown be something like:

throw new Error(Failed to run "poetry publish --build --repository --repo")

⏺️ Steps To Reproduce

Set PYPI_TOKEN to an invalid token. Run the publish step and observe the error message.

📒 Relevant Log Output

No response

💡 Possible Solution

throw new Error(Failed to run "poetry publish --build --repository --repo")

Object.hasOwn is not a function Bug

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

Description

Essentially the plugin fails to after the verification step with Object.hasOwn is not a function.

Other information** (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Error Log

[8:09:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "semantic-release-python"
[8:09:06 PM] [semantic-release] › ✖  Failed step "verifyConditions" of plugin "semantic-release-python"
[8:09:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/exec"
[8:09:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/exec"
[8:09:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[8:09:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[8:09:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[8:09:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[8:09:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[8:09:06 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
[8:09:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[8:09:06 PM] [semantic-release] › ✖  An error occurred while running semantic-release: TypeError: Object.hasOwn is not a function
    at getOption (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/util.js:10:17)
    at verifyPoetry (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/verify.js:123:23)
    at verify (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/verify.js:149:11)
    at validator (/opt/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
    at /opt/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
    at next (/opt/node_modules/p-reduce/index.js:17:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  pluginName: 'semantic-release-python'
}
AggregateError: 
    TypeError: Object.hasOwn is not a function
        at getOption (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/util.js:10:17)
        at verifyPoetry (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/verify.js:123:23)
        at verify (/builds/lmco/hoppr/hoppr/node_modules/semantic-release-python/lib/verify.js:149:11)
        at validator (/opt/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
        at /opt/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
        at next (/opt/node_modules/p-reduce/index.js:17:9)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at /opt/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.pluginsConf.<computed> [as verifyConditions] (/opt/node_modules/semantic-release/lib/plugins/index.js:80:11)
    at async run (/opt/node_modules/semantic-release/index.js:95:3)
    at async module.exports (/opt/node_modules/semantic-release/index.js:260:22)
    at async module.exports (/opt/node_modules/semantic-release/cli.js:55:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.