Skip to main content

modernapp

This package allows to quickly initialise new Python package using bleeding edge tools like linters, just run:

  • pip install modernapp
  • modernapp <your-package-name> # or $ mp <your-package-name>

Now you are able to:

  • cd <your-package-name>
  • make check # To run tests and linters
  • make publish # To publish your new package to PyPi.org to make it accessable to everyone

Add Git remote repository (first create this project on Gitlab) to be able to push changes:

  • git remote add origin git@gitlab.com:<your-username>/<your-package-name>.git
  • git push

Development

Commonly used commands for package development:

  • make check - run unit tests and linters.
  • make fix - format code and fix detected fixable issues.
  • make publish - publishes current package version to pypi.org.
  • make compile - bump and freeze dependency versions in requirements*.txt files
  • make sync - upgrade installed dependencies in Virtual Environment (executed after make compile)

Toolset

This package uses these cutting edge tools:

  • ruff - for linting and code formatting
  • mypy - for type checking
  • pip-audit - for known vulnerability detection in dependencies
  • deadcode - for unused code detection
  • pytest - for collecting and running unit tests
  • coverage - for code coverage by unit tests
  • hatch - for publishing package to pypi.org
  • uv - for Python virtual environment and dependency management
  • pyproject.toml - configuration file for all tools
  • Makefile - aliases for commonly used command line commands

Feature requests:

  • Newly installed package could have virtualenv initialised.

  • Check if git is available before trying to initialise the repository.

  • remove init Makefile alias and cli.py command python files.

  • make a cli command: this package should be installable. Ideally this flow should work:

    • pip install modernapp
    • modernapp mynewpackage
    • cd mynewpackage && make check && make publish
  • Add pre-commit hooks with all the tools enabled.

  • codspeed.io could be considered for Continuous integration pipeline

  • Provide Python version for modernapp CLI command.

  • Add modernapp abreviation CLI alias not to type so much

  • make compile and make sync does not work when virtual environment is activated

  • enable async test execution by default:

    • "pytest-asyncio", [tool.pytest.ini_options] addopts = "--cov=. --no-cov-on-fail --cov-fail-under=90.0" +asyncio_mode = "auto"
  • Clean up the /main.py file after initialization: that logic is overwhelming.

  • Clean up README and descriptions in pyproject.toml and /init.py.

  • Package should display proper messages when internet connection or git is not available. Now it crashes without internet connection with this Traceback:

Cloning modernapp files to /home/niekas/tools/gitruff
Cloning into '/home/niekas/tools/gitruff'...
fatal: unable to access 'https://github.com/albertas/modernapp/': Could not resolve host: github.com
Traceback (most recent call last):
  File "/home/niekas/venv/bin/modernapp", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/niekas/venv/lib/python3.12/site-packages/modernapp/main.py", line 40, in main
    init_new_package(package_name=parsed_args.package_name)
  File "/home/niekas/venv/lib/python3.12/site-packages/modernapp/main.py", line 26, in init_new_package
    pipe = Popen(["make", "init", package_name], stdin=PIPE, stdout=PIPE, cwd=new_package_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/niekas/tools/gitruff'
  • --django --fastapi or other options to add some kind of dependencies and initial project stub to get started with those projects easily.
  • Should create package tags during publishing. Each version should a commit tagged in main branch.

Metadata

Release files for modernapp 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modernapp 0.0.1
File Size Uploaded Provenance Actions
modernapp-0.0.1.tar.gz 5.2 kB Without provenance Details for modernapp-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modernapp 0.0.1
File Interpreter ABI Platform Actions
modernapp-0.0.1-py3-none-any.whl Python 3 none any Details for modernapp-0.0.1-py3-none-any.whl

Total release size: 9.4 kB

Release files / modernapp-0.0.1.tar.gz

Download URL modernapp-0.0.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
55b8cbc3606027a43d992ce7aedd44ab4de6c33ec05e61348acff843d4f9b190
BLAKE2b-256 checksum
How to use checksums
7704344545a47dec9cef2d6cf5b714f9b7bb26042d652cd759ae5422d74dba39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / modernapp-0.0.1-py3-none-any.whl

Download URL modernapp-0.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e07694546cc0cd335a913e2dddba737e5b37f75d817a7c97179a688e7906498f
BLAKE2b-256 checksum
How to use checksums
54e4c6430e52693f2256574e39a513e8489c97c21d68f4596cf34d0420525b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Security for modernapp 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page