![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Automate creating, building, testing, and publishing Python packages from the command line.
Install with:
pip install hassle
You should be able to type hassle help
in your terminal and see a list of commands:
Install git and add it to your PATH if it isn't already.
Some parts of this tool may require communicating with Github.
You will also need to register a pypi account if you want to publish packages to https://pypi.org with this tool.
Once you've created and validated an account, you will need to follow the directions to generate an api key.
Copy the key and in your home directory, create a '.pypirc' file if it doesn't already exist.
Edit the file so it contains the following (don't include the brackets around your api key):
After installation and the above additional setup, it is a good idea to run the 'configure' command.
This isn't required and a blank config will be generated whenever it is needed if it doesn't exist.
This info, if provided, is used to populate a new project's 'pyproject.toml' file.
Typing hassle help configure
:
You can also view the current contents with the config
command:
New projects are generated with the new
command:
Most of these options pertain to prefilling the generated 'pyproject.toml' file.
As a simple example we'll create a new package called 'nyquil':
A new folder in your current working directory called 'nyquil' should now exist.
It should have the following structure:
Note: By default an MIT License is added to the project. Pass the -nl/--no_license
flag to prevent this behavior.
If you open the 'pyproject.toml' file it should look like the following except
for the 'project.authors' and 'project.urls' sections:
The package would do absolutely nothing, but with the generated files we do have the viable minimum to build an installable python package.
Hassle uses Pytest and Coverage to run tests.
When we invoke the hassle test
command,
we should see something like this (pretending we have added test functions to tests/test_nyquil.py
):
Building the package is as simple as using:
>hassle build
By default, the build command will:
tests
folder (abandoning the build if any fail).dependencies
field.docs
folder).python -m build .
to generate the tar.gz
and .whl
files (located in a created dist
folder).Assuming you've set up a PyPi account, generated the api key, and configured the '.pypirc' file as mentioned earlier, then you can publish the current version of your package by running:
>hassle publish
When the time comes to make changes to your package, the hassle update
command makes it easy.
This command needs at least one argument according to the type of update: major
, minor
, or patch
.
This argument tells Hassle how to increment the project version.
Hassle uses the semantic versioning standard,
so, for example, if your current version is 1.2.3
then
>hassle update major
bumps to 2.0.0
,
>hassle update minor
bumps to 1.3.0
,
and
>hassle update patch
bumps to 1.2.4
.
By default, the update command will:
tests
folder (abandoning the update if any fail).chore: build {project_version}
.hassle_config.toml
file and the new project version.CHANGELOG.md
file using auto-changelog.auto-changelog
overwrites the changelog file, but Hassle does some extra things so that any manual changes you make to the changelog are preserved).-p
flag.-i
flag.FAQs
Create, build, test, and publish Python projects and packages.
We found that hassle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.