breadcrumb

joined 2 years ago
 

I want to build a python package using setuptools. The folder structure of the project is the following (some non-essential parts have been deleted):

energy-monitor
├── config
│ ├── config.yml
│ └── secrets.yml
├── data
│ └── cpu_tdp.json
├── energy_monitor
│ ├── core
│ │ ├── gui.py
│ │ ├── __init__.py
│ ├── data
│ │ └── tableExport.json
│ ├── __init__.py
│ ├── main.py
│ └── utils
│     ├── api_calls.py
│     └── __init__.py
├── energy-monitor.py
├── LICENSE
├── MANIFEST.in
├── pyproject.toml
├── README.md
└── requirements.txt

The content of the pyproject.toml file is the following (some non-essential parts have been deleted):

[build-system]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"

[project]
name = "energy_monitor"
version = "0.0.1"
description = "Energy monitor"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "GPLv3"}
classifiers = [
  "Programming Language :: Python :: 3",
  "Operating System :: OS Independent",
]
dynamic = ["dependencies"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools]
packages = [
  "energy_monitor", 
  "energy_monitor.core", 
  "energy_monitor.utils"
]
include-package-data = true

[project.scripts]
energy-monitor = "energy_monitor.main:main"

Finally, the content of the MANIFEST.in file is the following:

include README.md
include LICENSE
graft config

I generate the package with python -m build and install the .tar.gz archive with pipx. According to setuptools documentation, I expect to find my config folder, together with README and LICENSE in the interpreter directory (site-packages) after the installation. However, this doesn't happen and I cannot run the app becase it complains that it doesn't find the config. What am I missing?

 

I'm learning C++ and as starting project I'd like to build a simple TUI program, something like neofetch. Do you have any suggestions of a good library I can use to manage the TUI? After some research I sumbled upon ncurses, which seems quite old tho, and notcurses, which to me looks quite cool. Which of the two would you recommend? Are there any better libraries? I thought that maybe, being quite widely used, ncurses is more worth learning, but I'm open to different opinions.

[–] breadcrumb@lemmy.world 4 points 2 years ago

Oh I didn't consider these fields. When I see a company for hardware products I always think they're gonna make you program some microcontrollers or similar, with no OS involved. But it's true that many of them need to develop at least some software to interface with a OS. Thanks for sharing.

[–] breadcrumb@lemmy.world 3 points 2 years ago

Yeah I know that JS and electron took over desktop development as well, so maybe it's worth investing some time in learning JS as well. Thanks for sharing.

 

I don't have a CS background (I graduated in Neuroscience) but now I decided I want to attempt a carrer in software development. When I looked at the possible different types of software developer I felt that the one I was most attracted to was desktop developer or system developer. In general, I like creating programs than run offline on a local machine, or even dealing with the low level operating system stuff.

I altready know how to program in Python so I decided to start learning C++ as well since it feels like exactly the language that can be used for developing desktop apps or working with kernels. In general, I like the level of abstraction at which C++ works and I would like to keep working at that level.

However, when looking around for some jobs or in general talking with people who work in the IT field, I feel like most of the work of a developer is polarised between two extremes: either creating web apps using tons of different front-end and back-end frameworks, or working with embedded systems for different kind of electronic devices. C++ specifically seems to be used nothing more than for gaming and embedded systems nowadays (according to my very subjective impression ofc).

So my question is: is it still possible to find a job were the main task is to develop and/or maintain desktop apps? And if so, is C++ (or other languages that work at the same abstraction level like Rust) the right language to do this? Or maybe, given my lack of a CS education, it's easier to start as a webdev and maybe change later?

Sorry if I said some nonsense or trivial stuff but I just started to enter the IT world and I still don't have a clear idea on how the job market for SWD works.

[–] breadcrumb@lemmy.world 2 points 2 years ago (1 children)

Unfortunatly I'm not using any virtual environments, the packages are installed system-wide and I checked that the python version where the package is installed matched the one used by jupyter. Also, installing from jupyter didn't work either :/

 

Hi, I'm trying to save a plotly image as a static .svg file using kaleido. I have kaleido-0.2.1 installed, but when I run this code on jupyter: fig1.write_image("../figures/supp1A.svg", format="svg", engine="kaleido")
I get this error:

ValueError: 
Image export using the "kaleido" engine requires the kaleido package,
which can be installed using pip:
    $ pip install -U kaleido

Why does this happens even tho kaleido is installed?

[–] breadcrumb@lemmy.world 4 points 2 years ago* (last edited 2 years ago)

As many, I fit the description except for the age, but I hope this monoculture thing goes away. I don't want an entire social network to be a huge bubble. If I want a bubble I join one of the many communities populated by people similar to me, but I want to have the chance to look "for something completely different", getting in touch with world views completely opposte to mine.

 

Hi, I recently re-installed minecraft after a long time not playing it. I'm using Manjaro linux as OS, which is different from the Linux distro I used in the past to play minecraft (I think it was Ubuntu). I have my old worlds (from v1.16) saved under ~/.minecraft/saves and I hoped they would appear again in the new installation after restoring this folder, but this isn't the case. Also, I created a new world in the new installation but it doesn't appear in the ~/.minecraft/saves folder. Where should I look for it? Is the location of the minecraft folder changed with the new releases?