Skip to content

fixed build script and README formatting #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Socket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api
Initializing the module
-----------------------

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME", timeout=30)
Expand All @@ -32,7 +32,7 @@ Retrieve the package information for a purl post

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -53,12 +53,12 @@ Retrieve the package information for a purl post
- **components (array{dict})** - The components list of packages urls

export.cdx_bom(org_slug, id, query_params)
"""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as a CycloneDX SBOM

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
from socketdev.export import ExportQueryParams
Expand All @@ -82,12 +82,12 @@ Export a Socket SBOM as a CycloneDX SBOM
- **project_id (str)** - Filter by project ID

export.spdx_bom(org_slug, id, query_params)
""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as an SPDX SBOM

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
from socketdev.export import ExportQueryParams
Expand Down Expand Up @@ -116,7 +116,7 @@ Retrieve the Fullscans information for around Organization

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -132,7 +132,7 @@ Create a full scan from a set of package manifest files. Returns a full scan inc

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand Down Expand Up @@ -190,7 +190,7 @@ Delete an existing full scan.

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -207,7 +207,7 @@ Stream a diff between two full scans. Returns a scan diff.

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -226,7 +226,7 @@ Stream all SBOM artifacts for a full scan.

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -243,7 +243,7 @@ Get metadata for a single full scan

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -260,7 +260,7 @@ Retrieve the dependencies for the organization associated with the API Key

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -277,7 +277,7 @@ Retrieve the dependencies for the organization associated with the API Key

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -301,7 +301,7 @@ Get a list of information about the tracked repositores

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -320,7 +320,7 @@ Create a new Socket Repository

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand Down Expand Up @@ -350,7 +350,7 @@ Get a list of information about the tracked repositores

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -362,7 +362,7 @@ Update an existing Socket Repository

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand Down Expand Up @@ -392,7 +392,7 @@ Delete a Socket Repository

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -409,7 +409,7 @@ Retrieve the Socket.dev org information

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -421,7 +421,7 @@ Retrieve the the current quota available for your API Key

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -433,7 +433,7 @@ Retrieve the Socket Organization Settings

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -445,7 +445,7 @@ Retrieve the supported types of manifest files for creating a report

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -457,7 +457,7 @@ Retrieve the list of all reports for the organization

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -473,7 +473,7 @@ Delete the specified report

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -489,7 +489,7 @@ Retrieve the information for a Project Health Report

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -505,7 +505,7 @@ Create a new project health report with the provided files

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -524,7 +524,7 @@ Get a list of information about the tracked repositores

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -536,7 +536,7 @@ Retrieve the information for a SBOM Report

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -548,7 +548,7 @@ Retrieve the Issues associated with a package and version.

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand All @@ -565,7 +565,7 @@ Retrieve the Issues associated with a package and version.

**Usage:**

.. code-block::
.. code-block:: python

from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
Expand Down
7 changes: 3 additions & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

VERSION=$(grep -o "__version__.*" socketdev/__init__.py | awk '{print $3}' | tr -d "'" | tr -d '\r')
VERSION=$(grep -o "__version__.*" socketdev/__init__.py | awk '{print $3}' | sed 's/"//g' | sed "s/'//g" | tr -d '\r')
ENABLE_PYPI_BUILD=$1

if [ -z $ENABLE_PYPI_BUILD ]; then
Expand All @@ -16,7 +16,6 @@ if [ "$ENABLE_PYPI_BUILD" = "pypi-prod=enable" ]; then
else
echo "Doing test build of version $VERSION"
python -m build --wheel --sdist \
&& ls dist/*$VERSION*\
&& twine upload --repository testpypi "dist/*$VERSION*"
&& ls dist/*${VERSION}* \
&& twine upload -r testpypi dist/*${VERSION}*
fi