chovanecm / sacredboard

Dashboard for sacred. Monitor and access your past machine learning experiments.
MIT License
184 stars 39 forks source link

Sacredboard version number #79

Closed Beardmix closed 6 years ago

Beardmix commented 6 years ago

I would like to display next to the title the version number of Sacredboard. I think it is a nice information to see if something might have changed.

I found how to display it using a nice data-bind, but I don't know where the original information should be saved for easy update.

The information is available in the package.json file, but nowhere under the sacredboard directory. Where should the version number be retrieved from?

(copy/paste for each update is in my opinion out of the question for quality reasons)

Thanks, Mathieu

chovanecm commented 6 years ago

Hi Mathieu, good point: there is no "central and the only truth" about the version number. I just found we have different version numbers in package.json and setup.py as I, of course, forgot to update the former one.

Nevertheless, I consider the version specified in setup.py to be the correct one. Using pkg_resources looks like a promising solution to get the version at runtime: How can I get the version defined in setup.py (setuptools) in my package?

Are you willing to contribute?

Beardmix commented 6 years ago

Hi,

I tried to play around thanks to your link. Indeed I can retrieve the version from the setup.py, but I have issues to get the value from python to javascript (I am not really familiar to the environment and the bindings employed).

I unfortunately have little time to learn and do the feature (most of the time is probably just learning). I will write back if I find the time to do it.

In the meanwhile anyone is free to try :)

chovanecm commented 6 years ago

Hi, thanks for your effort. If you manage to create a Python method that returns the version number, I think I can do the rest on the frontend side :-) You could create a module (and a class) named Sacredboard in sacredboard/app/sacredboard.py. One of the methods could be get_version() that returns the version. I can add a REST endpoint for the class and I will "pick up" the value with the Frontend. Would that be possible?

Beardmix commented 6 years ago

Hello! I tried to create a remote branch with what you asked, but I don't seem to have the rights to create it:

git push -u origin #79_sacredboard_version_number
remote: Permission to chovanecm/sacredboard.git denied to Beardmix.
fatal: unable to access 'https://github.com/chovanecm/sacredboard.git/': The requested URL returned error: 403
chovanecm commented 6 years ago

That's by design :-) If you want to contribute to a GitHub project, you can use the fork button in the top right corner. It will create a copy of the repository in your space. You can do your changes there (preferably in a branch) and when you think it is ready to be pushed back to the upstream (that is, to chovanecm/scaredboard), you create a pull request. => You don't push directly to the upstream repository.

So I suggest that you fork the repository, add it to the copy you already have using e.g. git remote add beardmix https://github.com/Beardmix/sacredboard.git and then push your changes: git push -u beardmix #79_sacredboard_version_number

Then, you can create a pull request from that branch in your repository, which allows me to check your changes, perform unit tests etc. before actually merging it into develop. If you need any assistance just let me know.

Beardmix commented 6 years ago

Thanks :) (Github Newbie here..)

I knew what Fork was, but I never knew that the pull requests were synced. I always thought it was only from the root project. In any case, thanks for the explanation.

I will follow how you create the end-point so that I could participate myself as well in the future.

chovanecm commented 6 years ago

Implemented, will be released today